Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Unified Diff: media/filters/audio_renderer_base.cc

Issue 9310028: Update AudioRenderer, VideoRenderer, and AudioDecoder Initialize() methods to use PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix AudioRendererImplTest Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/audio_renderer_base.h ('k') | media/filters/audio_renderer_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_base.cc
diff --git a/media/filters/audio_renderer_base.cc b/media/filters/audio_renderer_base.cc
index 23c17a92a3f60301eead37ad8cbad62021fffaa1..7124408e95674bbf0cc54bb39f47987ffb2cf18d 100644
--- a/media/filters/audio_renderer_base.cc
+++ b/media/filters/audio_renderer_base.cc
@@ -83,7 +83,7 @@ void AudioRendererBase::Seek(base::TimeDelta time, const FilterStatusCB& cb) {
}
void AudioRendererBase::Initialize(AudioDecoder* decoder,
- const base::Closure& init_callback,
+ const PipelineStatusCB& init_callback,
const base::Closure& underflow_callback) {
DCHECK(decoder);
DCHECK(!init_callback.is_null());
@@ -108,14 +108,13 @@ void AudioRendererBase::Initialize(AudioDecoder* decoder,
// Give the subclass an opportunity to initialize itself.
if (!OnInitialize(bits_per_channel, channel_layout, sample_rate)) {
- host()->SetError(PIPELINE_ERROR_INITIALIZATION_FAILED);
- init_callback.Run();
+ init_callback.Run(PIPELINE_ERROR_INITIALIZATION_FAILED);
return;
}
// Finally, execute the start callback.
state_ = kPaused;
- init_callback.Run();
+ init_callback.Run(PIPELINE_OK);
}
bool AudioRendererBase::HasEnded() {
« no previous file with comments | « media/filters/audio_renderer_base.h ('k') | media/filters/audio_renderer_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698