Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: components/cdm/renderer/android_key_systems.cc

Issue 1005903003: Implement robustness strings in requestMediaKeySystemAccess(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename all the things. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/eme_constants.h » ('j') | media/base/eme_constants.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cdm/renderer/android_key_systems.cc
diff --git a/components/cdm/renderer/android_key_systems.cc b/components/cdm/renderer/android_key_systems.cc
index d1e0f2ad7f4955fdb8b8f40fff829a3fc06eb6ea..81c3b637250faf23b78f788a63f029915001505b 100644
--- a/components/cdm/renderer/android_key_systems.cc
+++ b/components/cdm/renderer/android_key_systems.cc
@@ -39,10 +39,22 @@ static SupportedKeySystemResponse QueryKeySystemSupport(
void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems) {
SupportedKeySystemResponse response = QueryKeySystemSupport(
kWidevineKeySystem);
- if (response.compositing_codecs != media::EME_CODEC_NONE) {
+
+ // When creating the WIDEVINE key system, BrowserCdmFactoryAndroid configures
+ // the CDM's security level based on the --mediadrm-enable-non-compositing
+ // flag (L1 if the flag is enabled, L3 otherwise). Therefore the supported
+ // codec/robustenss combinations depend on that flag.
+ // TODO(sandersd): For unprefixed, set the security level based on the
+ // requested robustness instead of the flag. http://crbug.com/459400
ddorwin 2015/03/16 23:25:08 That's probably not exactly this bug.
sandersd (OOO until July 31) 2015/03/17 22:10:38 Done.
+ SupportedCodecs codecs = response.compositing_codecs;
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
ddorwin 2015/03/16 23:25:08 My point was that we might want to use if (respons
sandersd (OOO until July 31) 2015/03/17 22:10:38 Unfortunately the com.widevine.alpha key system ma
ddorwin 2015/03/18 01:08:04 Oh. :( Thanks.
+ switches::kMediaDrmEnableNonCompositing)) {
+ codecs = response.non_compositing_codecs;
+ }
+ if (codecs != media::EME_CODEC_NONE) {
AddWidevineWithCodecs(
WIDEVINE,
- static_cast<SupportedCodecs>(response.compositing_codecs),
+ 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.
@@ -50,11 +62,15 @@ void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems) {
concrete_key_systems);
}
+ // For compatibility with the prefixed API, register a separate L1 key system.
+ // When creating the WIDEVINE_HR_NON_COMPOSITING key system,
+ // BrowserCdmFactoryAndroid does not configure the CDM's security level (that
+ // is, leaves it as L1); therefore only secure codecs are supported.
+ // TODO(ddorwin): Remove with unprefixed. http://crbug.com/249976
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),
+ 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.
« no previous file with comments | « no previous file | media/base/eme_constants.h » ('j') | media/base/eme_constants.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698