OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 | 5 |
6 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 6 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
7 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 7 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
8 | 8 |
9 #include "media/base/factory.h" | 9 #include "media/base/factory.h" |
10 #include "media/filters/decoder_base.h" | 10 #include "media/filters/decoder_base.h" |
11 | 11 |
12 namespace media { | 12 namespace media { |
13 | 13 |
14 //------------------------------------------------------------------------------ | 14 //------------------------------------------------------------------------------ |
15 | 15 |
16 class FFmpegVideoDecoder : public DecoderBase<VideoDecoder, VideoFrame> { | 16 class FFmpegVideoDecoder : public DecoderBase<VideoDecoder, VideoFrame> { |
17 public: | 17 public: |
18 static FilterFactory* CreateFactory() { | 18 static FilterFactory* CreateFactory() { |
19 return new FilterFactoryImpl0<FFmpegVideoDecoder>(); | 19 return new FilterFactoryImpl0<FFmpegVideoDecoder>(); |
20 } | 20 } |
21 | 21 |
22 static bool IsMediaFormatSupported(const MediaFormat* media_format); | 22 static bool IsMediaFormatSupported(const MediaFormat& media_format); |
23 | 23 |
24 virtual bool OnInitialize(DemuxerStream* demuxer_stream); | 24 virtual bool OnInitialize(DemuxerStream* demuxer_stream); |
25 | 25 |
26 virtual void OnDecode(Buffer* input); | 26 virtual void OnDecode(Buffer* input); |
27 | 27 |
28 private: | 28 private: |
29 friend FilterFactoryImpl0<FFmpegVideoDecoder>; | 29 friend FilterFactoryImpl0<FFmpegVideoDecoder>; |
30 FFmpegVideoDecoder(); | 30 FFmpegVideoDecoder(); |
31 virtual ~FFmpegVideoDecoder(); | 31 virtual ~FFmpegVideoDecoder(); |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); | 33 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace media | 36 } // namespace media |
37 | 37 |
38 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 38 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
OLD | NEW |