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 { |
11 | 11 |
12 // Defines values that specify registered Initialization Data Types used | 12 // Defines values that specify registered Initialization Data Types used |
13 // in Encrypted Media Extensions (EME). | 13 // in Encrypted Media Extensions (EME). |
14 // http://w3c.github.io/encrypted-media/initdata-format-registry.html#registry | 14 // http://w3c.github.io/encrypted-media/initdata-format-registry.html#registry |
15 // The mask values are stored in a InitDataTypeMask. | |
16 enum class EmeInitDataType { | 15 enum class EmeInitDataType { |
17 UNKNOWN, | 16 UNKNOWN, |
18 WEBM, | 17 WEBM, |
19 CENC, | 18 CENC, |
20 KEYIDS | 19 KEYIDS |
21 }; | 20 }; |
22 | 21 |
23 typedef uint32_t InitDataTypeMask; | |
24 const InitDataTypeMask kInitDataTypeMaskNone = 0; | |
25 const InitDataTypeMask kInitDataTypeMaskWebM = 1 << 0; | |
26 const InitDataTypeMask kInitDataTypeMaskCenc = 1 << 1; | |
27 const InitDataTypeMask kInitDataTypeMaskKeyIds = 1 << 2; | |
28 | |
29 // Defines bitmask values that specify codecs used in Encrypted Media Extension | 22 // Defines bitmask values that specify codecs used in Encrypted Media Extension |
30 // (EME). Each value represents a codec within a specific container. | 23 // (EME). Each value represents a codec within a specific container. |
31 // The mask values are stored in a SupportedCodecs. | 24 // The mask values are stored in a SupportedCodecs. |
32 enum EmeCodec { | 25 enum EmeCodec { |
33 // *_ALL values should only be used for masking, do not use them to specify | 26 // *_ALL values should only be used for masking, do not use them to specify |
34 // codec support because they may be extended to include more codecs. | 27 // codec support because they may be extended to include more codecs. |
35 EME_CODEC_NONE = 0, | 28 EME_CODEC_NONE = 0, |
36 EME_CODEC_WEBM_OPUS = 1 << 0, | 29 EME_CODEC_WEBM_OPUS = 1 << 0, |
37 EME_CODEC_WEBM_VORBIS = 1 << 1, | 30 EME_CODEC_WEBM_VORBIS = 1 << 1, |
38 EME_CODEC_WEBM_AUDIO_ALL = EME_CODEC_WEBM_OPUS | EME_CODEC_WEBM_VORBIS, | 31 EME_CODEC_WEBM_AUDIO_ALL = EME_CODEC_WEBM_OPUS | EME_CODEC_WEBM_VORBIS, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // This rule only has meaning on platforms that distinguish hardware-secure | 131 // This rule only has meaning on platforms that distinguish hardware-secure |
139 // codecs (ie. Android). | 132 // codecs (ie. Android). |
140 HW_SECURE_CODECS_REQUIRED, | 133 HW_SECURE_CODECS_REQUIRED, |
141 // The configuration option is supported without conditions. | 134 // The configuration option is supported without conditions. |
142 SUPPORTED, | 135 SUPPORTED, |
143 }; | 136 }; |
144 | 137 |
145 } // namespace media | 138 } // namespace media |
146 | 139 |
147 #endif // MEDIA_BASE_EME_CONSTANTS_H_ | 140 #endif // MEDIA_BASE_EME_CONSTANTS_H_ |
OLD | NEW |