content/media/fmp4/ffmpeg/FFmpegDecoderModule.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/media/fmp4/ffmpeg/FFmpegDecoderModule.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,50 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim:set ts=2 sw=2 sts=2 et cindent: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef __FFmpegDecoderModule_h__
    1.11 +#define __FFmpegDecoderModule_h__
    1.12 +
    1.13 +#include "PlatformDecoderModule.h"
    1.14 +
    1.15 +namespace mozilla
    1.16 +{
    1.17 +
    1.18 +#ifdef PR_LOGGING
    1.19 +extern PRLogModuleInfo* GetFFmpegDecoderLog();
    1.20 +#define FFMPEG_LOG(...) PR_LOG(GetFFmpegDecoderLog(), PR_LOG_DEBUG, (__VA_ARGS__))
    1.21 +#else
    1.22 +#define FFMPEG_LOG(...)
    1.23 +#endif
    1.24 +
    1.25 +class FFmpegDecoderModule : public PlatformDecoderModule
    1.26 +{
    1.27 +public:
    1.28 +  FFmpegDecoderModule();
    1.29 +  virtual ~FFmpegDecoderModule();
    1.30 +
    1.31 +  static bool Link();
    1.32 +
    1.33 +  virtual nsresult Shutdown() MOZ_OVERRIDE;
    1.34 +
    1.35 +  virtual MediaDataDecoder* CreateH264Decoder(
    1.36 +    const mp4_demuxer::VideoDecoderConfig& aConfig,
    1.37 +    mozilla::layers::LayersBackend aLayersBackend,
    1.38 +    mozilla::layers::ImageContainer* aImageContainer,
    1.39 +    MediaTaskQueue* aVideoTaskQueue,
    1.40 +    MediaDataDecoderCallback* aCallback) MOZ_OVERRIDE;
    1.41 +
    1.42 +  virtual MediaDataDecoder* CreateAACDecoder(
    1.43 +    const mp4_demuxer::AudioDecoderConfig& aConfig,
    1.44 +    MediaTaskQueue* aAudioTaskQueue,
    1.45 +    MediaDataDecoderCallback* aCallback) MOZ_OVERRIDE;
    1.46 +
    1.47 +private:
    1.48 +  static bool sFFmpegLinkDone;
    1.49 +};
    1.50 +
    1.51 +} // namespace mozilla
    1.52 +
    1.53 +#endif // __FFmpegDecoderModule_h__

mercurial