Chromium Code Reviews| 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. | 15 // The mask values are stored in a InitDataTypeMask. |
| 16 enum class EmeInitDataType { | 16 enum class EmeInitDataType { |
| 17 UNKNOWN, | 17 UNKNOWN, |
| 18 WEBM, | 18 WEBM, |
| 19 CENC, | 19 CENC, |
| 20 KEYIDS | 20 KEYIDS |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 typedef uint32_t InitDataTypeMask; | 23 typedef uint32_t InitDataTypeMask; |
| 24 const InitDataTypeMask kInitDataTypeMaskNone = 0; | 24 const InitDataTypeMask kInitDataTypeMaskNone = 0; |
|
ddorwin
2015/04/30 18:18:04
We should eventually be consistent in how we defin
sandersd (OOO until July 31)
2015/04/30 19:57:44
Acknowledged.
| |
| 25 const InitDataTypeMask kInitDataTypeMaskWebM = 1 << 0; | 25 const InitDataTypeMask kInitDataTypeMaskWebM = 1 << 0; |
| 26 const InitDataTypeMask kInitDataTypeMaskCenc = 1 << 1; | 26 const InitDataTypeMask kInitDataTypeMaskCenc = 1 << 1; |
| 27 const InitDataTypeMask kInitDataTypeMaskKeyIds = 1 << 2; | 27 const InitDataTypeMask kInitDataTypeMaskKeyIds = 1 << 2; |
| 28 | 28 |
| 29 // Defines bitmask values that specify codecs used in Encrypted Media Extension | 29 // Defines bitmask values that specify codecs used in Encrypted Media Extension |
| 30 // (EME). Each value represents a codec within a specific container. | 30 // (EME). Each value represents a codec within a specific container. |
| 31 // The mask values are stored in a SupportedCodecs. | 31 // The mask values are stored in a SupportedCodecs. |
| 32 enum EmeCodec { | 32 enum EmeCodec { |
| 33 // *_ALL values should only be used for masking, do not use them to specify | 33 // *_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. | 34 // codec support because they may be extended to include more codecs. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 // The configuration option is supported, but the user experience may be | 122 // The configuration option is supported, but the user experience may be |
| 123 // improved if a distinctive identifier is available. | 123 // improved if a distinctive identifier is available. |
| 124 IDENTIFIER_RECOMMENDED, | 124 IDENTIFIER_RECOMMENDED, |
| 125 // The configuration option prevents use of persistent state. | 125 // The configuration option prevents use of persistent state. |
| 126 PERSISTENCE_NOT_ALLOWED, | 126 PERSISTENCE_NOT_ALLOWED, |
| 127 // The configuration option is supported if persistent state is available. | 127 // The configuration option is supported if persistent state is available. |
| 128 PERSISTENCE_REQUIRED, | 128 PERSISTENCE_REQUIRED, |
| 129 // The configuration option is supported if both a distinctive identifier and | 129 // The configuration option is supported if both a distinctive identifier and |
| 130 // persistent state are available. | 130 // persistent state are available. |
| 131 IDENTIFIER_AND_PERSISTENCE_REQUIRED, | 131 IDENTIFIER_AND_PERSISTENCE_REQUIRED, |
| 132 #if defined(OS_ANDROID) | |
| 133 // The configuration option is supported if hardware-secure codecs are not | |
| 134 // used. | |
| 135 SECURE_CODECS_NOT_ALLOWED, | |
| 136 // The configuration option is supported if hardware-secure codecs are used. | |
| 137 // In this mode only secure surfaces (hole-punching) will be functional. | |
|
ddorwin
2015/04/30 18:18:04
This last sentence only applies to video.
sandersd (OOO until July 31)
2015/04/30 19:57:44
Done.
| |
| 138 SECURE_CODECS_REQUIRED, | |
| 139 #endif // defined(OS_ANDROID) | |
| 132 // The configuration option is supported without conditions. | 140 // The configuration option is supported without conditions. |
| 133 SUPPORTED, | 141 SUPPORTED, |
| 134 }; | 142 }; |
| 135 | 143 |
| 136 } // namespace media | 144 } // namespace media |
| 137 | 145 |
| 138 #endif // MEDIA_BASE_EME_CONSTANTS_H_ | 146 #endif // MEDIA_BASE_EME_CONSTANTS_H_ |
| OLD | NEW |