content/media/fmp4/ffmpeg/FFmpegDecoderModule.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef __FFmpegDecoderModule_h__
     8 #define __FFmpegDecoderModule_h__
    10 #include "PlatformDecoderModule.h"
    12 namespace mozilla
    13 {
    15 #ifdef PR_LOGGING
    16 extern PRLogModuleInfo* GetFFmpegDecoderLog();
    17 #define FFMPEG_LOG(...) PR_LOG(GetFFmpegDecoderLog(), PR_LOG_DEBUG, (__VA_ARGS__))
    18 #else
    19 #define FFMPEG_LOG(...)
    20 #endif
    22 class FFmpegDecoderModule : public PlatformDecoderModule
    23 {
    24 public:
    25   FFmpegDecoderModule();
    26   virtual ~FFmpegDecoderModule();
    28   static bool Link();
    30   virtual nsresult Shutdown() MOZ_OVERRIDE;
    32   virtual MediaDataDecoder* CreateH264Decoder(
    33     const mp4_demuxer::VideoDecoderConfig& aConfig,
    34     mozilla::layers::LayersBackend aLayersBackend,
    35     mozilla::layers::ImageContainer* aImageContainer,
    36     MediaTaskQueue* aVideoTaskQueue,
    37     MediaDataDecoderCallback* aCallback) MOZ_OVERRIDE;
    39   virtual MediaDataDecoder* CreateAACDecoder(
    40     const mp4_demuxer::AudioDecoderConfig& aConfig,
    41     MediaTaskQueue* aAudioTaskQueue,
    42     MediaDataDecoderCallback* aCallback) MOZ_OVERRIDE;
    44 private:
    45   static bool sFFmpegLinkDone;
    46 };
    48 } // namespace mozilla
    50 #endif // __FFmpegDecoderModule_h__

mercurial