OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_BASE_KEY_SYSTEMS_H_ | 5 #ifndef MEDIA_BASE_KEY_SYSTEMS_H_ |
6 #define MEDIA_BASE_KEY_SYSTEMS_H_ | 6 #define MEDIA_BASE_KEY_SYSTEMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 // Returns whether AesDecryptor can be used for the given |concrete_key_system|. | 78 // Returns whether AesDecryptor can be used for the given |concrete_key_system|. |
79 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); | 79 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); |
80 | 80 |
81 #if defined(ENABLE_PEPPER_CDMS) | 81 #if defined(ENABLE_PEPPER_CDMS) |
82 // Returns the Pepper MIME type for |concrete_key_system|. | 82 // Returns the Pepper MIME type for |concrete_key_system|. |
83 // Returns empty string if |concrete_key_system| is unknown or not Pepper-based. | 83 // Returns empty string if |concrete_key_system| is unknown or not Pepper-based. |
84 MEDIA_EXPORT std::string GetPepperType( | 84 MEDIA_EXPORT std::string GetPepperType( |
85 const std::string& concrete_key_system); | 85 const std::string& concrete_key_system); |
86 #endif | 86 #endif |
87 | 87 |
88 // Returns whether |key_system| supports persistent-license sessions. | 88 // Returns the configuration rule for supporting a robustness requirement. |
ddorwin
2015/03/18 01:08:04
s/rule/option/ like the comments in the definition
sandersd (OOO until July 31)
2015/03/18 20:41:37
(media_type, robustness) is the option, the condit
| |
89 MEDIA_EXPORT bool IsPersistentLicenseSessionSupported( | 89 // TODO(sandersd): Also take a list of codecs, as they may affect the result. |
90 MEDIA_EXPORT EmeConfigRule GetRobustnessConfigRule( | |
90 const std::string& key_system, | 91 const std::string& key_system, |
91 bool is_permission_granted); | 92 EmeMediaType media_type, |
93 EmeRobustness robustness); | |
92 | 94 |
93 // Returns whether |key_system| supports persistent-release-message sessions. | 95 // Returns the configuration rule for supporting persistent-license sessions. |
94 MEDIA_EXPORT bool IsPersistentReleaseMessageSessionSupported( | 96 MEDIA_EXPORT EmeConfigRule GetPersistentLicenseSessionConfigRule( |
97 const std::string& key_system); | |
98 | |
99 // Returns the configuration rule for supporting persistent-release-message | |
100 // sessions. | |
101 MEDIA_EXPORT EmeConfigRule GetPersistentReleaseMessageSessionConfigRule( | |
102 const std::string& key_system); | |
103 | |
104 // Returns the configuration rule for supporting a persistent state requirement. | |
105 MEDIA_EXPORT EmeConfigRule GetPersistentStateConfigRule( | |
95 const std::string& key_system, | 106 const std::string& key_system, |
96 bool is_permission_granted); | 107 EmeFeatureRequirement requirement); |
97 | 108 |
98 // Returns whether |key_system| supports persistent state as requested. | 109 // Returns the configuration rule for supporting a distinctive identifier |
99 MEDIA_EXPORT bool IsPersistentStateRequirementSupported( | 110 // requirement. |
111 MEDIA_EXPORT EmeConfigRule GetDistinctiveIdentifierConfigRule( | |
100 const std::string& key_system, | 112 const std::string& key_system, |
101 EmeFeatureRequirement requirement, | 113 EmeFeatureRequirement requirement); |
102 bool is_permission_granted); | |
103 | |
104 // Returns whether |key_system| supports distinctive identifiers as requested. | |
105 MEDIA_EXPORT bool IsDistinctiveIdentifierRequirementSupported( | |
106 const std::string& key_system, | |
107 EmeFeatureRequirement requirement, | |
108 bool is_permission_granted); | |
109 | 114 |
110 #if defined(UNIT_TEST) | 115 #if defined(UNIT_TEST) |
111 // Helper functions to add container/codec types for testing purposes. | 116 // Helper functions to add container/codec types for testing purposes. |
112 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); | 117 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); |
113 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask); | 118 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask); |
114 #endif // defined(UNIT_TEST) | 119 #endif // defined(UNIT_TEST) |
115 | 120 |
116 } // namespace media | 121 } // namespace media |
117 | 122 |
118 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ | 123 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ |
OLD | NEW |