content/media/fmp4/ffmpeg/FFmpegDecoderModule.h

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:dab08293198b
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/. */
6
7 #ifndef __FFmpegDecoderModule_h__
8 #define __FFmpegDecoderModule_h__
9
10 #include "PlatformDecoderModule.h"
11
12 namespace mozilla
13 {
14
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
21
22 class FFmpegDecoderModule : public PlatformDecoderModule
23 {
24 public:
25 FFmpegDecoderModule();
26 virtual ~FFmpegDecoderModule();
27
28 static bool Link();
29
30 virtual nsresult Shutdown() MOZ_OVERRIDE;
31
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;
38
39 virtual MediaDataDecoder* CreateAACDecoder(
40 const mp4_demuxer::AudioDecoderConfig& aConfig,
41 MediaTaskQueue* aAudioTaskQueue,
42 MediaDataDecoderCallback* aCallback) MOZ_OVERRIDE;
43
44 private:
45 static bool sFFmpegLinkDone;
46 };
47
48 } // namespace mozilla
49
50 #endif // __FFmpegDecoderModule_h__

mercurial