diff options
author | xhwang <xhwang@chromium.org> | 2015-04-03 16:32:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-03 23:32:53 +0000 |
commit | 6722b60e3cd0ceab83259af9d5e2a2f56c7654f6 (patch) | |
tree | 3a7564556be0caaab5ee1128aeef34f13822c886 /components/cdm | |
parent | 0d4c89148c0f10a518805aea0d8c6c70bd490900 (diff) | |
download | chromium_src-6722b60e3cd0ceab83259af9d5e2a2f56c7654f6.zip chromium_src-6722b60e3cd0ceab83259af9d5e2a2f56c7654f6.tar.gz chromium_src-6722b60e3cd0ceab83259af9d5e2a2f56c7654f6.tar.bz2 |
encrypted media: Persistent state is always enabled on Android.
We are using MediaDrm API on Android and we cannot guarantee that API doesn't use persistent storage on the device. Therefore always set persistent state to EME_FEATURE_ALWAYS_ENABLED to err on the safe side.
Also change NOTREACHED() in MediaPlayerAndroid::SetCdm() to LOG(ERROR) because it's actually reachable if we use SRC + EME.
Review URL: https://codereview.chromium.org/1060713004
Cr-Commit-Position: refs/heads/master@{#323847}
Diffstat (limited to 'components/cdm')
-rw-r--r-- | components/cdm/renderer/android_key_systems.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/components/cdm/renderer/android_key_systems.cc b/components/cdm/renderer/android_key_systems.cc index e1538ba..8076a2a 100644 --- a/components/cdm/renderer/android_key_systems.cc +++ b/components/cdm/renderer/android_key_systems.cc @@ -59,6 +59,11 @@ void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems, max_audio_robustness = EmeRobustness::HW_SECURE_CRYPTO; max_video_robustness = EmeRobustness::HW_SECURE_ALL; } + + // We are using MediaDrm API on Android and we cannot guarantee that API + // doesn't use persistent storage on the device. Therefore always set + // persistent state to EME_FEATURE_ALWAYS_ENABLED to err on the safe side. + if (codecs != media::EME_CODEC_NONE) { AddWidevineWithCodecs( WIDEVINE, @@ -67,7 +72,7 @@ void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems, max_video_robustness, 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, // Persistent state. media::EME_FEATURE_ALWAYS_ENABLED, // Distinctive identifier. concrete_key_systems); } @@ -85,7 +90,7 @@ void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems, EmeRobustness::HW_SECURE_ALL, // Max video robustness. 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, // Persistent state. media::EME_FEATURE_ALWAYS_ENABLED, // Distinctive identifier. concrete_key_systems); } |