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

Unified Diff: media/filters/ffmpeg_audio_decoder.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/ffmpeg_audio_decoder.h ('k') | media/filters/ffmpeg_audio_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index a3ad5641b57be395c1642886963e1563ab3eed24..608f330f481bd4baf74f78e0c7939c17d293a2ed 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -76,7 +76,7 @@ void FFmpegAudioDecoder::Flush(const base::Closure& callback) {
void FFmpegAudioDecoder::Initialize(
DemuxerStream* stream,
- const base::Closure& callback,
+ const PipelineStatusCB& callback,
const StatisticsCallback& stats_callback) {
// TODO(scherkus): change Initialize() signature to pass |stream| as a
// scoped_refptr<>.
@@ -108,7 +108,7 @@ int FFmpegAudioDecoder::samples_per_second() {
void FFmpegAudioDecoder::DoInitialize(
const scoped_refptr<DemuxerStream>& stream,
- const base::Closure& callback,
+ const PipelineStatusCB& callback,
const StatisticsCallback& stats_callback) {
demuxer_stream_ = stream;
const AudioDecoderConfig& config = stream->audio_decoder_config();
@@ -123,8 +123,7 @@ void FFmpegAudioDecoder::DoInitialize(
<< " bits per channel: " << config.bits_per_channel()
<< " samples per second: " << config.samples_per_second();
- host()->SetError(DECODER_ERROR_NOT_SUPPORTED);
- callback.Run();
+ callback.Run(DECODER_ERROR_NOT_SUPPORTED);
return;
}
@@ -137,8 +136,7 @@ void FFmpegAudioDecoder::DoInitialize(
DLOG(ERROR) << "Could not initialize audio decoder: "
<< codec_context_->codec_id;
- host()->SetError(DECODER_ERROR_NOT_SUPPORTED);
- callback.Run();
+ callback.Run(DECODER_ERROR_NOT_SUPPORTED);
return;
}
@@ -147,7 +145,7 @@ void FFmpegAudioDecoder::DoInitialize(
channel_layout_ = config.channel_layout();
samples_per_second_ = config.samples_per_second();
- callback.Run();
+ callback.Run(PIPELINE_OK);
}
void FFmpegAudioDecoder::DoFlush(const base::Closure& callback) {
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.h ('k') | media/filters/ffmpeg_audio_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698