Chromium Code Reviews| Index: content/common/gpu/media/android_video_decode_accelerator.h |
| diff --git a/content/common/gpu/media/android_video_decode_accelerator.h b/content/common/gpu/media/android_video_decode_accelerator.h |
| index 2e8058af4600187c6df9e2cc83f2738af18cd54f..d830c70d36044762bec2c1585465ad43e54c6798 100644 |
| --- a/content/common/gpu/media/android_video_decode_accelerator.h |
| +++ b/content/common/gpu/media/android_video_decode_accelerator.h |
| @@ -18,6 +18,8 @@ |
| #include "content/common/gpu/media/avda_state_provider.h" |
| #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| #include "media/base/android/media_codec_bridge.h" |
| +#include "media/base/android/media_drm_bridge.h" |
| +#include "media/base/media_keys.h" |
| #include "media/video/video_decode_accelerator.h" |
| namespace gfx { |
| @@ -147,6 +149,13 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator |
| // Requests picture buffers from the client. |
| void RequestPictureBuffers(); |
| + // This callback is called after CDM obtained a MediaCrypto object. |
| + void OnCdmMediaCryptoReady(media::MediaDrmBridge::JavaObjectPtr media_crypto, |
| + bool needs_protected_surface); |
| + |
| + // This callback is called when a new key is added to CDM. |
| + void OnCdmKeyAdded(); |
|
xhwang
2015/12/04 20:22:03
OnKeyAdded() to be consistent with other places:
Tima Vaisburd
2015/12/04 22:54:51
Done.
|
| + |
| // Notifies the client of the CDM setting result. |
| void NotifyCdmAttached(bool success); |
| @@ -236,6 +245,19 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator |
| // Backing strategy that we'll use to connect PictureBuffers to frames. |
| scoped_ptr<BackingStrategy> strategy_; |
| + // CDM related stuff. |
| + |
| + // Holds a ref-count to the CDM. |
| + scoped_refptr<media::MediaKeys> cdm_; |
| + |
| + // MediaDrmBridge requires registration/unregistration of the player, this |
| + // registration id is used for this. |
| + int cdm_registration_id_; |
| + |
| + // The MediaCrypto object is used in the MediaCodec.configure() in case of |
| + // an encrypted stream. |
| + media::MediaDrmBridge::JavaObjectPtr media_crypto_; |
| + |
| // WeakPtrFactory for posting tasks back to |this|. |
| base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |