OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 | 5 |
6 /* From private/pp_content_decryptor.idl modified Mon Oct 21 18:38:44 2013. */ | 6 /* From private/pp_content_decryptor.idl modified Mon Dec 30 15:55:57 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ | 8 #ifndef PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ |
9 #define PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ | 9 #define PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ |
10 | 10 |
11 #include "ppapi/c/pp_macros.h" | 11 #include "ppapi/c/pp_macros.h" |
12 #include "ppapi/c/pp_stdint.h" | 12 #include "ppapi/c/pp_stdint.h" |
13 | 13 |
14 /** | 14 /** |
15 * @file | 15 * @file |
16 * The <code>PP_DecryptTrackingInfo</code> struct contains necessary information | 16 * The <code>PP_DecryptTrackingInfo</code> struct contains necessary information |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 struct PP_EncryptedBlockInfo { | 96 struct PP_EncryptedBlockInfo { |
97 /** | 97 /** |
98 * Information needed by the client to track the block to be decrypted. | 98 * Information needed by the client to track the block to be decrypted. |
99 */ | 99 */ |
100 struct PP_DecryptTrackingInfo tracking_info; | 100 struct PP_DecryptTrackingInfo tracking_info; |
101 /** | 101 /** |
102 * Size in bytes of data to be decrypted (data_offset included). | 102 * Size in bytes of data to be decrypted (data_offset included). |
103 */ | 103 */ |
104 uint32_t data_size; | 104 uint32_t data_size; |
105 /** | 105 /** |
106 * Size in bytes of data to be discarded before applying the decryption. | |
107 */ | |
108 uint32_t data_offset; | |
109 /** | |
110 * Key ID of the block to be decrypted. | 106 * Key ID of the block to be decrypted. |
111 * | 107 * |
112 * TODO(xhwang): For WebM the key ID can be as large as 2048 bytes in theory. | 108 * TODO(xhwang): For WebM the key ID can be as large as 2048 bytes in theory. |
113 * But it's not used in current implementations. If we really need to support | 109 * But it's not used in current implementations. If we really need to support |
114 * it, we should move key ID out as a separate parameter, e.g. | 110 * it, we should move key ID out as a separate parameter, e.g. |
115 * as a <code>PP_Var</code>, or make the whole | 111 * as a <code>PP_Var</code>, or make the whole |
116 * <code>PP_EncryptedBlockInfo</code> as a <code>PP_Resource</code>. | 112 * <code>PP_EncryptedBlockInfo</code> as a <code>PP_Resource</code>. |
117 */ | 113 */ |
118 uint8_t key_id[64]; | 114 uint8_t key_id[64]; |
119 uint32_t key_id_size; | 115 uint32_t key_id_size; |
120 /** | 116 /** |
121 * Initialization vector of the block to be decrypted. | 117 * Initialization vector of the block to be decrypted. |
122 */ | 118 */ |
123 uint8_t iv[16]; | 119 uint8_t iv[16]; |
124 uint32_t iv_size; | 120 uint32_t iv_size; |
125 /** | 121 /** |
126 * Subsample information of the block to be decrypted. | 122 * Subsample information of the block to be decrypted. |
127 */ | 123 */ |
128 struct PP_DecryptSubsampleDescription subsamples[16]; | 124 struct PP_DecryptSubsampleDescription subsamples[16]; |
129 uint32_t num_subsamples; | 125 uint32_t num_subsamples; |
130 /** | |
131 * 4-byte padding to make the size of <code>PP_EncryptedBlockInfo</code> | |
132 * a multiple of 8 bytes. The value of this field should not be used. | |
133 */ | |
134 uint32_t padding; | |
135 }; | 126 }; |
136 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedBlockInfo, 248); | 127 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedBlockInfo, 240); |
137 /** | 128 /** |
138 * @} | 129 * @} |
139 */ | 130 */ |
140 | 131 |
141 /** | 132 /** |
142 * @addtogroup Enums | 133 * @addtogroup Enums |
143 * @{ | 134 * @{ |
144 */ | 135 */ |
145 /** | 136 /** |
146 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. | 137 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, | 447 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, |
457 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 | 448 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 |
458 } PP_DecryptorStreamType; | 449 } PP_DecryptorStreamType; |
459 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4); | 450 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4); |
460 /** | 451 /** |
461 * @} | 452 * @} |
462 */ | 453 */ |
463 | 454 |
464 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ | 455 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ |
465 | 456 |
OLD | NEW |