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

Unified Diff: media/filters/decrypting_video_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_video_decoder.cc
diff --git a/media/filters/decrypting_video_decoder.cc b/media/filters/decrypting_video_decoder.cc
index f4aa3756ed8b1c1a0ef1e5092091788c2370d772..68fadd125badc174d8e480006bd0df00644dd6a7 100644
--- a/media/filters/decrypting_video_decoder.cc
+++ b/media/filters/decrypting_video_decoder.cc
@@ -36,10 +36,12 @@ std::string DecryptingVideoDecoder::GetDisplayName() const {
return kDecoderName;
}
-void DecryptingVideoDecoder::Initialize(const VideoDecoderConfig& config,
- bool /* low_delay */,
- const PipelineStatusCB& status_cb,
- const OutputCB& output_cb) {
+void DecryptingVideoDecoder::Initialize(
+ const VideoDecoderConfig& config,
+ bool /* low_delay */,
+ const PipelineStatusCB& status_cb,
+ const OutputCB& output_cb,
+ const base::Closure& waiting_for_encryption_key_cb) {
DVLOG(2) << "Initialize()";
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(state_ == kUninitialized ||
@@ -52,6 +54,7 @@ void DecryptingVideoDecoder::Initialize(const VideoDecoderConfig& config,
init_cb_ = BindToCurrentLoop(status_cb);
output_cb_ = BindToCurrentLoop(output_cb);
+ waiting_for_encryption_key_cb_ = waiting_for_encryption_key_cb;
weak_this_ = weak_factory_.GetWeakPtr();
config_ = config;
@@ -270,6 +273,7 @@ void DecryptingVideoDecoder::DeliverFrame(
}
state_ = kWaitingForKey;
+ waiting_for_encryption_key_cb_.Run();
return;
}

Powered by Google App Engine
This is Rietveld 408576698