Chromium Code Reviews| Index: media/filters/ffmpeg_video_decoder.cc |
| diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc |
| index 0254f6352149110c9c49ad388df92ce9587a69e4..8d2a68e0a0b15cd818f807a0aa1aa4837db0c3ba 100644 |
| --- a/media/filters/ffmpeg_video_decoder.cc |
| +++ b/media/filters/ffmpeg_video_decoder.cc |
| @@ -25,7 +25,7 @@ FFmpegVideoDecoder::FFmpegVideoDecoder(MessageLoop* message_loop) |
| FFmpegVideoDecoder::~FFmpegVideoDecoder() {} |
| void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream, |
| - const base::Closure& callback, |
| + const PipelineStatusCB& callback, |
| const StatisticsCallback& stats_callback) { |
| if (MessageLoop::current() != message_loop_) { |
| message_loop_->PostTask(FROM_HERE, base::Bind( |
| @@ -37,8 +37,7 @@ void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream, |
| DCHECK(!demuxer_stream_); |
| if (!demuxer_stream) { |
| - host()->SetError(PIPELINE_ERROR_DECODE); |
|
scherkus (not reviewing)
2011/12/06 00:27:44
\o/
Ami GONE FROM CHROMIUM
2011/12/07 00:03:04
Done.
|
| - callback.Run(); |
| + callback.Run(PIPELINE_ERROR_DECODE); |
| return; |
| } |
| @@ -50,24 +49,8 @@ void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream, |
| // TODO(scherkus): this check should go in PipelineImpl prior to creating |
| // decoder objects. |
| if (!config.IsValidConfig()) { |
| - DLOG(ERROR) << "Invalid video stream -" |
| - << " codec: " << config.codec() |
| - << " format: " << config.format() |
| - << " coded size: [" << config.coded_size().width() |
| - << "," << config.coded_size().height() << "]" |
| - << " visible rect: [" << config.visible_rect().x() |
| - << "," << config.visible_rect().y() |
| - << "," << config.visible_rect().width() |
| - << "," << config.visible_rect().height() << "]" |
| - << " natural size: [" << config.natural_size().width() |
| - << "," << config.natural_size().height() << "]" |
| - << " frame rate: " << config.frame_rate_numerator() |
| - << "/" << config.frame_rate_denominator() |
| - << " aspect ratio: " << config.aspect_ratio_numerator() |
| - << "/" << config.aspect_ratio_denominator(); |
| - |
| - host()->SetError(PIPELINE_ERROR_DECODE); |
| - callback.Run(); |
| + DLOG(ERROR) << "Invalid video stream - " << config.AsHumanReadableString(); |
| + callback.Run(PIPELINE_ERROR_DECODE); |
| return; |
| } |
| @@ -75,13 +58,12 @@ void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream, |
| natural_size_ = config.natural_size(); |
| if (!decode_engine_->Initialize(config)) { |
| - host()->SetError(PIPELINE_ERROR_DECODE); |
| - callback.Run(); |
| + callback.Run(PIPELINE_ERROR_DECODE); |
| return; |
| } |
| state_ = kNormal; |
| - callback.Run(); |
| + callback.Run(PIPELINE_OK); |
| } |
| void FFmpegVideoDecoder::Stop(const base::Closure& callback) { |