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

Unified Diff: components/cdm/renderer/widevine_key_system_properties.h

Issue 2006113002: Allow hw secured codecs on chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New flag, new key system property Created 4 years, 7 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
Index: components/cdm/renderer/widevine_key_system_properties.h
diff --git a/components/cdm/renderer/widevine_key_system_properties.h b/components/cdm/renderer/widevine_key_system_properties.h
index c936c62730d09fcb1b28900eb1434ca887534bc5..2411844be090f6aa06df3cc3a8c1c98ced6a5cf2 100644
--- a/components/cdm/renderer/widevine_key_system_properties.h
+++ b/components/cdm/renderer/widevine_key_system_properties.h
@@ -7,6 +7,7 @@
#include "build/build_config.h"
#include "media/base/key_system_properties.h"
+#include "media/media_features.h"
namespace cdm {
@@ -15,9 +16,9 @@ class WidevineKeySystemProperties : public media::KeySystemProperties {
public:
WidevineKeySystemProperties(
media::SupportedCodecs supported_codecs,
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ENABLE_HW_SECURE_CODEC)
media::SupportedCodecs supported_secure_codecs,
-#endif // defined(OS_ANDROID)
+#endif // BUILDFLAG(ENABLE_HW_SECURE_CODEC)
media::EmeRobustness max_audio_robustness,
media::EmeRobustness max_video_robustness,
media::EmeSessionTypeSupport persistent_license_support,
@@ -30,9 +31,9 @@ class WidevineKeySystemProperties : public media::KeySystemProperties {
media::EmeInitDataType init_data_type) const override;
media::SupportedCodecs GetSupportedCodecs() const override;
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ENABLE_HW_SECURE_CODEC)
media::SupportedCodecs GetSupportedSecureCodecs() const override;
-#endif
+#endif // BUILDFLAG(ENABLE_HW_SECURE_CODEC)
media::EmeConfigRule GetRobustnessConfigRule(
media::EmeMediaType media_type,
@@ -48,11 +49,14 @@ class WidevineKeySystemProperties : public media::KeySystemProperties {
std::string GetPepperType() const override;
#endif
+ protected:
+ static media::EmeRobustness ConvertRobustness(const std::string& robustness);
+
private:
const media::SupportedCodecs supported_codecs_;
-#if defined(OS_ANDROID)
+#if BUILDFLAG(ENABLE_HW_SECURE_CODEC)
const media::SupportedCodecs supported_secure_codecs_;
-#endif // defined(OS_ANDROID)
+#endif // BUILDFLAG(ENABLE_HW_SECURE_CODEC)
const media::EmeRobustness max_audio_robustness_;
const media::EmeRobustness max_video_robustness_;
const media::EmeSessionTypeSupport persistent_license_support_;

Powered by Google App Engine
This is Rietveld 408576698