OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EME_CONSTANTS_H_ | 5 #ifndef MEDIA_BASE_EME_CONSTANTS_H_ |
6 #define MEDIA_BASE_EME_CONSTANTS_H_ | 6 #define MEDIA_BASE_EME_CONSTANTS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 namespace media { | 10 namespace media { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 }; | 47 }; |
48 | 48 |
49 typedef uint32_t SupportedInitDataTypes; | 49 typedef uint32_t SupportedInitDataTypes; |
50 typedef uint32_t SupportedCodecs; | 50 typedef uint32_t SupportedCodecs; |
51 | 51 |
52 enum EmeSessionTypeSupport { | 52 enum EmeSessionTypeSupport { |
53 // Invalid default value. | 53 // Invalid default value. |
54 EME_SESSION_TYPE_INVALID, | 54 EME_SESSION_TYPE_INVALID, |
55 // The session type is not supported. | 55 // The session type is not supported. |
56 EME_SESSION_TYPE_NOT_SUPPORTED, | 56 EME_SESSION_TYPE_NOT_SUPPORTED, |
57 // The session type is supported if the encrypted media permission is granted. | 57 // The session type is supported if a distinctive identifier is available. |
58 EME_SESSION_TYPE_SUPPORTED_WITH_PERMISSION, | 58 EME_SESSION_TYPE_SUPPORTED_WITH_IDENTIFIER, |
59 // The session type is always supported. | 59 // The session type is always supported. |
60 EME_SESSION_TYPE_SUPPORTED, | 60 EME_SESSION_TYPE_SUPPORTED, |
61 }; | 61 }; |
62 | 62 |
63 // Used to declare support for distinctive identifier and persistent state. | |
63 enum EmeFeatureSupport { | 64 enum EmeFeatureSupport { |
64 // Invalid default value. | 65 // Invalid default value. |
65 EME_FEATURE_INVALID, | 66 EME_FEATURE_INVALID, |
66 // Access to the feature is not supported at all. | 67 // Access to the feature is not supported at all. |
67 EME_FEATURE_NOT_SUPPORTED, | 68 EME_FEATURE_NOT_SUPPORTED, |
68 // Access to the feature may be requested if the encrypted media permission is | 69 // Access to the feature may be requested if a distinctive identifier is |
69 // granted. | 70 // available. (This is the correct choice for declaring support for a |
70 EME_FEATURE_REQUESTABLE_WITH_PERMISSION, | 71 // requestable distinctive identifier.) |
72 EME_FEATURE_REQUESTABLE_WITH_IDENTIFIER, | |
71 // Access to the feature may be requested. | 73 // Access to the feature may be requested. |
72 EME_FEATURE_REQUESTABLE, | 74 EME_FEATURE_REQUESTABLE, |
73 // Access to the feature cannot be blocked. | 75 // Access to the feature cannot be blocked. |
74 EME_FEATURE_ALWAYS_ENABLED, | 76 EME_FEATURE_ALWAYS_ENABLED, |
75 }; | 77 }; |
76 | 78 |
79 // Used to query support for distinctive identifier and persistent state. | |
77 enum EmeFeatureRequirement { | 80 enum EmeFeatureRequirement { |
78 EME_FEATURE_NOT_ALLOWED, | 81 EME_FEATURE_NOT_ALLOWED, |
79 EME_FEATURE_OPTIONAL, | 82 EME_FEATURE_OPTIONAL, |
80 EME_FEATURE_REQUIRED, | 83 EME_FEATURE_REQUIRED, |
81 }; | 84 }; |
82 | 85 |
86 enum class EmeMediaType { | |
87 AUDIO, | |
88 VIDEO, | |
89 }; | |
90 | |
91 // Robustness values understood by KeySystems. | |
92 // Note: KeySystems expects this ordering (in GetRobustnessConfigRule()), | |
93 // changes may be required there if this list changes. | |
94 enum class EmeRobustness { | |
95 INVALID, | |
96 EMPTY, | |
97 SW_SECURE_CRYPTO, | |
98 SW_SECURE_DECODE, | |
99 HW_SECURE_CRYPTO, | |
100 HW_SECURE_DECODE, | |
101 HW_SECURE_ALL, | |
102 }; | |
103 | |
lcwu1
2015/03/24 00:19:49
Just chatted with ddorwin@ off-line. I felt that t
ddorwin
2015/03/24 00:24:37
I was just saying that we would have to pass strin
ddorwin
2015/03/24 18:00:27
If refactoring does not address this, we probably
| |
104 // Configuration rules indicate the configuration state required to support a | |
105 // configuration option (note: a configuration option may be disallowing a | |
106 // feature). Configuration rules are used to answer queries about distinctive | |
107 // identifier, persistent state, and robustness requirements, as well as to | |
108 // describe support for different session types. | |
109 // | |
110 // If in the future there are reasons to request user permission other than | |
111 // access to a distinctive identifier, then additional rules should be added. | |
112 // Rules are implemented in ConfigState and are otherwise opaque. | |
113 enum class EmeConfigRule { | |
114 // The configuration option is not supported. | |
115 NOT_SUPPORTED, | |
116 // The configuration option is supported if a distinctive identifier is | |
117 // available. | |
118 IDENTIFIER_REQUIRED, | |
119 // The configuration option is supported, but the user experience may be | |
120 // improved if a distinctive identifier is available. | |
121 IDENTIFIER_RECOMMENDED, | |
122 // The configuration option is supported without conditions. | |
123 SUPPORTED, | |
124 }; | |
125 | |
83 } // namespace media | 126 } // namespace media |
84 | 127 |
85 #endif // MEDIA_BASE_EME_CONSTANTS_H_ | 128 #endif // MEDIA_BASE_EME_CONSTANTS_H_ |
OLD | NEW |