OLD | NEW |
1 /* Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2014 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 ppb_video_decoder.idl modified Thu Aug 6 14:15:48 2015. */ | 6 /* From ppb_video_decoder.idl modified Mon Sep 28 15:23:30 2015. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_VIDEO_DECODER_H_ | 8 #ifndef PPAPI_C_PPB_VIDEO_DECODER_H_ |
9 #define PPAPI_C_PPB_VIDEO_DECODER_H_ | 9 #define PPAPI_C_PPB_VIDEO_DECODER_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_codecs.h" | 12 #include "ppapi/c/pp_codecs.h" |
13 #include "ppapi/c/pp_completion_callback.h" | 13 #include "ppapi/c/pp_completion_callback.h" |
14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
15 #include "ppapi/c/pp_macros.h" | 15 #include "ppapi/c/pp_macros.h" |
16 #include "ppapi/c/pp_point.h" | 16 #include "ppapi/c/pp_point.h" |
17 #include "ppapi/c/pp_rect.h" | 17 #include "ppapi/c/pp_rect.h" |
18 #include "ppapi/c/pp_resource.h" | 18 #include "ppapi/c/pp_resource.h" |
19 #include "ppapi/c/pp_size.h" | 19 #include "ppapi/c/pp_size.h" |
20 #include "ppapi/c/pp_stdint.h" | 20 #include "ppapi/c/pp_stdint.h" |
21 | 21 |
22 #define PPB_VIDEODECODER_INTERFACE_0_1 "PPB_VideoDecoder;0.1" | 22 #define PPB_VIDEODECODER_INTERFACE_0_1 "PPB_VideoDecoder;0.1" |
23 #define PPB_VIDEODECODER_INTERFACE_0_2 "PPB_VideoDecoder;0.2" | 23 #define PPB_VIDEODECODER_INTERFACE_0_2 "PPB_VideoDecoder;0.2" |
24 #define PPB_VIDEODECODER_INTERFACE_1_0 "PPB_VideoDecoder;1.0" | 24 #define PPB_VIDEODECODER_INTERFACE_1_0 "PPB_VideoDecoder;1.0" |
25 #define PPB_VIDEODECODER_INTERFACE_1_1 "PPB_VideoDecoder;1.1" /* dev */ | 25 #define PPB_VIDEODECODER_INTERFACE_1_1 "PPB_VideoDecoder;1.1" |
26 #define PPB_VIDEODECODER_INTERFACE PPB_VIDEODECODER_INTERFACE_1_0 | 26 #define PPB_VIDEODECODER_INTERFACE PPB_VIDEODECODER_INTERFACE_1_1 |
27 | 27 |
28 /** | 28 /** |
29 * @file | 29 * @file |
30 * This file defines the <code>PPB_VideoDecoder</code> interface. | 30 * This file defines the <code>PPB_VideoDecoder</code> interface. |
31 */ | 31 */ |
32 | 32 |
33 | 33 |
34 /** | 34 /** |
35 * @addtogroup Interfaces | 35 * @addtogroup Interfaces |
36 * @{ | 36 * @{ |
(...skipping 14 matching lines...) Expand all Loading... |
51 * - Call Reset() to quickly stop the decoder (e.g. to implement Seek) and wait | 51 * - Call Reset() to quickly stop the decoder (e.g. to implement Seek) and wait |
52 * for the callback before restarting decoding at another point. | 52 * for the callback before restarting decoding at another point. |
53 * - To destroy the decoder, the plugin should release all of its references to | 53 * - To destroy the decoder, the plugin should release all of its references to |
54 * it. Any pending callbacks will abort before the decoder is destroyed. | 54 * it. Any pending callbacks will abort before the decoder is destroyed. |
55 * | 55 * |
56 * Available video codecs vary by platform. | 56 * Available video codecs vary by platform. |
57 * All: theora, vorbis, vp8. | 57 * All: theora, vorbis, vp8. |
58 * Chrome and ChromeOS: aac, h264. | 58 * Chrome and ChromeOS: aac, h264. |
59 * ChromeOS: mpeg4. | 59 * ChromeOS: mpeg4. |
60 */ | 60 */ |
61 struct PPB_VideoDecoder_1_1 { /* dev */ | 61 struct PPB_VideoDecoder_1_1 { |
62 /** | 62 /** |
63 * Creates a new video decoder resource. | 63 * Creates a new video decoder resource. |
64 * | 64 * |
65 * @param[in] instance A <code>PP_Instance</code> identifying the instance | 65 * @param[in] instance A <code>PP_Instance</code> identifying the instance |
66 * with the video decoder. | 66 * with the video decoder. |
67 * | 67 * |
68 * @return A <code>PP_Resource</code> corresponding to a video decoder if | 68 * @return A <code>PP_Resource</code> corresponding to a video decoder if |
69 * successful or 0 otherwise. | 69 * successful or 0 otherwise. |
70 */ | 70 */ |
71 PP_Resource (*Create)(PP_Instance instance); | 71 PP_Resource (*Create)(PP_Instance instance); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on | 223 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on |
224 * completion. | 224 * completion. |
225 * | 225 * |
226 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 226 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
227 * Returns PP_ERROR_FAILED if the decoder isn't initialized. | 227 * Returns PP_ERROR_FAILED if the decoder isn't initialized. |
228 */ | 228 */ |
229 int32_t (*Reset)(PP_Resource video_decoder, | 229 int32_t (*Reset)(PP_Resource video_decoder, |
230 struct PP_CompletionCallback callback); | 230 struct PP_CompletionCallback callback); |
231 }; | 231 }; |
232 | 232 |
| 233 typedef struct PPB_VideoDecoder_1_1 PPB_VideoDecoder; |
| 234 |
233 struct PPB_VideoDecoder_0_1 { | 235 struct PPB_VideoDecoder_0_1 { |
234 PP_Resource (*Create)(PP_Instance instance); | 236 PP_Resource (*Create)(PP_Instance instance); |
235 PP_Bool (*IsVideoDecoder)(PP_Resource resource); | 237 PP_Bool (*IsVideoDecoder)(PP_Resource resource); |
236 int32_t (*Initialize)(PP_Resource video_decoder, | 238 int32_t (*Initialize)(PP_Resource video_decoder, |
237 PP_Resource graphics3d_context, | 239 PP_Resource graphics3d_context, |
238 PP_VideoProfile profile, | 240 PP_VideoProfile profile, |
239 PP_Bool allow_software_fallback, | 241 PP_Bool allow_software_fallback, |
240 struct PP_CompletionCallback callback); | 242 struct PP_CompletionCallback callback); |
241 int32_t (*Decode)(PP_Resource video_decoder, | 243 int32_t (*Decode)(PP_Resource video_decoder, |
242 uint32_t decode_id, | 244 uint32_t decode_id, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 int32_t (*GetPicture)(PP_Resource video_decoder, | 296 int32_t (*GetPicture)(PP_Resource video_decoder, |
295 struct PP_VideoPicture* picture, | 297 struct PP_VideoPicture* picture, |
296 struct PP_CompletionCallback callback); | 298 struct PP_CompletionCallback callback); |
297 void (*RecyclePicture)(PP_Resource video_decoder, | 299 void (*RecyclePicture)(PP_Resource video_decoder, |
298 const struct PP_VideoPicture* picture); | 300 const struct PP_VideoPicture* picture); |
299 int32_t (*Flush)(PP_Resource video_decoder, | 301 int32_t (*Flush)(PP_Resource video_decoder, |
300 struct PP_CompletionCallback callback); | 302 struct PP_CompletionCallback callback); |
301 int32_t (*Reset)(PP_Resource video_decoder, | 303 int32_t (*Reset)(PP_Resource video_decoder, |
302 struct PP_CompletionCallback callback); | 304 struct PP_CompletionCallback callback); |
303 }; | 305 }; |
304 | |
305 typedef struct PPB_VideoDecoder_1_0 PPB_VideoDecoder; | |
306 /** | 306 /** |
307 * @} | 307 * @} |
308 */ | 308 */ |
309 | 309 |
310 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */ | 310 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */ |
311 | 311 |
OLD | NEW |