Bug 1394591 - P2. Fix style. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 01 Sep 2017 14:27:39 +0200
changeset 428199 956185fdc25f130c51a24330aea32c621295d3c9
parent 428198 968316ac21fa9432fb458c8ae0818b6747e1ff53
child 428200 f7c4667c82e9366e69265c8c4144a9213ffaf555
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1394591
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1394591 - P2. Fix style. r=gerald MozReview-Commit-ID: Jmyrf7d8hGW
dom/media/platforms/agnostic/BlankDecoderModule.h
dom/media/platforms/agnostic/NullDecoderModule.cpp
dom/media/platforms/apple/AppleATDecoder.h
dom/media/platforms/apple/AppleDecoderModule.h
dom/media/platforms/apple/AppleUtils.h
dom/media/platforms/apple/AppleVTDecoder.h
dom/media/platforms/apple/AppleVTLinker.h
dom/media/platforms/ffmpeg/FFmpegLibWrapper.h
dom/media/platforms/omx/OmxDataDecoder.h
dom/media/platforms/omx/OmxDecoderModule.h
dom/media/platforms/omx/OmxPlatformLayer.h
dom/media/platforms/omx/OmxPromiseLayer.h
--- a/dom/media/platforms/agnostic/BlankDecoderModule.h
+++ b/dom/media/platforms/agnostic/BlankDecoderModule.h
@@ -13,17 +13,18 @@ namespace mozilla {
 
 namespace layers {
 class ImageContainer;
 }
 
 class MediaData;
 class MediaRawData;
 
-class BlankVideoDataCreator : public DummyDataCreator {
+class BlankVideoDataCreator : public DummyDataCreator
+{
 public:
   BlankVideoDataCreator(uint32_t aFrameWidth,
                         uint32_t aFrameHeight,
                         layers::ImageContainer* aImageContainer);
 
   already_AddRefed<MediaData> Create(MediaRawData* aSample) override;
 
 private:
--- a/dom/media/platforms/agnostic/NullDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/NullDecoderModule.cpp
@@ -3,61 +3,65 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DummyMediaDataDecoder.h"
 
 namespace mozilla {
 
-class NullVideoDataCreator : public DummyDataCreator {
+class NullVideoDataCreator : public DummyDataCreator
+{
 public:
-  NullVideoDataCreator() {}
+  NullVideoDataCreator() { }
 
   already_AddRefed<MediaData> Create(MediaRawData* aSample) override
   {
     // Create a dummy VideoData with no image. This gives us something to
     // send to media streams if necessary.
     RefPtr<VideoData> v(new VideoData(aSample->mOffset,
                                       aSample->mTime,
                                       aSample->mDuration,
                                       aSample->mKeyframe,
                                       aSample->mTimecode,
                                       gfx::IntSize(),
                                       0));
     return v.forget();
   }
 };
 
-class NullDecoderModule : public PlatformDecoderModule {
+class NullDecoderModule : public PlatformDecoderModule
+{
 public:
 
   // Decode thread.
-  already_AddRefed<MediaDataDecoder>
-  CreateVideoDecoder(const CreateDecoderParams& aParams) override {
+  already_AddRefed<MediaDataDecoder> CreateVideoDecoder(
+    const CreateDecoderParams& aParams) override
+  {
     UniquePtr<DummyDataCreator> creator = MakeUnique<NullVideoDataCreator>();
     RefPtr<MediaDataDecoder> decoder = new DummyMediaDataDecoder(
       Move(creator), NS_LITERAL_CSTRING("null media data decoder"), aParams);
     return decoder.forget();
   }
 
   // Decode thread.
-  already_AddRefed<MediaDataDecoder>
-  CreateAudioDecoder(const CreateDecoderParams& aParams) override {
+  already_AddRefed<MediaDataDecoder> CreateAudioDecoder(
+    const CreateDecoderParams& aParams) override
+  {
     MOZ_ASSERT(false, "Audio decoders are unsupported.");
     return nullptr;
   }
 
-  bool
-  SupportsMimeType(const nsACString& aMimeType,
-                   DecoderDoctorDiagnostics* aDiagnostics) const override
+  bool SupportsMimeType(const nsACString& aMimeType,
+                        DecoderDoctorDiagnostics* aDiagnostics) const override
   {
     return true;
   }
 };
 
-already_AddRefed<PlatformDecoderModule> CreateNullDecoderModule()
+already_AddRefed<PlatformDecoderModule>
+CreateNullDecoderModule()
 {
   RefPtr<PlatformDecoderModule> pdm = new NullDecoderModule();
   return pdm.forget();
 }
 
 } // namespace mozilla
--- a/dom/media/platforms/apple/AppleATDecoder.h
+++ b/dom/media/platforms/apple/AppleATDecoder.h
@@ -12,17 +12,18 @@
 #include "mozilla/Vector.h"
 #include "nsIThread.h"
 #include "AudioConverter.h"
 
 namespace mozilla {
 
 class TaskQueue;
 
-class AppleATDecoder : public MediaDataDecoder {
+class AppleATDecoder : public MediaDataDecoder
+{
 public:
   AppleATDecoder(const AudioInfo& aConfig,
                  TaskQueue* aTaskQueue);
   ~AppleATDecoder();
 
   RefPtr<InitPromise> Init() override;
   RefPtr<DecodePromise> Decode(MediaRawData* aSample) override;
   RefPtr<DecodePromise> Drain() override;
--- a/dom/media/platforms/apple/AppleDecoderModule.h
+++ b/dom/media/platforms/apple/AppleDecoderModule.h
@@ -6,17 +6,18 @@
 
 #ifndef mozilla_AppleDecoderModule_h
 #define mozilla_AppleDecoderModule_h
 
 #include "PlatformDecoderModule.h"
 
 namespace mozilla {
 
-class AppleDecoderModule : public PlatformDecoderModule {
+class AppleDecoderModule : public PlatformDecoderModule
+{
 public:
   AppleDecoderModule();
   virtual ~AppleDecoderModule();
 
   nsresult Startup() override;
 
   // Decode thread.
   already_AddRefed<MediaDataDecoder>
--- a/dom/media/platforms/apple/AppleUtils.h
+++ b/dom/media/platforms/apple/AppleUtils.h
@@ -9,17 +9,18 @@
 
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 
 // Wrapper class to call CFRelease on reference types
 // when they go out of scope.
 template <class T>
-class AutoCFRelease {
+class AutoCFRelease
+{
 public:
   MOZ_IMPLICIT AutoCFRelease(T aRef)
     : mRef(aRef)
   {
   }
   ~AutoCFRelease()
   {
     if (mRef) {
@@ -40,17 +41,18 @@ public:
 private:
   // Copy operator isn't supported and is not implemented.
   AutoCFRelease<T>& operator=(const AutoCFRelease<T>&);
   T mRef;
 };
 
 // CFRefPtr: A CoreFoundation smart pointer.
 template <class T>
-class CFRefPtr {
+class CFRefPtr
+{
 public:
   explicit CFRefPtr(T aRef)
     : mRef(aRef)
   {
     if (mRef) {
       CFRetain(mRef);
     }
   }
--- a/dom/media/platforms/apple/AppleVTDecoder.h
+++ b/dom/media/platforms/apple/AppleVTDecoder.h
@@ -12,17 +12,18 @@
 #include "nsIThread.h"
 #include "ReorderQueue.h"
 #include "TimeUnits.h"
 
 #include "VideoToolbox/VideoToolbox.h"
 
 namespace mozilla {
 
-class AppleVTDecoder : public MediaDataDecoder {
+class AppleVTDecoder : public MediaDataDecoder
+{
 public:
   AppleVTDecoder(const VideoInfo& aConfig,
                  TaskQueue* aTaskQueue,
                  layers::ImageContainer* aImageContainer);
 
   class AppleFrameRef {
   public:
     media::TimeUnit decode_timestamp;
--- a/dom/media/platforms/apple/AppleVTLinker.h
+++ b/dom/media/platforms/apple/AppleVTLinker.h
@@ -23,17 +23,18 @@ public:
   static bool Link();
   static void Unlink();
   static CFStringRef skPropEnableHWAccel;
   static CFStringRef skPropUsingHWAccel;
 
 private:
   static void* sLink;
 
-  static enum LinkStatus {
+  static enum LinkStatus
+  {
     LinkStatus_INIT = 0,
     LinkStatus_FAILED,
     LinkStatus_SUCCEEDED
   } sLinkStatus;
 
   static CFStringRef GetIOConst(const char* symbol);
 };
 
--- a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.h
+++ b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.h
@@ -11,18 +11,17 @@
 struct AVCodec;
 struct AVCodecContext;
 struct AVFrame;
 struct AVPacket;
 struct AVDictionary;
 struct AVCodecParserContext;
 struct PRLibrary;
 
-namespace mozilla
-{
+namespace mozilla {
 
 struct MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS FFmpegLibWrapper
 {
   // The class is used only in static storage and so is zero initialized.
   FFmpegLibWrapper() = default;
   // The libraries are not unloaded in the destructor, because doing so would
   // require a static constructor to register the static destructor.  As the
   // class is in static storage, the destructor would only run on shutdown
--- a/dom/media/platforms/omx/OmxDataDecoder.h
+++ b/dom/media/platforms/omx/OmxDataDecoder.h
@@ -51,17 +51,18 @@ typedef OmxPromiseLayer::BUFFERLIST BUFF
  *   OmxPromiseLayer acts as the OpenMAX IL component.
  *
  * OpenMAX IL core:
  *   "Platform-specific code that has the functionality necessary to locate and
  *   then load an OpenMAX IL component into main memory."
  *
  *   OmxPlatformLayer acts as the OpenMAX IL core.
  */
-class OmxDataDecoder : public MediaDataDecoder {
+class OmxDataDecoder : public MediaDataDecoder
+{
 protected:
   virtual ~OmxDataDecoder();
 
 public:
   OmxDataDecoder(const TrackInfo& aTrackInfo,
                  layers::ImageContainer* aImageContainer);
 
   RefPtr<InitPromise> Init() override;
--- a/dom/media/platforms/omx/OmxDecoderModule.h
+++ b/dom/media/platforms/omx/OmxDecoderModule.h
@@ -6,17 +6,18 @@
 
 #if !defined(OmxDecoderModule_h_)
 #define OmxDecoderModule_h_
 
 #include "PlatformDecoderModule.h"
 
 namespace mozilla {
 
-class OmxDecoderModule : public PlatformDecoderModule {
+class OmxDecoderModule : public PlatformDecoderModule
+{
 public:
   already_AddRefed<MediaDataDecoder>
   CreateVideoDecoder(const CreateDecoderParams& aParams) override;
 
   already_AddRefed<MediaDataDecoder>
   CreateAudioDecoder(const CreateDecoderParams& aParams) override;
 
   bool SupportsMimeType(const nsACString& aMimeType,
--- a/dom/media/platforms/omx/OmxPlatformLayer.h
+++ b/dom/media/platforms/omx/OmxPlatformLayer.h
@@ -21,17 +21,18 @@ class TrackInfo;
 /*
  * This class the the abstract layer of the platform OpenMax IL implementation.
  *
  * For some platform like andoird, it exposures its OpenMax IL via IOMX which
  * is definitions are different comparing to standard.
  * For other platforms like Raspberry Pi, it will be easy to implement this layer
  * with the standard OpenMax IL api.
  */
-class OmxPlatformLayer {
+class OmxPlatformLayer
+{
 public:
   typedef OmxPromiseLayer::BUFFERLIST BUFFERLIST;
   typedef OmxPromiseLayer::BufferData BufferData;
 
   virtual OMX_ERRORTYPE InitOmxToStateLoaded(const TrackInfo* aInfo) = 0;
 
   OMX_ERRORTYPE Config();
 
--- a/dom/media/platforms/omx/OmxPromiseLayer.h
+++ b/dom/media/platforms/omx/OmxPromiseLayer.h
@@ -35,19 +35,20 @@ class TrackInfo;
  *    For example, OmxCommandPromise is used for OpenMax IL SendCommand.
  * 2. Manage the buffer exchanged between client and component.
  *    Because omx buffer works crossing threads, so each omx buffer has its own
  *    promise, it is defined in BufferData.
  *
  * All of functions and members in this class should be run in the same
  * TaskQueue.
  */
-class OmxPromiseLayer {
+class OmxPromiseLayer
+{
 protected:
-  virtual ~OmxPromiseLayer() {}
+  virtual ~OmxPromiseLayer() { }
 
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(OmxPromiseLayer)
 
   OmxPromiseLayer(TaskQueue* aTaskQueue,
                   OmxDataDecoder* aDataDecoder,
                   layers::ImageContainer* aImageContainer);
 
@@ -55,31 +56,34 @@ public:
 
   typedef nsTArray<RefPtr<BufferData>> BUFFERLIST;
 
   class OmxBufferFailureHolder {
   public:
     OmxBufferFailureHolder(OMX_ERRORTYPE aError, BufferData* aBuffer)
       : mError(aError)
       , mBuffer(aBuffer)
-    {}
+    {
+    }
 
     OMX_ERRORTYPE mError;
     BufferData* mBuffer;
   };
 
   typedef MozPromise<BufferData*, OmxBufferFailureHolder, /* IsExclusive = */ false> OmxBufferPromise;
 
-  class OmxCommandFailureHolder {
+  class OmxCommandFailureHolder
+  {
   public:
     OmxCommandFailureHolder(OMX_ERRORTYPE aErrorType,
                             OMX_COMMANDTYPE aCommandType)
       : mErrorType(aErrorType)
       , mCommandType(aCommandType)
-    {}
+    {
+    }
 
     OMX_ERRORTYPE mErrorType;
     OMX_COMMANDTYPE mCommandType;
   };
 
   typedef MozPromise<OMX_COMMANDTYPE, OmxCommandFailureHolder, /* IsExclusive = */ true> OmxCommandPromise;
 
   typedef MozPromise<uint32_t, bool, /* IsExclusive = */ true> OmxPortConfigPromise;
@@ -115,26 +119,28 @@ public:
 
   OMX_U32 OutputPortIndex();
 
   nsresult Shutdown();
 
   // BufferData maintains the status of OMX buffer (OMX_BUFFERHEADERTYPE).
   // mStatus tracks the buffer owner.
   // And a promise because OMX buffer working among different threads.
-  class BufferData {
+  class BufferData
+  {
   protected:
-    virtual ~BufferData() {}
+    virtual ~BufferData() { }
 
   public:
     explicit BufferData(OMX_BUFFERHEADERTYPE* aBuffer)
       : mEos(false)
       , mStatus(BufferStatus::FREE)
       , mBuffer(aBuffer)
-    {}
+    {
+    }
 
     typedef void* BufferID;
 
     NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BufferData)
 
     // In most cases, the ID of this buffer is the pointer address of mBuffer.
     // However, on some platforms it may be another value.
     virtual BufferID ID()
@@ -168,17 +174,18 @@ public:
     //     this case)
     //
     // For output port buffer, the status transition is:
     // FREE -> OMX_COMPONENT -> OMX_CLIENT -> OMX_CLIENT_OUTPUT -> FREE
     //
     // For input port buffer, the status transition is:
     // FREE -> OMX_COMPONENT -> OMX_CLIENT -> FREE
     //
-    enum BufferStatus {
+    enum BufferStatus
+    {
       FREE,
       OMX_COMPONENT,
       OMX_CLIENT,
       OMX_CLIENT_OUTPUT,
       INVALID
     };
 
     bool mEos;
@@ -204,17 +211,18 @@ public:
 
   already_AddRefed<BufferData>
   FindAndRemoveBufferHolder(OMX_DIRTYPE aType, BufferData::BufferID aId);
 
   // Return true if event is handled.
   bool Event(OMX_EVENTTYPE aEvent, OMX_U32 aData1, OMX_U32 aData2);
 
 protected:
-  struct FlushCommand {
+  struct FlushCommand
+  {
     OMX_DIRTYPE type;
     OMX_PTR cmd;
   };
 
   BUFFERLIST* GetBufferHolders(OMX_DIRTYPE aType);
 
   already_AddRefed<MediaRawData> FindAndRemoveRawData(OMX_TICKS aTimecode);