diff --git a/dom/media/platforms/agnostic/BlankDecoderModule.h b/dom/media/platforms/agnostic/BlankDecoderModule.h index 092231874234..7ed9a640d475 100644 --- a/dom/media/platforms/agnostic/BlankDecoderModule.h +++ b/dom/media/platforms/agnostic/BlankDecoderModule.h @@ -18,7 +18,8 @@ class ImageContainer; class MediaData; class MediaRawData; -class BlankVideoDataCreator : public DummyDataCreator { +class BlankVideoDataCreator : public DummyDataCreator +{ public: BlankVideoDataCreator(uint32_t aFrameWidth, uint32_t aFrameHeight, diff --git a/dom/media/platforms/agnostic/NullDecoderModule.cpp b/dom/media/platforms/agnostic/NullDecoderModule.cpp index 1067b8f1b6b1..6f6d26db83c3 100644 --- a/dom/media/platforms/agnostic/NullDecoderModule.cpp +++ b/dom/media/platforms/agnostic/NullDecoderModule.cpp @@ -8,9 +8,10 @@ namespace mozilla { -class NullVideoDataCreator : public DummyDataCreator { +class NullVideoDataCreator : public DummyDataCreator +{ public: - NullVideoDataCreator() {} + NullVideoDataCreator() { } already_AddRefed Create(MediaRawData* aSample) override { @@ -27,12 +28,14 @@ public: } }; -class NullDecoderModule : public PlatformDecoderModule { +class NullDecoderModule : public PlatformDecoderModule +{ public: // Decode thread. - already_AddRefed - CreateVideoDecoder(const CreateDecoderParams& aParams) override { + already_AddRefed CreateVideoDecoder( + const CreateDecoderParams& aParams) override + { UniquePtr creator = MakeUnique(); RefPtr decoder = new DummyMediaDataDecoder( Move(creator), NS_LITERAL_CSTRING("null media data decoder"), aParams); @@ -40,21 +43,22 @@ public: } // Decode thread. - already_AddRefed - CreateAudioDecoder(const CreateDecoderParams& aParams) override { + already_AddRefed 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 CreateNullDecoderModule() +already_AddRefed +CreateNullDecoderModule() { RefPtr pdm = new NullDecoderModule(); return pdm.forget(); diff --git a/dom/media/platforms/apple/AppleATDecoder.h b/dom/media/platforms/apple/AppleATDecoder.h index 3ed1e768958d..fb08bfb2f97d 100644 --- a/dom/media/platforms/apple/AppleATDecoder.h +++ b/dom/media/platforms/apple/AppleATDecoder.h @@ -17,7 +17,8 @@ namespace mozilla { class TaskQueue; -class AppleATDecoder : public MediaDataDecoder { +class AppleATDecoder : public MediaDataDecoder +{ public: AppleATDecoder(const AudioInfo& aConfig, TaskQueue* aTaskQueue); diff --git a/dom/media/platforms/apple/AppleDecoderModule.h b/dom/media/platforms/apple/AppleDecoderModule.h index 375b5bbcc876..10998e5d1d5b 100644 --- a/dom/media/platforms/apple/AppleDecoderModule.h +++ b/dom/media/platforms/apple/AppleDecoderModule.h @@ -11,7 +11,8 @@ namespace mozilla { -class AppleDecoderModule : public PlatformDecoderModule { +class AppleDecoderModule : public PlatformDecoderModule +{ public: AppleDecoderModule(); virtual ~AppleDecoderModule(); diff --git a/dom/media/platforms/apple/AppleUtils.h b/dom/media/platforms/apple/AppleUtils.h index 9e30aff86e1b..7f958d8dc806 100644 --- a/dom/media/platforms/apple/AppleUtils.h +++ b/dom/media/platforms/apple/AppleUtils.h @@ -14,7 +14,8 @@ namespace mozilla { // Wrapper class to call CFRelease on reference types // when they go out of scope. template -class AutoCFRelease { +class AutoCFRelease +{ public: MOZ_IMPLICIT AutoCFRelease(T aRef) : mRef(aRef) @@ -45,7 +46,8 @@ private: // CFRefPtr: A CoreFoundation smart pointer. template -class CFRefPtr { +class CFRefPtr +{ public: explicit CFRefPtr(T aRef) : mRef(aRef) diff --git a/dom/media/platforms/apple/AppleVTDecoder.h b/dom/media/platforms/apple/AppleVTDecoder.h index 2cc764075cdc..283ddf8c70fc 100644 --- a/dom/media/platforms/apple/AppleVTDecoder.h +++ b/dom/media/platforms/apple/AppleVTDecoder.h @@ -17,7 +17,8 @@ namespace mozilla { -class AppleVTDecoder : public MediaDataDecoder { +class AppleVTDecoder : public MediaDataDecoder +{ public: AppleVTDecoder(const VideoInfo& aConfig, TaskQueue* aTaskQueue, diff --git a/dom/media/platforms/apple/AppleVTLinker.h b/dom/media/platforms/apple/AppleVTLinker.h index 49783432d6aa..48ec7bb9d6da 100644 --- a/dom/media/platforms/apple/AppleVTLinker.h +++ b/dom/media/platforms/apple/AppleVTLinker.h @@ -28,7 +28,8 @@ public: private: static void* sLink; - static enum LinkStatus { + static enum LinkStatus + { LinkStatus_INIT = 0, LinkStatus_FAILED, LinkStatus_SUCCEEDED diff --git a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.h b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.h index cf78843ff28d..ce3d18a275c5 100644 --- a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.h +++ b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.h @@ -16,8 +16,7 @@ struct AVDictionary; struct AVCodecParserContext; struct PRLibrary; -namespace mozilla -{ +namespace mozilla { struct MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS FFmpegLibWrapper { diff --git a/dom/media/platforms/omx/OmxDataDecoder.h b/dom/media/platforms/omx/OmxDataDecoder.h index 8d9ec70ea606..b43c9eaaba24 100644 --- a/dom/media/platforms/omx/OmxDataDecoder.h +++ b/dom/media/platforms/omx/OmxDataDecoder.h @@ -56,7 +56,8 @@ typedef OmxPromiseLayer::BUFFERLIST BUFFERLIST; * * OmxPlatformLayer acts as the OpenMAX IL core. */ -class OmxDataDecoder : public MediaDataDecoder { +class OmxDataDecoder : public MediaDataDecoder +{ protected: virtual ~OmxDataDecoder(); diff --git a/dom/media/platforms/omx/OmxDecoderModule.h b/dom/media/platforms/omx/OmxDecoderModule.h index 1fbcf69b25da..1e4e72391dd3 100644 --- a/dom/media/platforms/omx/OmxDecoderModule.h +++ b/dom/media/platforms/omx/OmxDecoderModule.h @@ -11,7 +11,8 @@ namespace mozilla { -class OmxDecoderModule : public PlatformDecoderModule { +class OmxDecoderModule : public PlatformDecoderModule +{ public: already_AddRefed CreateVideoDecoder(const CreateDecoderParams& aParams) override; diff --git a/dom/media/platforms/omx/OmxPlatformLayer.h b/dom/media/platforms/omx/OmxPlatformLayer.h index 9955187cfe55..98540f4ee14d 100644 --- a/dom/media/platforms/omx/OmxPlatformLayer.h +++ b/dom/media/platforms/omx/OmxPlatformLayer.h @@ -26,7 +26,8 @@ class TrackInfo; * 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; diff --git a/dom/media/platforms/omx/OmxPromiseLayer.h b/dom/media/platforms/omx/OmxPromiseLayer.h index f414ab7af7d8..9f169fd686a9 100644 --- a/dom/media/platforms/omx/OmxPromiseLayer.h +++ b/dom/media/platforms/omx/OmxPromiseLayer.h @@ -40,9 +40,10 @@ class TrackInfo; * 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) @@ -60,7 +61,8 @@ public: OmxBufferFailureHolder(OMX_ERRORTYPE aError, BufferData* aBuffer) : mError(aError) , mBuffer(aBuffer) - {} + { + } OMX_ERRORTYPE mError; BufferData* mBuffer; @@ -68,13 +70,15 @@ public: typedef MozPromise OmxBufferPromise; - class OmxCommandFailureHolder { + class OmxCommandFailureHolder + { public: OmxCommandFailureHolder(OMX_ERRORTYPE aErrorType, OMX_COMMANDTYPE aCommandType) : mErrorType(aErrorType) , mCommandType(aCommandType) - {} + { + } OMX_ERRORTYPE mErrorType; OMX_COMMANDTYPE mCommandType; @@ -120,16 +124,18 @@ public: // 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; @@ -173,7 +179,8 @@ public: // For input port buffer, the status transition is: // FREE -> OMX_COMPONENT -> OMX_CLIENT -> FREE // - enum BufferStatus { + enum BufferStatus + { FREE, OMX_COMPONENT, OMX_CLIENT, @@ -209,7 +216,8 @@ public: bool Event(OMX_EVENTTYPE aEvent, OMX_U32 aData1, OMX_U32 aData2); protected: - struct FlushCommand { + struct FlushCommand + { OMX_DIRTYPE type; OMX_PTR cmd; };