Chromium Code Reviews| Index: content/renderer/media/webmediaplayer_impl.cc |
| diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc |
| index ee637a6879a20a4af3f0f904c8faf60ead91dc80..1f3a140d36e0d2b9474600b7f02e1d3f243c98c2 100644 |
| --- a/content/renderer/media/webmediaplayer_impl.cc |
| +++ b/content/renderer/media/webmediaplayer_impl.cc |
| @@ -50,6 +50,7 @@ |
| #include "media/filters/opus_audio_decoder.h" |
| #include "media/filters/video_renderer_impl.h" |
| #include "media/filters/vpx_video_decoder.h" |
| +#include "third_party/WebKit/public/platform/WebContentDecryptionModule.h" |
| #include "third_party/WebKit/public/platform/WebMediaSource.h" |
| #include "third_party/WebKit/public/platform/WebRect.h" |
| #include "third_party/WebKit/public/platform/WebSize.h" |
| @@ -168,6 +169,10 @@ WebMediaPlayerImpl::WebMediaPlayerImpl( |
| pipeline_.reset(new media::Pipeline(media_loop_, media_log_.get())); |
| + // Grab a copy of the current CDM. This may be updated at any time by calls |
|
ddorwin
2013/12/18 23:47:35
It's not really a copy.
|
| + // to mediaKeysChanged(). |
| + cdm_ = client_->getWebContentDecryptionModule(); |
|
ddorwin
2013/12/18 23:47:35
A WebContentDecryptionModule is not that interesti
ddorwin
2013/12/19 00:26:27
I don't think this is the right time to set cdm_ (
|
| + |
| // |gpu_factories_| requires that its entry points be called on its |
| // |GetMessageLoop()|. Since |pipeline_| will own decoders created from the |
| // factories, require that their message loops are identical. |
| @@ -853,6 +858,11 @@ WebMediaPlayerImpl::CancelKeyRequestInternal( |
| return WebMediaPlayer::MediaKeyExceptionNoError; |
| } |
| +void WebMediaPlayerImpl::mediaKeysChanged( |
| + blink::WebContentDecryptionModule* cdm) { |
| + cdm_ = cdm; |
|
ddorwin
2013/12/18 23:47:35
We need to stop any current uses of the old one (u
|
| +} |
| + |
| void WebMediaPlayerImpl::OnDestruct() { |
| Destroy(); |
| } |