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