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 Wed Sep 16 16:45:25 2015. */ | 6 /* From private/pp_content_decryptor.idl modified Tue Oct 20 12:50:15 2015. */ |
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 * Key ID of the block to be decrypted. | 106 * Key ID of the block to be decrypted. |
107 * | 107 * |
108 * TODO(xhwang): For WebM the key ID can be as large as 2048 bytes in theory. | 108 * For WebM the key ID can be as large as 2048 bytes in theory. But it's not |
109 * But it's not used in current implementations. If we really need to support | 109 * used in current implementations. If we really need to support it, we should |
110 * it, we should move key ID out as a separate parameter, e.g. | 110 * move key ID out as a separate parameter, e.g. as a <code>PP_Var</code>, or |
111 * as a <code>PP_Var</code>, or make the whole | 111 * make the whole <code>PP_EncryptedBlockInfo</code> as a |
112 * <code>PP_EncryptedBlockInfo</code> as a <code>PP_Resource</code>. | 112 * <code>PP_Resource</code>. |
113 */ | 113 */ |
114 uint8_t key_id[64]; | 114 uint8_t key_id[64]; |
115 uint32_t key_id_size; | 115 uint32_t key_id_size; |
116 /** | 116 /** |
117 * Initialization vector of the block to be decrypted. | 117 * Initialization vector of the block to be decrypted. |
118 */ | 118 */ |
119 uint8_t iv[16]; | 119 uint8_t iv[16]; |
120 uint32_t iv_size; | 120 uint32_t iv_size; |
121 /** | 121 /** |
122 * Subsample information of the block to be decrypted. | 122 * Subsample information of the block to be decrypted. |
| 123 * |
| 124 * We need to have a fixed size of |subsamples| here. Choose 32 because it is |
| 125 * sufficient for almost all real life scenarios. Note that in theory the |
| 126 * number of subsamples could be larger than 32. If that happens, playback |
| 127 * will fail. |
123 */ | 128 */ |
124 struct PP_DecryptSubsampleDescription subsamples[16]; | 129 struct PP_DecryptSubsampleDescription subsamples[32]; |
125 uint32_t num_subsamples; | 130 uint32_t num_subsamples; |
126 }; | 131 }; |
127 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedBlockInfo, 240); | 132 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedBlockInfo, 368); |
128 /** | 133 /** |
129 * @} | 134 * @} |
130 */ | 135 */ |
131 | 136 |
132 /** | 137 /** |
133 * @addtogroup Enums | 138 * @addtogroup Enums |
134 * @{ | 139 * @{ |
135 */ | 140 */ |
136 /** | 141 /** |
137 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. | 142 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 */ | 539 */ |
535 uint32_t system_code; | 540 uint32_t system_code; |
536 }; | 541 }; |
537 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_KeyInformation, 524); | 542 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_KeyInformation, 524); |
538 /** | 543 /** |
539 * @} | 544 * @} |
540 */ | 545 */ |
541 | 546 |
542 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ | 547 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ |
543 | 548 |
OLD | NEW |