| 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 Thu Oct 11 21:05:33 2012. */ | 6 /* From private/pp_content_decryptor.idl modified Thu Oct 11 22:13:01 2012. */ |
| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptedFrameFormat, 4); | 140 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptedFrameFormat, 4); |
| 141 | 141 |
| 142 /** | 142 /** |
| 143 * <code>PP_VideoCodec</code> contains video codec type constants. | 143 * <code>PP_VideoCodec</code> contains video codec type constants. |
| 144 */ | 144 */ |
| 145 typedef enum { | 145 typedef enum { |
| 146 PP_VIDEOCODEC_UNKNOWN = 0, | 146 PP_VIDEOCODEC_UNKNOWN = 0, |
| 147 PP_VIDEOCODEC_VP8 = 1 | 147 PP_VIDEOCODEC_VP8 = 1 |
| 148 } PP_VideoCodec; | 148 } PP_VideoCodec; |
| 149 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoCodec, 4); | 149 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoCodec, 4); |
| 150 /** | |
| 151 * @} | |
| 152 */ | |
| 153 | 150 |
| 154 /** | 151 /** |
| 155 * @addtogroup Structs | |
| 156 * @{ | |
| 157 */ | |
| 158 /** | |
| 159 * <code>PP_EncryptedVideoFrameInfo</code> contains the information required | |
| 160 * to decrypt and decode a video frame. | |
| 161 * TODO(tomfinegan): Revisit necessity of including format information in this | |
| 162 * struct once we decide how to implement video decoder initialization. | |
| 163 */ | |
| 164 struct PP_EncryptedVideoFrameInfo { | |
| 165 /** | |
| 166 * The decoded video frame format. | |
| 167 */ | |
| 168 PP_DecryptedFrameFormat format; | |
| 169 /** | |
| 170 * The video frame codec type. | |
| 171 */ | |
| 172 PP_VideoCodec codec; | |
| 173 /** | |
| 174 * Video frame width in pixels. | |
| 175 */ | |
| 176 int32_t width; | |
| 177 /** | |
| 178 * Video frame height in pixels. | |
| 179 */ | |
| 180 int32_t height; | |
| 181 /** | |
| 182 * Information required to decrypt the frame. | |
| 183 */ | |
| 184 struct PP_EncryptedBlockInfo encryption_info; | |
| 185 }; | |
| 186 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedVideoFrameInfo, 256); | |
| 187 /** | |
| 188 * @} | |
| 189 */ | |
| 190 | |
| 191 /** | |
| 192 * @addtogroup Enums | |
| 193 * @{ | |
| 194 */ | |
| 195 /** | |
| 196 * The <code>PP_DecryptResult</code> enum contains decryption and decoding | 152 * The <code>PP_DecryptResult</code> enum contains decryption and decoding |
| 197 * result constants. | 153 * result constants. |
| 198 */ | 154 */ |
| 199 typedef enum { | 155 typedef enum { |
| 200 /** The decryption (and/or decoding) operation finished successfully. */ | 156 /** The decryption (and/or decoding) operation finished successfully. */ |
| 201 PP_DECRYPTRESULT_SUCCESS = 0, | 157 PP_DECRYPTRESULT_SUCCESS = 0, |
| 202 /** The decryptor did not have the necessary decryption key. */ | 158 /** The decryptor did not have the necessary decryption key. */ |
| 203 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, | 159 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, |
| 204 /** An unexpected error happened during decryption. */ | 160 /** An unexpected error happened during decryption. */ |
| 205 PP_DECRYPTRESULT_DECRYPT_ERROR = 2, | 161 PP_DECRYPTRESULT_DECRYPT_ERROR = 2, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 219 * <code>PP_DecryptedBlockInfo</code> struct contains the decryption result and | 175 * <code>PP_DecryptedBlockInfo</code> struct contains the decryption result and |
| 220 * tracking info associated with the decrypted block. | 176 * tracking info associated with the decrypted block. |
| 221 */ | 177 */ |
| 222 struct PP_DecryptedBlockInfo { | 178 struct PP_DecryptedBlockInfo { |
| 223 /** | 179 /** |
| 224 * Result of the decryption (and/or decoding) operation. | 180 * Result of the decryption (and/or decoding) operation. |
| 225 */ | 181 */ |
| 226 PP_DecryptResult result; | 182 PP_DecryptResult result; |
| 227 /** | 183 /** |
| 228 * 4-byte padding to make the size of <code>PP_DecryptedBlockInfo</code> | 184 * 4-byte padding to make the size of <code>PP_DecryptedBlockInfo</code> |
| 229 * a multiple of 8 bytes and make sure |tracking_info| starts on an 8-byte | 185 * a multiple of 8 bytes, and ensure consistent size on all targets. This |
| 230 * boundary. The value of this field should not be used. | 186 * value should never be used. |
| 231 */ | 187 */ |
| 232 uint32_t padding; | 188 uint32_t padding; |
| 233 /** | 189 /** |
| 234 * Information needed by the client to track the block to be decrypted. | 190 * Information needed by the client to track the block to be decrypted. |
| 235 */ | 191 */ |
| 236 struct PP_DecryptTrackingInfo tracking_info; | 192 struct PP_DecryptTrackingInfo tracking_info; |
| 237 }; | 193 }; |
| 238 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedBlockInfo, 24); | 194 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedBlockInfo, 24); |
| 239 /** | 195 /** |
| 240 * @} | 196 * @} |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, | 332 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, |
| 377 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 | 333 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 |
| 378 } PP_DecryptorStreamType; | 334 } PP_DecryptorStreamType; |
| 379 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4); | 335 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4); |
| 380 /** | 336 /** |
| 381 * @} | 337 * @} |
| 382 */ | 338 */ |
| 383 | 339 |
| 384 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ | 340 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ |
| 385 | 341 |
| OLD | NEW |