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