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

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

Issue 1926533002: Convert Widevine and Android platform key systems to KeySystemProperties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Few small cleanups Created 4 years, 8 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
new file mode 100644
index 0000000000000000000000000000000000000000..601d5430e546cd7ff8b39750b752f399e1b367b9
--- /dev/null
+++ b/components/cdm/renderer/widevine_key_system_properties.h
@@ -0,0 +1,81 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_CDM_RENDERER_WIDEVINE_KEY_SYSTEM_PROPERTIES_H_
+#define COMPONENTS_CDM_RENDERER_WIDEVINE_KEY_SYSTEM_PROPERTIES_H_
+
+#include "media/base/key_system_properties.h"
+
+namespace cdm {
+
+// Implementation of KeySystemProperties for Widevine key system.
+class WidevineKeySystemProperties : public media::KeySystemProperties {
+ public:
+ WidevineKeySystemProperties(
+ media::SupportedCodecs supported_codecs,
+#if defined(OS_ANDROID)
+ media::SupportedCodecs supported_secure_codecs,
+#endif // defined(OS_ANDROID)
+ media::EmeRobustness max_audio_robustness,
+ media::EmeRobustness max_video_robustness,
+ media::EmeSessionTypeSupport persistent_license_support,
+ media::EmeSessionTypeSupport persistent_release_message_support,
+ media::EmeFeatureSupport persistent_state_support,
+ media::EmeFeatureSupport distinctive_identifier_support);
+
+ // Gets the name of this key system.
+ std::string GetKeySystemName() const override;
+
+ // Returns the init data types supported by this key system.
+ bool IsSupportedInitDataType(
+ media::EmeInitDataType init_data_type) const override;
+
+ // Returns the codecs supported by this key system.
+ media::SupportedCodecs GetSupportedCodecs() const override;
+#if defined(OS_ANDROID)
+ // Returns the codecs with hardware-secure support in this key system.
+ media::SupportedCodecs GetSupportedSecureCodecs() const override;
+#endif
+
+ // Returns the configuration rule for supporting a robustness requirement.
+ media::EmeConfigRule GetRobustnessConfigRule(
+ media::EmeMediaType media_type,
+ const std::string& requested_robustness) const override;
+
+ // Returns the support this key system provides for persistent-license
+ // sessions.
+ media::EmeSessionTypeSupport GetPersistentLicenseSessionSupport()
+ const override;
+
+ // Returns the support this key system provides for persistent-release-message
+ // sessions.
+ media::EmeSessionTypeSupport GetPersistentReleaseMessageSessionSupport()
+ const override;
+
+ // Returns the support this key system provides for persistent state.
+ media::EmeFeatureSupport GetPersistentStateSupport() const override;
+
+ // Returns the support this key system provides for distinctive identifiers.
+ media::EmeFeatureSupport GetDistinctiveIdentifierSupport() const override;
+
+#if defined(ENABLE_PEPPER_CDMS)
+ std::string GetPepperType() const override;
+#endif
+
+ private:
+ const media::SupportedCodecs supported_codecs_;
+#if defined(OS_ANDROID)
+ const media::SupportedCodecs supported_secure_codecs_;
+#endif // defined(OS_ANDROID)
+ const media::EmeRobustness max_audio_robustness_;
+ const media::EmeRobustness max_video_robustness_;
+ const media::EmeSessionTypeSupport persistent_license_support_;
+ const media::EmeSessionTypeSupport persistent_release_message_support_;
+ const media::EmeFeatureSupport persistent_state_support_;
+ const media::EmeFeatureSupport distinctive_identifier_support_;
+};
+
+} // namespace cdm
+
+#endif // COMPONENTS_CDM_RENDERER_WIDEVINE_KEY_SYSTEM_PROPERTIES_H_

Powered by Google App Engine
This is Rietveld 408576698