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

Unified Diff: media/filters/decoder_selector.cc

Issue 297553002: Add callback in VideoDecoder and AudioDecoder to return decoded frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 fa12c17eea569e7f0338212fff60cf95e1489162..9020597798d98d74c8933af28271b8b091c2d6c2 100644
--- a/media/filters/decoder_selector.cc
+++ b/media/filters/decoder_selector.cc
@@ -69,7 +69,8 @@ template <DemuxerStream::Type StreamType>
void DecoderSelector<StreamType>::SelectDecoder(
DemuxerStream* stream,
bool low_delay,
- const SelectDecoderCB& select_decoder_cb) {
+ const SelectDecoderCB& select_decoder_cb,
+ const typename Decoder::OutputCB& output_cb) {
DVLOG(2) << __FUNCTION__;
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(stream);
@@ -85,6 +86,7 @@ void DecoderSelector<StreamType>::SelectDecoder(
input_stream_ = stream;
low_delay_ = low_delay;
+ output_cb_ = output_cb;
if (!IsStreamEncrypted(input_stream_)) {
InitializeDecoder();
@@ -105,7 +107,8 @@ void DecoderSelector<StreamType>::SelectDecoder(
StreamTraits::GetDecoderConfig(*input_stream_),
low_delay_,
base::Bind(&DecoderSelector<StreamType>::DecryptingDecoderInitDone,
- weak_ptr_factory_.GetWeakPtr()));
+ weak_ptr_factory_.GetWeakPtr()),
+ output_cb_);
}
template <DemuxerStream::Type StreamType>
@@ -200,7 +203,8 @@ void DecoderSelector<StreamType>::InitializeDecoder() {
StreamTraits::GetDecoderConfig(*input_stream_),
low_delay_,
base::Bind(&DecoderSelector<StreamType>::DecoderInitDone,
- weak_ptr_factory_.GetWeakPtr()));
+ weak_ptr_factory_.GetWeakPtr()),
+ output_cb_);
}
template <DemuxerStream::Type StreamType>
« 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