| 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 Fri Aug 22 13:42:35 2014. */ | 6 /* From ppb_video_decoder.idl modified Fri Sep 5 17:38:12 2014. */ |
| 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_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
| 17 #include "ppapi/c/pp_size.h" | 17 #include "ppapi/c/pp_size.h" |
| 18 #include "ppapi/c/pp_stdint.h" | 18 #include "ppapi/c/pp_stdint.h" |
| 19 | 19 |
| 20 #define PPB_VIDEODECODER_INTERFACE_0_1 "PPB_VideoDecoder;0.1" /* dev */ | 20 #define PPB_VIDEODECODER_INTERFACE_0_2 "PPB_VideoDecoder;0.2" |
| 21 #define PPB_VIDEODECODER_INTERFACE_0_2 "PPB_VideoDecoder;0.2" /* dev */ | 21 #define PPB_VIDEODECODER_INTERFACE PPB_VIDEODECODER_INTERFACE_0_2 |
| 22 |
| 22 /** | 23 /** |
| 23 * @file | 24 * @file |
| 24 * This file defines the <code>PPB_VideoDecoder</code> interface. | 25 * This file defines the <code>PPB_VideoDecoder</code> interface. |
| 25 */ | 26 */ |
| 26 | 27 |
| 27 | 28 |
| 28 /** | 29 /** |
| 29 * @addtogroup Interfaces | 30 * @addtogroup Interfaces |
| 30 * @{ | 31 * @{ |
| 31 */ | 32 */ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 45 * - Call Reset() to quickly stop the decoder (e.g. to implement Seek) and wait | 46 * - Call Reset() to quickly stop the decoder (e.g. to implement Seek) and wait |
| 46 * for the callback before restarting decoding at another point. | 47 * for the callback before restarting decoding at another point. |
| 47 * - To destroy the decoder, the plugin should release all of its references to | 48 * - To destroy the decoder, the plugin should release all of its references to |
| 48 * it. Any pending callbacks will abort before the decoder is destroyed. | 49 * it. Any pending callbacks will abort before the decoder is destroyed. |
| 49 * | 50 * |
| 50 * Available video codecs vary by platform. | 51 * Available video codecs vary by platform. |
| 51 * All: theora, vorbis, vp8. | 52 * All: theora, vorbis, vp8. |
| 52 * Chrome and ChromeOS: aac, h264. | 53 * Chrome and ChromeOS: aac, h264. |
| 53 * ChromeOS: mpeg4. | 54 * ChromeOS: mpeg4. |
| 54 */ | 55 */ |
| 55 struct PPB_VideoDecoder_0_2 { /* dev */ | 56 struct PPB_VideoDecoder_0_2 { |
| 56 /** | 57 /** |
| 57 * Creates a new video decoder resource. | 58 * Creates a new video decoder resource. |
| 58 * | 59 * |
| 59 * @param[in] instance A <code>PP_Instance</code> identifying the instance | 60 * @param[in] instance A <code>PP_Instance</code> identifying the instance |
| 60 * with the video decoder. | 61 * with the video decoder. |
| 61 * | 62 * |
| 62 * @return A <code>PP_Resource</code> corresponding to a video decoder if | 63 * @return A <code>PP_Resource</code> corresponding to a video decoder if |
| 63 * successful or 0 otherwise. | 64 * successful or 0 otherwise. |
| 64 */ | 65 */ |
| 65 PP_Resource (*Create)(PP_Instance instance); | 66 PP_Resource (*Create)(PP_Instance instance); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on | 209 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on |
| 209 * completion. | 210 * completion. |
| 210 * | 211 * |
| 211 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 212 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 212 * Returns PP_ERROR_FAILED if the decoder isn't initialized. | 213 * Returns PP_ERROR_FAILED if the decoder isn't initialized. |
| 213 */ | 214 */ |
| 214 int32_t (*Reset)(PP_Resource video_decoder, | 215 int32_t (*Reset)(PP_Resource video_decoder, |
| 215 struct PP_CompletionCallback callback); | 216 struct PP_CompletionCallback callback); |
| 216 }; | 217 }; |
| 217 | 218 |
| 218 struct PPB_VideoDecoder_0_1 { /* dev */ | 219 typedef struct PPB_VideoDecoder_0_2 PPB_VideoDecoder; |
| 219 PP_Resource (*Create)(PP_Instance instance); | |
| 220 PP_Bool (*IsVideoDecoder)(PP_Resource resource); | |
| 221 int32_t (*Initialize)(PP_Resource video_decoder, | |
| 222 PP_Resource graphics3d_context, | |
| 223 PP_VideoProfile profile, | |
| 224 PP_Bool allow_software_fallback, | |
| 225 struct PP_CompletionCallback callback); | |
| 226 int32_t (*Decode)(PP_Resource video_decoder, | |
| 227 uint32_t decode_id, | |
| 228 uint32_t size, | |
| 229 const void* buffer, | |
| 230 struct PP_CompletionCallback callback); | |
| 231 int32_t (*GetPicture)(PP_Resource video_decoder, | |
| 232 struct PP_VideoPicture* picture, | |
| 233 struct PP_CompletionCallback callback); | |
| 234 void (*RecyclePicture)(PP_Resource video_decoder, | |
| 235 const struct PP_VideoPicture* picture); | |
| 236 int32_t (*Flush)(PP_Resource video_decoder, | |
| 237 struct PP_CompletionCallback callback); | |
| 238 int32_t (*Reset)(PP_Resource video_decoder, | |
| 239 struct PP_CompletionCallback callback); | |
| 240 }; | |
| 241 /** | 220 /** |
| 242 * @} | 221 * @} |
| 243 */ | 222 */ |
| 244 | 223 |
| 245 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */ | 224 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */ |
| 246 | 225 |
| OLD | NEW |