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

Unified Diff: media/filters/decrypting_audio_decoder.cc

Issue 935243002: Decryptors can report kNoKey to WebMediaPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: media/filters/decrypting_audio_decoder.cc
diff --git a/media/filters/decrypting_audio_decoder.cc b/media/filters/decrypting_audio_decoder.cc
index 0ca20f7a98b1ea19481c73060602bc4e7358162e..5e6f865b9e064929a6e800fa11574d7be74e9b0c 100644
--- a/media/filters/decrypting_audio_decoder.cc
+++ b/media/filters/decrypting_audio_decoder.cc
@@ -46,9 +46,11 @@ std::string DecryptingAudioDecoder::GetDisplayName() const {
return "DecryptingAudioDecoder";
}
-void DecryptingAudioDecoder::Initialize(const AudioDecoderConfig& config,
- const PipelineStatusCB& status_cb,
- const OutputCB& output_cb) {
+void DecryptingAudioDecoder::Initialize(
+ const AudioDecoderConfig& config,
+ const PipelineStatusCB& status_cb,
+ const OutputCB& output_cb,
+ const base::Closure& waiting_for_encryption_key_cb) {
DVLOG(2) << "Initialize()";
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(decode_cb_.is_null());
@@ -57,6 +59,7 @@ void DecryptingAudioDecoder::Initialize(const AudioDecoderConfig& config,
weak_this_ = weak_factory_.GetWeakPtr();
init_cb_ = BindToCurrentLoop(status_cb);
output_cb_ = BindToCurrentLoop(output_cb);
+ waiting_for_encryption_key_cb_ = waiting_for_encryption_key_cb;
if (!config.IsValidConfig()) {
DLOG(ERROR) << "Invalid audio stream config.";
@@ -288,6 +291,7 @@ void DecryptingAudioDecoder::DeliverFrame(
}
state_ = kWaitingForKey;
+ waiting_for_encryption_key_cb_.Run();
return;
}

Powered by Google App Engine
This is Rietveld 408576698