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

Unified Diff: media/filters/decoder_selector.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/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 44630010669a608f05243e1f1ca3a984ac7fb98b..555a411bd760f97253bbe7a64e92637aea4a06d3 100644
--- a/media/filters/decoder_selector.cc
+++ b/media/filters/decoder_selector.cc
@@ -119,11 +119,12 @@
}
template <DemuxerStream::Type StreamType>
-void DecoderSelector<StreamType>::DecryptingDecoderInitDone(bool success) {
- DVLOG(2) << __FUNCTION__;
- DCHECK(task_runner_->BelongsToCurrentThread());
-
- if (success) {
+void DecoderSelector<StreamType>::DecryptingDecoderInitDone(
+ PipelineStatus status) {
+ DVLOG(2) << __FUNCTION__;
+ DCHECK(task_runner_->BelongsToCurrentThread());
+
+ if (status == PIPELINE_OK) {
base::ResetAndReturn(&select_decoder_cb_)
.Run(decoder_.Pass(), scoped_ptr<DecryptingDemuxerStream>());
return;
@@ -178,11 +179,11 @@
}
template <DemuxerStream::Type StreamType>
-void DecoderSelector<StreamType>::DecoderInitDone(bool success) {
- DVLOG(2) << __FUNCTION__;
- DCHECK(task_runner_->BelongsToCurrentThread());
-
- if (!success) {
+void DecoderSelector<StreamType>::DecoderInitDone(PipelineStatus status) {
+ DVLOG(2) << __FUNCTION__;
+ DCHECK(task_runner_->BelongsToCurrentThread());
+
+ if (status != PIPELINE_OK) {
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