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 CONTENT_PUBLIC_RENDERER_KEY_SYSTEM_INFO_H_ | 5 #ifndef MEDIA_BASE_KEY_SYSTEM_INFO_H_ |
6 #define CONTENT_PUBLIC_RENDERER_KEY_SYSTEM_INFO_H_ | 6 #define MEDIA_BASE_KEY_SYSTEM_INFO_H_ |
7 | 7 |
8 #include <map> | |
9 #include <string> | 8 #include <string> |
10 | 9 |
11 #include "base/basictypes.h" | 10 #include "media/base/eme_constants.h" |
12 #include "base/containers/hash_tables.h" | 11 #include "media/base/media_export.h" |
13 #include "content/common/content_export.h" | |
14 #include "content/public/common/eme_constants.h" | |
15 | 12 |
16 // Definitions: | 13 // Definitions: |
17 // * Key system | 14 // * Key system |
18 // https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypt
ed-media.html#key-system | 15 // https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypt
ed-media.html#key-system |
19 // * Concrete key system | 16 // * Concrete key system |
20 // A key system string that can be instantiated, such as | 17 // A key system string that can be instantiated, such as |
21 // via the MediaKeys constructor. Examples include "org.w3.clearkey" and | 18 // via the MediaKeys constructor. Examples include "org.w3.clearkey" and |
22 // "com.widevine.alpha". | 19 // "com.widevine.alpha". |
23 // * Abstract key system | 20 // * Abstract key system |
24 // A key system string that cannot be instantiated like a concrete key system | 21 // A key system string that cannot be instantiated like a concrete key system |
25 // but is otherwise useful, such as in discovery using isTypeSupported(). | 22 // but is otherwise useful, such as in discovery using isTypeSupported(). |
26 // * Parent key system | 23 // * Parent key system |
27 // A key system string that is one level up from the child key system. It may | 24 // A key system string that is one level up from the child key system. It may |
28 // be an abstract key system. | 25 // be an abstract key system. |
29 // As an example, "com.example" is the parent of "com.example.foo". | 26 // As an example, "com.example" is the parent of "com.example.foo". |
30 | 27 |
31 namespace content { | 28 namespace media { |
32 | 29 |
33 // Contains information about an EME key system as well as how to instantiate | 30 // Contains information about an EME key system as well as how to instantiate |
34 // the corresponding CDM. | 31 // the corresponding CDM. |
35 struct CONTENT_EXPORT KeySystemInfo { | 32 struct MEDIA_EXPORT KeySystemInfo { |
36 explicit KeySystemInfo(const std::string& key_system); | 33 explicit KeySystemInfo(const std::string& key_system); |
37 ~KeySystemInfo(); | 34 ~KeySystemInfo(); |
38 | 35 |
39 std::string key_system; | 36 std::string key_system; |
40 | 37 |
41 // Specifies registered initialization data types supported by |key_system|. | 38 // Specifies registered initialization data types supported by |key_system|. |
42 SupportedInitDataTypes supported_init_data_types; | 39 SupportedInitDataTypes supported_init_data_types; |
43 | 40 |
44 // Specifies codecs supported by |key_system|. | 41 // Specifies codecs supported by |key_system|. |
45 SupportedCodecs supported_codecs; | 42 SupportedCodecs supported_codecs; |
46 | 43 |
47 // A hierarchical parent for |key_system|. This value can be used to check | 44 // A hierarchical parent for |key_system|. This value can be used to check |
48 // supported types but cannot be used to instantiate a MediaKeys object. | 45 // supported types but cannot be used to instantiate a MediaKeys object. |
49 // Only one parent key system is currently supported per concrete key system. | 46 // Only one parent key system is currently supported per concrete key system. |
50 std::string parent_key_system; | 47 std::string parent_key_system; |
51 | 48 |
52 // The following indicate how the corresponding CDM should be instantiated. | 49 // The following indicate how the corresponding CDM should be instantiated. |
53 bool use_aes_decryptor; | 50 bool use_aes_decryptor; |
54 #if defined(ENABLE_PEPPER_CDMS) | 51 #if defined(ENABLE_PEPPER_CDMS) |
55 std::string pepper_type; | 52 std::string pepper_type; |
56 #endif | 53 #endif |
57 }; | 54 }; |
58 | 55 |
59 } // namespace content | 56 } // namespace media |
60 | 57 |
61 #endif // CONTENT_PUBLIC_RENDERER_KEY_SYSTEM_INFO_H_ | 58 #endif // MEDIA_BASE_KEY_SYSTEM_INFO_H_ |
OLD | NEW |