Chromium Code Reviews| 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 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "media/base/eme_constants.h" | |
| 12 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
| 13 | 14 |
| 14 namespace media { | 15 namespace media { |
| 15 | 16 |
| 16 // Prefixed EME API only supports prefixed (webkit-) key system name for | 17 // Prefixed EME API only supports prefixed (webkit-) key system name for |
| 17 // certain key systems. But internally only unprefixed key systems are | 18 // certain key systems. But internally only unprefixed key systems are |
| 18 // supported. The following two functions help convert between prefixed and | 19 // supported. The following two functions help convert between prefixed and |
| 19 // unprefixed key system names. | 20 // unprefixed key system names. |
| 20 | 21 |
| 21 // Gets the unprefixed key system name for |key_system|. | 22 // Gets the unprefixed key system name for |key_system|. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 // 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|. |
| 78 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); | 79 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); |
| 79 | 80 |
| 80 #if defined(ENABLE_PEPPER_CDMS) | 81 #if defined(ENABLE_PEPPER_CDMS) |
| 81 // Returns the Pepper MIME type for |concrete_key_system|. | 82 // Returns the Pepper MIME type for |concrete_key_system|. |
| 82 // 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. |
| 83 MEDIA_EXPORT std::string GetPepperType( | 84 MEDIA_EXPORT std::string GetPepperType( |
| 84 const std::string& concrete_key_system); | 85 const std::string& concrete_key_system); |
| 85 #endif | 86 #endif |
| 86 | 87 |
| 88 // Returns whether |key_system| supports persistent-license sessions. | |
| 89 MEDIA_EXPORT bool IsPersistentLicenseSupported( | |
|
ddorwin
2015/02/19 01:41:34
...SessionSupported
sandersd (OOO until July 31)
2015/02/19 21:08:35
Done.
| |
| 90 const std::string& key_system, | |
| 91 bool permission_granted); | |
|
ddorwin
2015/02/19 01:41:34
nit: is_...
sandersd (OOO until July 31)
2015/02/19 21:08:35
Done.
| |
| 92 | |
| 93 // Returns whether |key_system| supports persistent-release-message sessions. | |
| 94 MEDIA_EXPORT bool IsPersistentReleaseMessageSupported( | |
| 95 const std::string& key_system, | |
| 96 bool permission_granted); | |
| 97 | |
| 98 // Returns whether |key_system| supports persistent state as requested. | |
| 99 MEDIA_EXPORT bool IsPersistentStateSupported( | |
|
ddorwin
2015/02/19 01:41:34
IsCompatibleWithPersistentStateRequirement?
(The
sandersd (OOO until July 31)
2015/02/19 21:08:35
Done.
| |
| 100 const std::string& key_system, | |
| 101 EmeFeatureRequirement requirement, | |
| 102 bool permission_granted); | |
| 103 | |
| 104 // Returns whether |key_system| supports distinctive identifiers as requested. | |
| 105 MEDIA_EXPORT bool IsDistinctiveIdentifierSupported( | |
| 106 const std::string& key_system, | |
| 107 EmeFeatureRequirement requirement, | |
| 108 bool permission_granted); | |
| 109 | |
| 87 #if defined(UNIT_TEST) | 110 #if defined(UNIT_TEST) |
| 88 // Helper functions to add container/codec types for testing purposes. | 111 // Helper functions to add container/codec types for testing purposes. |
| 89 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); | 112 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); |
| 90 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask); | 113 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask); |
| 91 #endif // defined(UNIT_TEST) | 114 #endif // defined(UNIT_TEST) |
| 92 | 115 |
| 93 } // namespace media | 116 } // namespace media |
| 94 | 117 |
| 95 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ | 118 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ |
| OLD | NEW |