diff options
author | xhwang <xhwang@chromium.org> | 2014-11-25 15:43:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-25 23:44:05 +0000 |
commit | 0ad11e513bdd2d5bea9975015d896cc6b4b40604 (patch) | |
tree | 6183b360a5f65c4cad1586de56896e140b929e65 /media/blink | |
parent | fb4d9decb7b33377d3746df47f3c0a790f757ded (diff) | |
download | chromium_src-0ad11e513bdd2d5bea9975015d896cc6b4b40604.zip chromium_src-0ad11e513bdd2d5bea9975015d896cc6b4b40604.tar.gz chromium_src-0ad11e513bdd2d5bea9975015d896cc6b4b40604.tar.bz2 |
Fix initial CDM setting in WebMediaPlayerImpl.
This was overlooked in my last CL (r305605).
Also updated RendererImpl to explicitly guard against switching CDM at run-time.
This is currently not supported.
BUG=401264,436395
TEST=Layout test passes:
media/encrypted-media/encrypted-media-playback-setmediakeys-before-src.html
Review URL: https://codereview.chromium.org/752113004
Cr-Commit-Position: refs/heads/master@{#305732}
Diffstat (limited to 'media/blink')
-rw-r--r-- | media/blink/webmediaplayer_impl.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc index 56c467d..e5f73f0 100644 --- a/media/blink/webmediaplayer_impl.cc +++ b/media/blink/webmediaplayer_impl.cc @@ -27,6 +27,7 @@ #include "media/audio/null_audio_sink.h" #include "media/base/audio_hardware_config.h" #include "media/base/bind_to_current_loop.h" +#include "media/base/cdm_context.h" #include "media/base/limits.h" #include "media/base/media_log.h" #include "media/base/pipeline.h" @@ -182,6 +183,12 @@ WebMediaPlayerImpl::WebMediaPlayerImpl( media_log_->AddEvent( media_log_->CreateEvent(MediaLogEvent::WEBMEDIAPLAYER_CREATED)); + if (params.initial_cdm()) { + SetCdm( + ToWebContentDecryptionModuleImpl(params.initial_cdm())->GetCdmContext(), + base::Bind(&IgnoreCdmAttached)); + } + // TODO(xhwang): When we use an external Renderer, many methods won't work, // e.g. GetCurrentFrameFromCompositor(). Fix this in a future CL. if (renderer_) |