summaryrefslogtreecommitdiffstats
path: root/media/base/pipeline.cc
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-09 23:00:10 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-09 23:00:10 +0000
commitc691aae93911859a45dabf6d1fca8a7f319c523f (patch)
tree35965d7141fd74509da51d56a53daa3b60415b41 /media/base/pipeline.cc
parentecc703929354d51b5e48854d41e222c51497f5d3 (diff)
downloadchromium_src-c691aae93911859a45dabf6d1fca8a7f319c523f.zip
chromium_src-c691aae93911859a45dabf6d1fca8a7f319c523f.tar.gz
chromium_src-c691aae93911859a45dabf6d1fca8a7f319c523f.tar.bz2
Remove default implementations for media::Filter methods.
Another step towards eliminating the Filter class altogether! While attempting to refactor AudioRenderer out of Filter I noticed that Filter's default implementations caused Pipeline tests to not set appropriate expectations leading to unexpected gmock warnings. With this change we should be able to continue refactoring with no changes to unit tests. BUG=108341, 108342 TEST=none Review URL: https://chromiumcodereview.appspot.com/10749003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/pipeline.cc')
-rw-r--r--media/base/pipeline.cc19
1 files changed, 3 insertions, 16 deletions
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index b8f7755f..fd59a130 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -549,7 +549,7 @@ void Pipeline::StartTask(scoped_ptr<FilterCollection> filter_collection,
// Kick off initialization.
pipeline_init_state_.reset(new PipelineInitState());
pipeline_init_state_->composite = new CompositeFilter(message_loop_);
- pipeline_init_state_->composite->set_host(this);
+ pipeline_init_state_->composite->SetHost(this);
SetState(kInitDemuxer);
InitializeDemuxer();
@@ -647,13 +647,6 @@ void Pipeline::InitializeTask(PipelineStatus last_stage_status) {
// Clear init state since we're done initializing.
pipeline_init_state_.reset();
- if (audio_disabled_) {
- // Audio was disabled at some point during initialization. Notify
- // the pipeline filter now that it has been initialized.
- demuxer_->OnAudioRendererDisabled();
- pipeline_filter_->OnAudioRendererDisabled();
- }
-
// Initialization was successful, we are now considered paused, so it's safe
// to set the initial playback rate and volume.
PlaybackRateChangedTask(GetPlaybackRate());
@@ -849,14 +842,8 @@ void Pipeline::DisableAudioRendererTask() {
has_audio_ = false;
audio_disabled_ = true;
- // Notify all filters of disabled audio renderer. If the filter isn't
- // initialized yet, OnAudioRendererDisabled() will be called when
- // initialization is complete.
- if (pipeline_filter_) {
- DCHECK(demuxer_);
- demuxer_->OnAudioRendererDisabled();
- pipeline_filter_->OnAudioRendererDisabled();
- }
+ // Notify our demuxer that we're no longer rendering audio.
+ demuxer_->OnAudioRendererDisabled();
// Start clock since there is no more audio to
// trigger clock updates.