diff options
author | sandersd <sandersd@chromium.org> | 2015-05-05 18:50:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-06 01:52:17 +0000 |
commit | a6bf8b52a70dafe95e8e2d8827f5e1283ec1bf56 (patch) | |
tree | 24fd280efc30617bbdb4802a082dce2ea3a99d8e /chromecast | |
parent | d5538fccee51a36e074196b5f5b846a787559600 (diff) | |
download | chromium_src-a6bf8b52a70dafe95e8e2d8827f5e1283ec1bf56.zip chromium_src-a6bf8b52a70dafe95e8e2d8827f5e1283ec1bf56.tar.gz chromium_src-a6bf8b52a70dafe95e8e2d8827f5e1283ec1bf56.tar.bz2 |
Support Android secure codecs in requestMediaKeySystemAccess().
This adds the bits necessary to determine if a configuration requires hardware-secure codecs. It does not add the logic to actually enable secure surfaces based on the requirement, that decision is still based on the renderer preference.
BUG=467779
Review URL: https://codereview.chromium.org/1106263004
Cr-Commit-Position: refs/heads/master@{#328464}
Diffstat (limited to 'chromecast')
-rw-r--r-- | chromecast/renderer/key_systems_cast.cc | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/chromecast/renderer/key_systems_cast.cc b/chromecast/renderer/key_systems_cast.cc index c9cae76..bede018 100644 --- a/chromecast/renderer/key_systems_cast.cc +++ b/chromecast/renderer/key_systems_cast.cc @@ -14,6 +14,10 @@ #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. +using ::media::EmeFeatureSupport; +using ::media::EmeRobustness; +using ::media::EmeSessionTypeSupport; + namespace chromecast { namespace shell { @@ -40,24 +44,28 @@ void AddKeySystemWithCodecs( void AddChromecastKeySystems( std::vector<::media::KeySystemInfo>* key_systems_info) { #if defined(WIDEVINE_CDM_AVAILABLE) + ::media::SupportedCodecs codecs = + ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1; AddWidevineWithCodecs( - cdm::WIDEVINE, ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1, - ::media::EmeRobustness::HW_SECURE_ALL, // Max audio robustness. - ::media::EmeRobustness::HW_SECURE_ALL, // Max video robustness. - ::media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license. - ::media::EmeSessionTypeSupport:: - NOT_SUPPORTED, // persistent-release-message. + cdm::WIDEVINE, + codecs, // Regular codecs. +#if defined(OS_ANDROID) + codecs, // Hardware-secure codecs. +#endif // defined(OS_ANDROID) + EmeRobustness::HW_SECURE_ALL, // Max audio robustness. + EmeRobustness::HW_SECURE_ALL, // Max video robustness. + EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license. + EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-release-message. // Note: On Chromecast, all CDMs may have persistent state. - ::media::EmeFeatureSupport::ALWAYS_ENABLED, // Persistent state. - ::media::EmeFeatureSupport::ALWAYS_ENABLED, // Distinctive - // identifier. + EmeFeatureSupport::ALWAYS_ENABLED, // Persistent state. + EmeFeatureSupport::ALWAYS_ENABLED, // Distinctive identifier. key_systems_info); -#endif +#endif // defined(WIDEVINE_CDM_AVAILABLE) #if defined(PLAYREADY_CDM_AVAILABLE) AddKeySystemWithCodecs(media::kChromecastPlayreadyKeySystem, key_systems_info); -#endif +#endif // defined(PLAYREADY_CDM_AVAILABLE) } } // namespace shell |