| 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 dev/ppb_video_decoder_dev.idl modified Wed Dec 14 18:08:00 2011. */ | 6 /* From dev/ppb_video_decoder_dev.idl modified Wed May 16 18:52:55 2012. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ |
| 9 #define PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ | 9 #define PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/dev/pp_video_dev.h" | 11 #include "ppapi/c/dev/pp_video_dev.h" |
| 12 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.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_DEV_INTERFACE_0_16 "PPB_VideoDecoder(Dev);0.16" | 20 #define PPB_VIDEODECODER_DEV_INTERFACE_0_17 "PPB_VideoDecoder(Dev);0.17" |
| 21 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_16 | 21 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_17 |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * @file | 24 * @file |
| 25 * This file defines the <code>PPB_VideoDecoder_Dev</code> interface. | 25 * This file defines the <code>PPB_VideoDecoder_Dev</code> interface. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 | 28 |
| 29 /** | 29 /** |
| 30 * @addtogroup Interfaces | 30 * @addtogroup Interfaces |
| 31 * @{ | 31 * @{ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 42 * - Hand the textures back to the decoder using ReusePictureBuffer. | 42 * - Hand the textures back to the decoder using ReusePictureBuffer. |
| 43 * - To signal EOS to the decoder: call Flush() and wait for NotifyFlushDone | 43 * - To signal EOS to the decoder: call Flush() and wait for NotifyFlushDone |
| 44 * callback. | 44 * callback. |
| 45 * - To reset the decoder (e.g. to implement Seek): call Reset() and wait for | 45 * - To reset the decoder (e.g. to implement Seek): call Reset() and wait for |
| 46 * NotifyResetDone callback. | 46 * NotifyResetDone callback. |
| 47 * - To tear down the decoder call Destroy(). | 47 * - To tear down the decoder call Destroy(). |
| 48 * | 48 * |
| 49 * See PPP_VideoDecoder_Dev for the notifications the decoder may send the | 49 * See PPP_VideoDecoder_Dev for the notifications the decoder may send the |
| 50 * plugin. | 50 * plugin. |
| 51 */ | 51 */ |
| 52 struct PPB_VideoDecoder_Dev_0_16 { | 52 struct PPB_VideoDecoder_Dev_0_17 { |
| 53 /** | 53 /** |
| 54 * Creates & initializes a video decoder. | 54 * Creates & initializes a video decoder. |
| 55 * | 55 * |
| 56 * Parameters: | 56 * Parameters: |
| 57 * |instance| pointer to the plugin instance. | 57 * |instance| pointer to the plugin instance. |
| 58 * |context| a PPB_Graphics3D resource in which decoding will happen. | 58 * |context| a PPB_Graphics3D resource in which decoding will happen. |
| 59 * |profile| the video stream's format profile. | 59 * |profile| the video stream's format profile. |
| 60 * |frame_size| the width and height of the video frame. This parameter is |
| 61 * optional and can be set to 0,0. |
| 62 * |extra_data| is the byte data required to initialize video decoders, for |
| 63 * example the H.264 AAVC data. This parameter is optional and can be set |
| 64 * to an empty array. |
| 65 * |extra_data_size| the size of the extra_data array. |
| 60 * | 66 * |
| 61 * The created decoder is returned as PP_Resource. 0 means failure. | 67 * The created decoder is returned as PP_Resource. 0 means failure. |
| 62 */ | 68 */ |
| 63 PP_Resource (*Create)(PP_Instance instance, | 69 PP_Resource (*Create)(PP_Instance instance, |
| 64 PP_Resource context, | 70 PP_Resource context, |
| 65 PP_VideoDecoder_Profile profile); | 71 PP_VideoDecoder_Profile profile, |
| 72 const struct PP_Size* frame_size, |
| 73 const uint8_t extra_data[], |
| 74 uint32_t extra_data_size); |
| 66 /** | 75 /** |
| 67 * Tests whether |resource| is a video decoder created through Create | 76 * Tests whether |resource| is a video decoder created through Create |
| 68 * function of this interface. | 77 * function of this interface. |
| 69 * | 78 * |
| 70 * Parameters: | 79 * Parameters: |
| 71 * |resource| is handle to resource to test. | 80 * |resource| is handle to resource to test. |
| 72 * | 81 * |
| 73 * Returns true if is a video decoder, false otherwise. | 82 * Returns true if is a video decoder, false otherwise. |
| 74 */ | 83 */ |
| 75 PP_Bool (*IsVideoDecoder)(PP_Resource resource); | 84 PP_Bool (*IsVideoDecoder)(PP_Resource resource); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 * may be freed asynchronously, after this method returns no more callbacks | 160 * may be freed asynchronously, after this method returns no more callbacks |
| 152 * will be made on the client. Any resources held by the client at that point | 161 * will be made on the client. Any resources held by the client at that point |
| 153 * may be freed. | 162 * may be freed. |
| 154 * | 163 * |
| 155 * Parameters: | 164 * Parameters: |
| 156 * |video_decoder| is the previously created handle to the decoder resource. | 165 * |video_decoder| is the previously created handle to the decoder resource. |
| 157 */ | 166 */ |
| 158 void (*Destroy)(PP_Resource video_decoder); | 167 void (*Destroy)(PP_Resource video_decoder); |
| 159 }; | 168 }; |
| 160 | 169 |
| 161 typedef struct PPB_VideoDecoder_Dev_0_16 PPB_VideoDecoder_Dev; | 170 typedef struct PPB_VideoDecoder_Dev_0_17 PPB_VideoDecoder_Dev; |
| 162 /** | 171 /** |
| 163 * @} | 172 * @} |
| 164 */ | 173 */ |
| 165 | 174 |
| 166 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */ | 175 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */ |
| 167 | 176 |
| OLD | NEW |