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

Unified Diff: media/filters/decoder_selector.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/decoder_selector.h ('k') | media/filters/decoder_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decoder_selector.cc
diff --git a/media/filters/decoder_selector.cc b/media/filters/decoder_selector.cc
index 555a411bd760f97253bbe7a64e92637aea4a06d3..44630010669a608f05243e1f1ca3a984ac7fb98b 100644
--- a/media/filters/decoder_selector.cc
+++ b/media/filters/decoder_selector.cc
@@ -119,12 +119,11 @@ void DecoderSelector<StreamType>::SelectDecoder(
}
template <DemuxerStream::Type StreamType>
-void DecoderSelector<StreamType>::DecryptingDecoderInitDone(
- PipelineStatus status) {
+void DecoderSelector<StreamType>::DecryptingDecoderInitDone(bool success) {
DVLOG(2) << __FUNCTION__;
DCHECK(task_runner_->BelongsToCurrentThread());
- if (status == PIPELINE_OK) {
+ if (success) {
base::ResetAndReturn(&select_decoder_cb_)
.Run(decoder_.Pass(), scoped_ptr<DecryptingDemuxerStream>());
return;
@@ -179,11 +178,11 @@ void DecoderSelector<StreamType>::InitializeDecoder() {
}
template <DemuxerStream::Type StreamType>
-void DecoderSelector<StreamType>::DecoderInitDone(PipelineStatus status) {
+void DecoderSelector<StreamType>::DecoderInitDone(bool success) {
DVLOG(2) << __FUNCTION__;
DCHECK(task_runner_->BelongsToCurrentThread());
- if (status != PIPELINE_OK) {
+ if (!success) {
decoder_.reset();
InitializeDecoder();
return;
« no previous file with comments | « media/filters/decoder_selector.h ('k') | media/filters/decoder_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698