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 Thu Oct 10 14:47:45 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 * Information needed by the client to track the decrypted samples. |
| 297 */ |
| 298 struct PP_DecryptTrackingInfo tracking_info; |
| 299 }; |
| 300 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedSampleInfo, 32); |
262 /** | 301 /** |
263 * @} | 302 * @} |
264 */ | 303 */ |
265 | 304 |
266 /** | 305 /** |
267 * @addtogroup Enums | 306 * @addtogroup Enums |
268 * @{ | 307 * @{ |
269 */ | 308 */ |
270 /** | 309 /** |
271 * <code>PP_AudioCodec</code> contains audio codec type constants. | 310 * <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, | 451 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, |
413 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 | 452 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 |
414 } PP_DecryptorStreamType; | 453 } PP_DecryptorStreamType; |
415 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4); | 454 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4); |
416 /** | 455 /** |
417 * @} | 456 * @} |
418 */ | 457 */ |
419 | 458 |
420 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ | 459 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ |
421 | 460 |
OLD | NEW |