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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 1146913008: Revert of media: Simplify {Audio|Video}Decoder initialization callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/vpx_video_decoder.h ('k') | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index 26b60fa55d749496b122c827963a07eb19cb3ca2..01338c3820c42e3028c0617789d0d573acc49de6 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -209,17 +209,15 @@
void VpxVideoDecoder::Initialize(const VideoDecoderConfig& config,
bool low_delay,
- const InitCB& init_cb,
+ const PipelineStatusCB& status_cb,
const OutputCB& output_cb) {
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(config.IsValidConfig());
DCHECK(!config.is_encrypted());
DCHECK(decode_cb_.is_null());
- InitCB bound_init_cb = BindToCurrentLoop(init_cb);
-
if (!ConfigureDecoder(config)) {
- bound_init_cb.Run(false);
+ status_cb.Run(DECODER_ERROR_NOT_SUPPORTED);
return;
}
@@ -227,7 +225,7 @@
config_ = config;
state_ = kNormal;
output_cb_ = BindToCurrentLoop(output_cb);
- bound_init_cb.Run(true);
+ status_cb.Run(PIPELINE_OK);
}
static vpx_codec_ctx* InitializeVpxContext(vpx_codec_ctx* context,
« no previous file with comments | « media/filters/vpx_video_decoder.h ('k') | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698