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

Unified Diff: media/filters/decoder_selector.cc

Issue 1954633002: MEDIA_LOG for large encoded timestamp gaps in decoder stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 cd4ac28d3695c0bf86845caf2fb36b4803710bdb..eeb318009eb16717c38cdac3aa7502fea7df7a9b 100644
--- a/media/filters/decoder_selector.cc
+++ b/media/filters/decoder_selector.cc
@@ -80,6 +80,7 @@ DecoderSelector<StreamType>::~DecoderSelector() {
template <DemuxerStream::Type StreamType>
void DecoderSelector<StreamType>::SelectDecoder(
+ StreamTraits* traits,
DemuxerStream* stream,
CdmContext* cdm_context,
const SelectDecoderCB& select_decoder_cb,
@@ -87,6 +88,7 @@ void DecoderSelector<StreamType>::SelectDecoder(
const base::Closure& waiting_for_decryption_key_cb) {
DVLOG(2) << __FUNCTION__;
DCHECK(task_runner_->BelongsToCurrentThread());
+ DCHECK(traits);
DCHECK(stream);
DCHECK(select_decoder_cb_.is_null());
@@ -102,6 +104,7 @@ void DecoderSelector<StreamType>::SelectDecoder(
return;
}
+ traits_ = traits;
input_stream_ = stream;
output_cb_ = output_cb;
@@ -131,7 +134,7 @@ void DecoderSelector<StreamType>::InitializeDecryptingDecoder() {
decoder_.reset(new typename StreamTraits::DecryptingDecoderType(
task_runner_, media_log_, waiting_for_decryption_key_cb_));
- DecoderStreamTraits<StreamType>::InitializeDecoder(
+ traits_->InitializeDecoder(
decoder_.get(), input_stream_, cdm_context_,
base::Bind(&DecoderSelector<StreamType>::DecryptingDecoderInitDone,
weak_ptr_factory_.GetWeakPtr()),
@@ -204,7 +207,7 @@ void DecoderSelector<StreamType>::InitializeDecoder() {
decoder_.reset(decoders_.front());
decoders_.weak_erase(decoders_.begin());
- DecoderStreamTraits<StreamType>::InitializeDecoder(
+ traits_->InitializeDecoder(
decoder_.get(), input_stream_, cdm_context_,
base::Bind(&DecoderSelector<StreamType>::DecoderInitDone,
weak_ptr_factory_.GetWeakPtr()),
« 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