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

Unified Diff: media/filters/decrypting_demuxer_stream.cc

Issue 416333011: Allow setContentDecryptionModule() to get called when setting is done. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + android tweaks Created 6 years, 4 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/decrypting_demuxer_stream.h ('k') | media/filters/decrypting_demuxer_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_demuxer_stream.cc
diff --git a/media/filters/decrypting_demuxer_stream.cc b/media/filters/decrypting_demuxer_stream.cc
index 0f0930eb723ff7d976c4e622c38bd28558ea391e..c4e6b8478380de81a70ee42ac894d376a3cf770a 100644
--- a/media/filters/decrypting_demuxer_stream.cc
+++ b/media/filters/decrypting_demuxer_stream.cc
@@ -160,7 +160,9 @@ DecryptingDemuxerStream::~DecryptingDemuxerStream() {
pending_buffer_to_decrypt_ = NULL;
}
-void DecryptingDemuxerStream::SetDecryptor(Decryptor* decryptor) {
+void DecryptingDemuxerStream::SetDecryptor(
+ Decryptor* decryptor,
+ const DecryptorAttachedCB& decryptor_attached_cb) {
DVLOG(2) << __FUNCTION__;
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK_EQ(state_, kDecryptorRequested) << state_;
@@ -172,6 +174,7 @@ void DecryptingDemuxerStream::SetDecryptor(Decryptor* decryptor) {
if (!decryptor) {
state_ = kUninitialized;
base::ResetAndReturn(&init_cb_).Run(DECODER_ERROR_NOT_SUPPORTED);
+ decryptor_attached_cb.Run(false);
return;
}
@@ -184,6 +187,7 @@ void DecryptingDemuxerStream::SetDecryptor(Decryptor* decryptor) {
state_ = kIdle;
base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK);
+ decryptor_attached_cb.Run(true);
}
void DecryptingDemuxerStream::DecryptBuffer(
« no previous file with comments | « media/filters/decrypting_demuxer_stream.h ('k') | media/filters/decrypting_demuxer_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698