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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 // Returns whether AesDecryptor can be used for the given |concrete_key_system|. | 72 // Returns whether AesDecryptor can be used for the given |concrete_key_system|. |
| 72 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); | 73 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); |
| 73 | 74 |
| 74 #if defined(ENABLE_PEPPER_CDMS) | 75 #if defined(ENABLE_PEPPER_CDMS) |
| 75 // Returns the Pepper MIME type for |concrete_key_system|. | 76 // Returns the Pepper MIME type for |concrete_key_system|. |
| 76 // Returns empty string if |concrete_key_system| is unknown or not Pepper-based. | 77 // Returns empty string if |concrete_key_system| is unknown or not Pepper-based. |
| 77 MEDIA_EXPORT std::string GetPepperType( | 78 MEDIA_EXPORT std::string GetPepperType( |
| 78 const std::string& concrete_key_system); | 79 const std::string& concrete_key_system); |
| 79 #endif | 80 #endif |
| 80 | 81 |
| 82 // Returns whether |key_system| supports the specified distinctive identifier | |
| 83 // requirement. | |
| 84 MEDIA_EXPORT bool IsSupportedDistinctiveIdentifierRequirement( | |
|
ddorwin
2015/02/17 22:34:58
We may need to pass more information (is authorize
sandersd (OOO until July 31)
2015/02/18 23:41:18
That's true. I was hoping to skip that for this CL
| |
| 85 const std::string& key_system, | |
| 86 EmeRequirement requirement); | |
|
ddorwin
2015/02/17 22:34:58
In this case, we are passing the requirement from
sandersd (OOO until July 31)
2015/02/18 23:41:18
I've left the conversion outside to avoid infectin
| |
| 87 | |
| 88 // Returns whether |key_system| supports the specified persistent state | |
| 89 // requirement. | |
| 90 MEDIA_EXPORT bool IsSupportedPersistentStateRequirement( | |
| 91 const std::string& key_system, | |
| 92 EmeRequirement requirement); | |
| 93 | |
| 94 // Returns whether |key_system| supports the specified session type. | |
| 95 MEDIA_EXPORT bool IsSupportedSessionType( | |
| 96 const std::string& key_system, | |
| 97 EmeSessionType session_type); | |
| 98 | |
| 81 #if defined(UNIT_TEST) | 99 #if defined(UNIT_TEST) |
| 82 // Helper functions to add container/codec types for testing purposes. | 100 // Helper functions to add container/codec types for testing purposes. |
| 83 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); | 101 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); |
| 84 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask); | 102 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask); |
| 85 #endif // defined(UNIT_TEST) | 103 #endif // defined(UNIT_TEST) |
| 86 | 104 |
| 87 } // namespace media | 105 } // namespace media |
| 88 | 106 |
| 89 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ | 107 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ |
| OLD | NEW |