| 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_AUDIO_DECODER_H_ | 6 #ifndef MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
| 7 #define MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ | 7 #define MEDIA_FILTERS_FFMPEG_AUDIO_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 FFmpegAudioDecoder : public DecoderBase<AudioDecoder, Buffer> { | 16 class FFmpegAudioDecoder : public DecoderBase<AudioDecoder, Buffer> { |
| 17 public: | 17 public: |
| 18 static FilterFactory* CreateFactory() { | 18 static FilterFactory* CreateFactory() { |
| 19 return new FilterFactoryImpl0<FFmpegAudioDecoder>(); | 19 return new FilterFactoryImpl0<FFmpegAudioDecoder>(); |
| 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<FFmpegAudioDecoder>; | 29 friend FilterFactoryImpl0<FFmpegAudioDecoder>; |
| 30 FFmpegAudioDecoder(); | 30 FFmpegAudioDecoder(); |
| 31 virtual ~FFmpegAudioDecoder(); | 31 virtual ~FFmpegAudioDecoder(); |
| 32 | 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(FFmpegAudioDecoder); | 33 DISALLOW_COPY_AND_ASSIGN(FFmpegAudioDecoder); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace media | 36 } // namespace media |
| 37 | 37 |
| 38 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ | 38 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
| OLD | NEW |