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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 1143223007: media: Reland "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 01338c3820c42e3028c0617789d0d573acc49de6..26b60fa55d749496b122c827963a07eb19cb3ca2 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -209,15 +209,17 @@ std::string VpxVideoDecoder::GetDisplayName() const {
void VpxVideoDecoder::Initialize(const VideoDecoderConfig& config,
bool low_delay,
- const PipelineStatusCB& status_cb,
+ const InitCB& init_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)) {
- status_cb.Run(DECODER_ERROR_NOT_SUPPORTED);
+ bound_init_cb.Run(false);
return;
}
@@ -225,7 +227,7 @@ void VpxVideoDecoder::Initialize(const VideoDecoderConfig& config,
config_ = config;
state_ = kNormal;
output_cb_ = BindToCurrentLoop(output_cb);
- status_cb.Run(PIPELINE_OK);
+ bound_init_cb.Run(true);
}
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