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 16 matching lines...) Expand all Loading... |
27 static KeySystems* GetInstance(); | 27 static KeySystems* GetInstance(); |
28 | 28 |
29 // Returns whether |key_system| is a supported key system. | 29 // Returns whether |key_system| is a supported key system. |
30 virtual bool IsSupportedKeySystem(const std::string& key_system) const = 0; | 30 virtual bool IsSupportedKeySystem(const std::string& key_system) const = 0; |
31 | 31 |
32 // Returns whether |init_data_type| is supported by |key_system|. | 32 // Returns whether |init_data_type| is supported by |key_system|. |
33 virtual bool IsSupportedInitDataType( | 33 virtual bool IsSupportedInitDataType( |
34 const std::string& key_system, | 34 const std::string& key_system, |
35 EmeInitDataType init_data_type) const = 0; | 35 EmeInitDataType init_data_type) const = 0; |
36 | 36 |
37 // Returns whether the list of codecs are supported together by |key_system|. | 37 // Returns the configuration rule for supporting a container and list of |
38 // TODO(sandersd): Return a rule instead of a bool so that codec selection can | 38 // codecs. |
39 // affect other configuration options (namely robustness). | 39 virtual EmeConfigRule GetContentTypeConfigRule( |
40 virtual bool IsSupportedCodecCombination( | |
41 const std::string& key_system, | 40 const std::string& key_system, |
42 EmeMediaType media_type, | 41 EmeMediaType media_type, |
43 const std::string& container_mime_type, | 42 const std::string& container_mime_type, |
44 const std::vector<std::string>& codecs) const = 0; | 43 const std::vector<std::string>& codecs) const = 0; |
45 | 44 |
46 // Returns the configuration rule for supporting a robustness requirement. | 45 // Returns the configuration rule for supporting a robustness requirement. |
47 virtual EmeConfigRule GetRobustnessConfigRule( | 46 virtual EmeConfigRule GetRobustnessConfigRule( |
48 const std::string& key_system, | 47 const std::string& key_system, |
49 EmeMediaType media_type, | 48 EmeMediaType media_type, |
50 const std::string& requested_robustness) const = 0; | 49 const std::string& requested_robustness) const = 0; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); | 125 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); |
127 MEDIA_EXPORT void AddCodecMask( | 126 MEDIA_EXPORT void AddCodecMask( |
128 EmeMediaType media_type, | 127 EmeMediaType media_type, |
129 const std::string& codec, | 128 const std::string& codec, |
130 uint32 mask); | 129 uint32 mask); |
131 #endif // defined(UNIT_TEST) | 130 #endif // defined(UNIT_TEST) |
132 | 131 |
133 } // namespace media | 132 } // namespace media |
134 | 133 |
135 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ | 134 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ |
OLD | NEW |