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

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: 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..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,
« 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