diff options
Diffstat (limited to 'components/cdm')
-rw-r--r-- | components/cdm/renderer/android_key_systems.cc | 18 | ||||
-rw-r--r-- | components/cdm/renderer/widevine_key_systems.cc | 19 | ||||
-rw-r--r-- | components/cdm/renderer/widevine_key_systems.h | 4 |
3 files changed, 36 insertions, 5 deletions
diff --git a/components/cdm/renderer/android_key_systems.cc b/components/cdm/renderer/android_key_systems.cc index 83a0d04..d1e0f2a 100644 --- a/components/cdm/renderer/android_key_systems.cc +++ b/components/cdm/renderer/android_key_systems.cc @@ -43,13 +43,22 @@ void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems) { AddWidevineWithCodecs( WIDEVINE, static_cast<SupportedCodecs>(response.compositing_codecs), + media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent license. + media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent release message. + media::EME_FEATURE_NOT_SUPPORTED, // Persistent state. + media::EME_FEATURE_ALWAYS_ENABLED, // Distinctive identifier. concrete_key_systems); } if (response.non_compositing_codecs != media::EME_CODEC_NONE) { + // TODO(ddorwin): Remove with unprefixed. http://crbug.com/249976 AddWidevineWithCodecs( WIDEVINE_HR_NON_COMPOSITING, static_cast<SupportedCodecs>(response.non_compositing_codecs), + media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent license. + media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent release message. + media::EME_FEATURE_NOT_SUPPORTED, // Persistent state. + media::EME_FEATURE_ALWAYS_ENABLED, // Distinctive identifier. concrete_key_systems); } } @@ -64,7 +73,8 @@ void AddAndroidPlatformKeySystems( it != key_system_names.end(); ++it) { SupportedKeySystemResponse response = QueryKeySystemSupport(*it); if (response.compositing_codecs != media::EME_CODEC_NONE) { - KeySystemInfo info(*it); + KeySystemInfo info; + info.key_system = *it; info.supported_codecs = response.compositing_codecs; // Here we assume that support for a container implies support for the // associated initialization data type. KeySystems handles validating @@ -75,6 +85,12 @@ void AddAndroidPlatformKeySystems( if (response.compositing_codecs & media::EME_CODEC_MP4_ALL) info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC; #endif // defined(USE_PROPRIETARY_CODECS) + // Assume the worst case (from a user point of view). + info.persistent_license_support = media::EME_SESSION_TYPE_NOT_SUPPORTED; + info.persistent_release_message_support = + media::EME_SESSION_TYPE_NOT_SUPPORTED; + info.persistent_state_support = media::EME_FEATURE_ALWAYS_ENABLED; + info.distinctive_identifier_support = media::EME_FEATURE_ALWAYS_ENABLED; concrete_key_systems->push_back(info); } } diff --git a/components/cdm/renderer/widevine_key_systems.cc b/components/cdm/renderer/widevine_key_systems.cc index f803e8e..037df1b 100644 --- a/components/cdm/renderer/widevine_key_systems.cc +++ b/components/cdm/renderer/widevine_key_systems.cc @@ -26,10 +26,16 @@ static std::string GetDirectParentName(std::string name) { return name.substr(0u, last_period); } -void AddWidevineWithCodecs(WidevineCdmType widevine_cdm_type, - SupportedCodecs supported_codecs, - std::vector<KeySystemInfo>* concrete_key_systems) { - KeySystemInfo info(kWidevineKeySystem); +void AddWidevineWithCodecs( + WidevineCdmType widevine_cdm_type, + SupportedCodecs supported_codecs, + media::EmeSessionTypeSupport persistent_license_support, + media::EmeSessionTypeSupport persistent_release_message_support, + media::EmeFeatureSupport persistent_state_support, + media::EmeFeatureSupport distinctive_identifier_support, + std::vector<KeySystemInfo>* concrete_key_systems) { + KeySystemInfo info; + info.key_system = kWidevineKeySystem; switch (widevine_cdm_type) { case WIDEVINE: @@ -60,6 +66,11 @@ void AddWidevineWithCodecs(WidevineCdmType widevine_cdm_type, info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC; #endif // defined(USE_PROPRIETARY_CODECS) + info.persistent_license_support = persistent_license_support; + info.persistent_release_message_support = persistent_release_message_support; + info.persistent_state_support = persistent_state_support; + info.distinctive_identifier_support = distinctive_identifier_support; + #if defined(ENABLE_PEPPER_CDMS) info.pepper_type = kWidevineCdmPluginMimeType; #endif // defined(ENABLE_PEPPER_CDMS) diff --git a/components/cdm/renderer/widevine_key_systems.h b/components/cdm/renderer/widevine_key_systems.h index 1d42b3b..15c55da 100644 --- a/components/cdm/renderer/widevine_key_systems.h +++ b/components/cdm/renderer/widevine_key_systems.h @@ -22,6 +22,10 @@ enum WidevineCdmType { void AddWidevineWithCodecs( WidevineCdmType widevine_cdm_type, media::SupportedCodecs supported_codecs, + media::EmeSessionTypeSupport persistent_license_support, + media::EmeSessionTypeSupport persistent_release_message_support, + media::EmeFeatureSupport persistent_state_support, + media::EmeFeatureSupport distinctive_identifier_support, std::vector<media::KeySystemInfo>* concrete_key_systems); } // namespace cdm |