Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
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 __FFmpegDataDecoder_h__
8 #define __FFmpegDataDecoder_h__
10 #include "mp4_demuxer/mp4_demuxer.h"
12 #include "FFmpegDecoderModule.h"
13 #include "FFmpegRuntimeLinker.h"
14 #include "FFmpegCompat.h"
16 namespace mozilla
17 {
19 class FFmpegDataDecoder : public MediaDataDecoder
20 {
21 public:
22 FFmpegDataDecoder(MediaTaskQueue* aTaskQueue, AVCodecID aCodecID);
23 virtual ~FFmpegDataDecoder();
25 static bool Link();
27 virtual nsresult Init() MOZ_OVERRIDE;
28 virtual nsresult Input(mp4_demuxer::MP4Sample* aSample) = 0;
29 virtual nsresult Flush() MOZ_OVERRIDE;
30 virtual nsresult Drain() = 0;
31 virtual nsresult Shutdown() MOZ_OVERRIDE;
33 protected:
34 MediaTaskQueue* mTaskQueue;
35 AVCodecContext mCodecContext;
37 private:
38 static bool sFFmpegInitDone;
40 AVCodecID mCodecID;
41 };
43 } // namespace mozilla
45 #endif // __FFmpegDataDecoder_h__