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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 935243002: Decryptors can report kNoKey to WebMediaPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change + rebase 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
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/filters/audio_decoder_selector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 12839eb06eeceecbc38ef54299c90695a5cd0ae6..cb62c927fe81de25cbbd8c8843a8cd649eb8a664 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -678,6 +678,15 @@ void WebMediaPlayerImpl::OnEncryptedMediaInitData(
base::saturated_cast<unsigned int>(init_data.size()));
}
+void WebMediaPlayerImpl::OnWaitingForDecryptionKey() {
+ client_->didBlockPlaybackWaitingForKey();
+
+ // TODO(jrummell): didResumePlaybackBlockedForKey() should only be called
ddorwin 2015/02/24 01:36:52 Bug? We should probably add a separate one and clo
jrummell 2015/02/25 19:06:39 Done.
+ // when a key has been successfully added (e.g. OnSessionKeysChange() with
+ // |has_additional_usable_key| = true).
+ client_->didResumePlaybackBlockedForKey();
+}
+
void WebMediaPlayerImpl::SetCdm(CdmContext* cdm_context,
const CdmAttachedCB& cdm_attached_cb) {
pipeline_.SetCdm(cdm_context, cdm_attached_cb);
@@ -889,7 +898,8 @@ void WebMediaPlayerImpl::StartPipeline() {
BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnPipelineBufferingStateChanged),
base::Bind(&WebMediaPlayerImpl::FrameReady, base::Unretained(this)),
BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnDurationChanged),
- BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnAddTextTrack));
+ BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnAddTextTrack),
+ BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnWaitingForDecryptionKey));
}
void WebMediaPlayerImpl::SetNetworkState(WebMediaPlayer::NetworkState state) {
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/filters/audio_decoder_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698