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

Unified Diff: media/base/key_systems.cc

Issue 1586043003: media: Require HW_SECURE_CODECS for other key systems on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/key_systems.cc
diff --git a/media/base/key_systems.cc b/media/base/key_systems.cc
index 78a1904609733808d5c3db979646f899bfd61165..6c2c8c2db31312b7074a4cc816a4ce3f9fb1a765 100644
--- a/media/base/key_systems.cc
+++ b/media/base/key_systems.cc
@@ -783,8 +783,8 @@ EmeConfigRule KeySystemsImpl::GetRobustnessConfigRule(
return EmeConfigRule::NOT_SUPPORTED;
}
- if (key_system == kWidevineKeySystem) {
#if defined(OS_CHROMEOS)
+ if (key_system == kWidevineKeySystem) {
// TODO(ddorwin): Remove this once we have confirmed it is not necessary.
// See https://crbug.com/482277
if (robustness == EmeRobustness::EMPTY)
@@ -802,11 +802,16 @@ EmeConfigRule KeySystemsImpl::GetRobustnessConfigRule(
max_robustness == EmeRobustness::HW_SECURE_ALL) {
return EmeConfigRule::IDENTIFIER_RECOMMENDED;
}
+ }
#elif defined(OS_ANDROID)
- if (robustness > EmeRobustness::SW_SECURE_CRYPTO)
- return EmeConfigRule::HW_SECURE_CODECS_REQUIRED;
-#endif // defined(OS_CHROMEOS)
+ // Require hardware secure codecs for Widevine when SW_SECURE_DECODE or above
+ // is specified, or for all other key systems (excluding Clear Key).
+ if ((key_system == kWidevineKeySystem &&
+ robustness >= EmeRobustness::SW_SECURE_DECODE) ||
xhwang 2016/01/15 01:19:04 I changed this to be >= which I think is more expl
ddorwin 2016/01/15 01:32:06 Agreed.
+ !IsClearKey(key_system)) {
+ return EmeConfigRule::HW_SECURE_CODECS_REQUIRED;
}
+#endif // defined(OS_CHROMEOS)
return EmeConfigRule::SUPPORTED;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698