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