| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "media/base/eme_constants.h" | 13 #include "media/base/eme_constants.h" |
| 14 #include "media/base/media_export.h" | 14 #include "media/base/media_export.h" |
| 15 #include "ppapi/features/features.h" | |
| 16 | 15 |
| 17 namespace media { | 16 namespace media { |
| 18 | 17 |
| 19 // Provides an interface for querying registered key systems. | 18 // Provides an interface for querying registered key systems. |
| 20 // | 19 // |
| 21 // Many of the original static methods are still available, they should be | 20 // Many of the original static methods are still available, they should be |
| 22 // migrated into this interface over time (or removed). | 21 // migrated into this interface over time (or removed). |
| 23 // | 22 // |
| 24 // TODO(sandersd): Provide GetKeySystem() so that it is not necessary to pass | 23 // TODO(sandersd): Provide GetKeySystem() so that it is not necessary to pass |
| 25 // |key_system| to every method. http://crbug.com/457438 | 24 // |key_system| to every method. http://crbug.com/457438 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 MEDIA_EXPORT bool IsSupportedKeySystemWithInitDataType( | 75 MEDIA_EXPORT bool IsSupportedKeySystemWithInitDataType( |
| 77 const std::string& key_system, | 76 const std::string& key_system, |
| 78 EmeInitDataType init_data_type); | 77 EmeInitDataType init_data_type); |
| 79 | 78 |
| 80 // Returns a name for |key_system| suitable to UMA logging. | 79 // Returns a name for |key_system| suitable to UMA logging. |
| 81 MEDIA_EXPORT std::string GetKeySystemNameForUMA(const std::string& key_system); | 80 MEDIA_EXPORT std::string GetKeySystemNameForUMA(const std::string& key_system); |
| 82 | 81 |
| 83 // Returns whether AesDecryptor can be used for the given |key_system|. | 82 // Returns whether AesDecryptor can be used for the given |key_system|. |
| 84 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& key_system); | 83 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& key_system); |
| 85 | 84 |
| 86 #if BUILDFLAG(ENABLE_PEPPER_CDMS) | 85 #if defined(ENABLE_PEPPER_CDMS) |
| 87 // Returns the Pepper MIME type for |key_system|. | 86 // Returns the Pepper MIME type for |key_system|. |
| 88 // Returns empty string if |key_system| is unknown or not Pepper-based. | 87 // Returns empty string if |key_system| is unknown or not Pepper-based. |
| 89 MEDIA_EXPORT std::string GetPepperType(const std::string& key_system); | 88 MEDIA_EXPORT std::string GetPepperType(const std::string& key_system); |
| 90 #endif | 89 #endif |
| 91 | 90 |
| 92 #if defined(UNIT_TEST) | 91 #if defined(UNIT_TEST) |
| 93 // Helper functions to add container/codec types for testing purposes. | 92 // Helper functions to add container/codec types for testing purposes. |
| 94 // Call AddCodecMask() first to ensure the mask values passed to | 93 // Call AddCodecMask() first to ensure the mask values passed to |
| 95 // AddMimeTypeCodecMask() already exist. | 94 // AddMimeTypeCodecMask() already exist. |
| 96 MEDIA_EXPORT void AddCodecMask(EmeMediaType media_type, | 95 MEDIA_EXPORT void AddCodecMask(EmeMediaType media_type, |
| 97 const std::string& codec, | 96 const std::string& codec, |
| 98 uint32_t mask); | 97 uint32_t mask); |
| 99 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, | 98 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, |
| 100 uint32_t mask); | 99 uint32_t mask); |
| 101 #endif // defined(UNIT_TEST) | 100 #endif // defined(UNIT_TEST) |
| 102 | 101 |
| 103 } // namespace media | 102 } // namespace media |
| 104 | 103 |
| 105 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ | 104 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ |
| OLD | NEW |