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 Tue Dec 4 16:42:46 2012. */ | 6 /* From private/pp_content_decryptor.idl modified Mon Oct 21 18:38:44 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. | 146 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. |
147 */ | 147 */ |
148 typedef enum { | 148 typedef enum { |
149 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, | 149 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, |
150 PP_DECRYPTEDFRAMEFORMAT_YV12 = 1, | 150 PP_DECRYPTEDFRAMEFORMAT_YV12 = 1, |
151 PP_DECRYPTEDFRAMEFORMAT_I420 = 2 | 151 PP_DECRYPTEDFRAMEFORMAT_I420 = 2 |
152 } PP_DecryptedFrameFormat; | 152 } PP_DecryptedFrameFormat; |
153 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptedFrameFormat, 4); | 153 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptedFrameFormat, 4); |
154 | 154 |
155 /** | 155 /** |
| 156 * <code>PP_DecryptedSampleFormat</code> contains audio sample formats. |
| 157 */ |
| 158 typedef enum { |
| 159 PP_DECRYPTEDSAMPLEFORMAT_UNKNOWN = 0, |
| 160 PP_DECRYPTEDSAMPLEFORMAT_U8 = 1, |
| 161 PP_DECRYPTEDSAMPLEFORMAT_S16 = 2, |
| 162 PP_DECRYPTEDSAMPLEFORMAT_S32 = 3, |
| 163 PP_DECRYPTEDSAMPLEFORMAT_F32 = 4, |
| 164 PP_DECRYPTEDSAMPLEFORMAT_PLANAR_S16 = 5, |
| 165 PP_DECRYPTEDSAMPLEFORMAT_PLANAR_F32 = 6 |
| 166 } PP_DecryptedSampleFormat; |
| 167 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptedSampleFormat, 4); |
| 168 |
| 169 /** |
156 * The <code>PP_DecryptResult</code> enum contains decryption and decoding | 170 * The <code>PP_DecryptResult</code> enum contains decryption and decoding |
157 * result constants. | 171 * result constants. |
158 */ | 172 */ |
159 typedef enum { | 173 typedef enum { |
160 /** The decryption (and/or decoding) operation finished successfully. */ | 174 /** The decryption (and/or decoding) operation finished successfully. */ |
161 PP_DECRYPTRESULT_SUCCESS = 0, | 175 PP_DECRYPTRESULT_SUCCESS = 0, |
162 /** The decryptor did not have the necessary decryption key. */ | 176 /** The decryptor did not have the necessary decryption key. */ |
163 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, | 177 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, |
164 /** The input was accepted by the decoder but no frame(s) can be produced. */ | 178 /** The input was accepted by the decoder but no frame(s) can be produced. */ |
165 PP_DECRYPTRESULT_NEEDMOREDATA = 2, | 179 PP_DECRYPTRESULT_NEEDMOREDATA = 2, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 /** | 266 /** |
253 * Height of the video frame, in pixels. | 267 * Height of the video frame, in pixels. |
254 */ | 268 */ |
255 int32_t height; | 269 int32_t height; |
256 /** | 270 /** |
257 * Information needed by the client to track the decrypted frame. | 271 * Information needed by the client to track the decrypted frame. |
258 */ | 272 */ |
259 struct PP_DecryptTrackingInfo tracking_info; | 273 struct PP_DecryptTrackingInfo tracking_info; |
260 }; | 274 }; |
261 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedFrameInfo, 56); | 275 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedFrameInfo, 56); |
| 276 |
| 277 /** |
| 278 * <code>PP_DecryptedSampleInfo</code> contains the result of the |
| 279 * decrypt and decode operation on the associated samples, information required |
| 280 * to access the sample data in buffer, and tracking info. |
| 281 */ |
| 282 struct PP_DecryptedSampleInfo { |
| 283 /** |
| 284 * Result of the decrypt and decode operation. |
| 285 */ |
| 286 PP_DecryptResult result; |
| 287 /** |
| 288 * Format of the decrypted samples. |
| 289 */ |
| 290 PP_DecryptedSampleFormat format; |
| 291 /** |
| 292 * Size in bytes of decrypted samples. |
| 293 */ |
| 294 uint32_t data_size; |
| 295 /** |
| 296 * 4-byte padding to make the size of <code>PP_DecryptedSampleInfo</code> |
| 297 * a multiple of 8 bytes. The value of this field should not be used. |
| 298 */ |
| 299 uint32_t padding; |
| 300 /** |
| 301 * Information needed by the client to track the decrypted samples. |
| 302 */ |
| 303 struct PP_DecryptTrackingInfo tracking_info; |
| 304 }; |
| 305 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedSampleInfo, 32); |
262 /** | 306 /** |
263 * @} | 307 * @} |
264 */ | 308 */ |
265 | 309 |
266 /** | 310 /** |
267 * @addtogroup Enums | 311 * @addtogroup Enums |
268 * @{ | 312 * @{ |
269 */ | 313 */ |
270 /** | 314 /** |
271 * <code>PP_AudioCodec</code> contains audio codec type constants. | 315 * <code>PP_AudioCodec</code> contains audio codec type constants. |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, | 456 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, |
413 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 | 457 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 |
414 } PP_DecryptorStreamType; | 458 } PP_DecryptorStreamType; |
415 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4); | 459 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4); |
416 /** | 460 /** |
417 * @} | 461 * @} |
418 */ | 462 */ |
419 | 463 |
420 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ | 464 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ |
421 | 465 |
OLD | NEW |