diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 21:25:25 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 21:25:25 +0000 |
commit | b765033590fc4df1a4b42d0b82d78f7a6a8fc75e (patch) | |
tree | 86f2f77d0165cb0334ea6203520a5e5eacb10efd /media | |
parent | dffeb89734143d57a09c96ae473552463fd579bb (diff) | |
download | chromium_src-b765033590fc4df1a4b42d0b82d78f7a6a8fc75e.zip chromium_src-b765033590fc4df1a4b42d0b82d78f7a6a8fc75e.tar.gz chromium_src-b765033590fc4df1a4b42d0b82d78f7a6a8fc75e.tar.bz2 |
Small changes to comments and add host() + message_loop() implementation into MediaFilter.
Remove host() and message_loop() overrides in DecoderBase.
Review URL: http://codereview.chromium.org/150193
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/base/filters.h | 3 | ||||
-rw-r--r-- | media/base/pipeline_impl.cc | 10 | ||||
-rw-r--r-- | media/filters/audio_renderer_impl.h | 5 | ||||
-rw-r--r-- | media/filters/decoder_base.h | 3 | ||||
-rw-r--r-- | media/filters/ffmpeg_audio_decoder.h | 1 | ||||
-rw-r--r-- | media/filters/ffmpeg_video_decoder.h | 1 |
6 files changed, 22 insertions, 1 deletions
diff --git a/media/base/filters.h b/media/base/filters.h index 9fd1b2e..b892961 100644 --- a/media/base/filters.h +++ b/media/base/filters.h @@ -103,6 +103,9 @@ class MediaFilter : public base::RefCountedThreadSafe<MediaFilter> { friend class base::RefCountedThreadSafe<MediaFilter>; virtual ~MediaFilter() {} + FilterHost* host() const { return host_; } + MessageLoop* message_loop() const { return message_loop_; } + private: FilterHost* host_; MessageLoop* message_loop_; diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc index 098fb18..9ba4181 100644 --- a/media/base/pipeline_impl.cc +++ b/media/base/pipeline_impl.cc @@ -26,9 +26,17 @@ bool SupportsSetMessageLoop() { case FILTER_AUDIO_DECODER: case FILTER_VIDEO_DECODER: return true; - default: + + case FILTER_DATA_SOURCE: + case FILTER_AUDIO_RENDERER: + case FILTER_VIDEO_RENDERER: return false; + + // Skipping default case so compiler will warn on a missed enumeration. } + + NOTREACHED() << "Unexpected filter type " << Filter::filter_type(); + return false; } // Small helper function to help us name filter threads for debugging. diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h index e0804ce..cb5430e 100644 --- a/media/filters/audio_renderer_impl.h +++ b/media/filters/audio_renderer_impl.h @@ -9,6 +9,11 @@ // interfaces to open an audio device. Although it cannot be used in the // sandbox, it serves as a reference implementation and can be used in other // applications such as the test player. +// +// Note: THIS IS NOT THE AUDIO RENDERER USED IN CHROME. +// +// See src/chrome/renderer/media/audio_renderer_impl.h for chrome's +// implementation. #include <deque> diff --git a/media/filters/decoder_base.h b/media/filters/decoder_base.h index 22127c2..775d3f9 100644 --- a/media/filters/decoder_base.h +++ b/media/filters/decoder_base.h @@ -19,6 +19,9 @@ namespace media { +// In this class, we over-specify method lookup via this-> to avoid unexpected +// name resolution issues due to the two-phase lookup needed for dependent +// name resolution in templates. template <class Decoder, class Output> class DecoderBase : public Decoder { public: diff --git a/media/filters/ffmpeg_audio_decoder.h b/media/filters/ffmpeg_audio_decoder.h index f30f330..0ef6119 100644 --- a/media/filters/ffmpeg_audio_decoder.h +++ b/media/filters/ffmpeg_audio_decoder.h @@ -23,6 +23,7 @@ class FFmpegAudioDecoder : public DecoderBase<AudioDecoder, Buffer> { static bool IsMediaFormatSupported(const MediaFormat& media_format); + protected: virtual bool OnInitialize(DemuxerStream* demuxer_stream); virtual void OnStop(); diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h index 17ff53b..7905e44 100644 --- a/media/filters/ffmpeg_video_decoder.h +++ b/media/filters/ffmpeg_video_decoder.h @@ -26,6 +26,7 @@ class FFmpegVideoDecoder : public DecoderBase<VideoDecoder, VideoFrame> { static bool IsMediaFormatSupported(const MediaFormat& media_format); + protected: virtual bool OnInitialize(DemuxerStream* demuxer_stream); virtual void OnSeek(base::TimeDelta time); |