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..2a592c824f283ae1108259a877a9e354aeaba7b5 100644 |
--- a/components/cdm/renderer/android_key_systems.cc |
+++ b/components/cdm/renderer/android_key_systems.cc |
@@ -40,9 +40,21 @@ 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. 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. |
+ SupportedCodecs codecs = |
+ static_cast<SupportedCodecs>(response.compositing_codecs); |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kMediaDrmEnableNonCompositing)) { |
+ codecs = static_cast<SupportedCodecs>(response.non_compositing_codecs); |
ddorwin
2015/03/13 19:24:47
Note: Using non_compositing_codecs here matches th
sandersd (OOO until July 31)
2015/03/13 20:11:56
I rearranged this to make it more correct, but the
|
+ } |
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. |
@@ -51,6 +63,9 @@ void AddAndroidWidevine(std::vector<KeySystemInfo>* concrete_key_systems) { |
} |
if (response.non_compositing_codecs != media::EME_CODEC_NONE) { |
+ // When creating the WIDEVINE_HR_NON_COMPOSITING key system, |
ddorwin
2015/03/13 19:24:47
This is the "L1 key system". It's actually confusi
sandersd (OOO until July 31)
2015/03/13 20:11:56
Turns out we do. Done.
ddorwin
2015/03/16 23:25:07
As I noted, I don't think that bug covers this iss
sandersd (OOO until July 31)
2015/03/17 22:10:37
Acknowledged.
|
+ // BrowserCdmFactoryAndroid does not configure the CDM's security level |
+ // (that is, leaves it as L1). |
// TODO(ddorwin): Remove with unprefixed. http://crbug.com/249976 |
AddWidevineWithCodecs( |
WIDEVINE_HR_NON_COMPOSITING, |