From b765033590fc4df1a4b42d0b82d78f7a6a8fc75e Mon Sep 17 00:00:00 2001 From: "ajwong@chromium.org" Date: Mon, 13 Jul 2009 21:25:25 +0000 Subject: 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 --- media/base/filters.h | 3 +++ media/base/pipeline_impl.cc | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'media/base') 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 { friend class base::RefCountedThreadSafe; 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. -- cgit v1.1