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/ppp_video_decoder_dev.idl modified Wed Jan 11 14:58:58 2012. */ | 6 /* From dev/ppp_video_decoder_dev.idl modified Tue May 29 10:59:23 2012. */ |
7 | 7 |
8 #ifndef PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ |
9 #define PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ | 9 #define PPAPI_C_DEV_PPP_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_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
15 #include "ppapi/c/pp_size.h" | 15 #include "ppapi/c/pp_size.h" |
16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
17 | 17 |
18 #define PPP_VIDEODECODER_DEV_INTERFACE_0_9 "PPP_VideoDecoder(Dev);0.9" | 18 #define PPP_VIDEODECODER_DEV_INTERFACE_0_9 "PPP_VideoDecoder(Dev);0.9" |
19 #define PPP_VIDEODECODER_DEV_INTERFACE_0_10 "PPP_VideoDecoder(Dev);0.10" | 19 #define PPP_VIDEODECODER_DEV_INTERFACE_0_10 "PPP_VideoDecoder(Dev);0.10" |
20 #define PPP_VIDEODECODER_DEV_INTERFACE PPP_VIDEODECODER_DEV_INTERFACE_0_10 | 20 #define PPP_VIDEODECODER_DEV_INTERFACE_0_11 "PPP_VideoDecoder(Dev);0.11" |
| 21 #define PPP_VIDEODECODER_DEV_INTERFACE PPP_VIDEODECODER_DEV_INTERFACE_0_11 |
21 | 22 |
22 /** | 23 /** |
23 * @file | 24 * @file |
24 * This file defines the <code>PPP_VideoDecoder_Dev</code> interface. | 25 * This file defines the <code>PPP_VideoDecoder_Dev</code> interface. |
25 */ | 26 */ |
26 | 27 |
27 | 28 |
28 /** | 29 /** |
29 * @addtogroup Interfaces | 30 * @addtogroup Interfaces |
30 * @{ | 31 * @{ |
31 */ | 32 */ |
32 /** | 33 /** |
33 * PPP_VideoDecoder_Dev structure contains the function pointers that the | 34 * PPP_VideoDecoder_Dev structure contains the function pointers that the |
34 * plugin MUST implement to provide services needed by the video decoder | 35 * plugin MUST implement to provide services needed by the video decoder |
35 * implementation. | 36 * implementation. |
36 * | 37 * |
37 * See PPB_VideoDecoder_Dev for general usage tips. | 38 * See PPB_VideoDecoder_Dev for general usage tips. |
38 */ | 39 */ |
39 struct PPP_VideoDecoder_Dev_0_10 { | 40 struct PPP_VideoDecoder_Dev_0_11 { |
40 /** | 41 /** |
41 * Callback function to provide buffers for the decoded output pictures. If | 42 * Callback function to provide buffers for the decoded output pictures. If |
42 * succeeds plugin must provide buffers through AssignPictureBuffers function | 43 * succeeds plugin must provide buffers through AssignPictureBuffers function |
43 * to the API. If |req_num_of_bufs| matching exactly the specification | 44 * to the API. If |req_num_of_bufs| matching exactly the specification |
44 * given in the parameters cannot be allocated decoder should be destroyed. | 45 * given in the parameters cannot be allocated decoder should be destroyed. |
45 * | 46 * |
46 * Decoding will not proceed until buffers have been provided. | 47 * Decoding will not proceed until buffers have been provided. |
47 * | 48 * |
48 * Parameters: | 49 * Parameters: |
49 * |instance| the plugin instance to which the callback is responding. | 50 * |instance| the plugin instance to which the callback is responding. |
50 * |decoder| the PPB_VideoDecoder_Dev resource. | 51 * |decoder| the PPB_VideoDecoder_Dev resource. |
51 * |req_num_of_bufs| tells how many buffers are needed by the decoder. | 52 * |req_num_of_bufs| tells how many buffers are needed by the decoder. |
52 * |dimensions| tells the dimensions of the buffer to allocate. | 53 * |dimensions| tells the dimensions of the buffer to allocate. |
| 54 * |texture_target| the type of texture used. |
53 */ | 55 */ |
54 void (*ProvidePictureBuffers)(PP_Instance instance, | 56 void (*ProvidePictureBuffers)(PP_Instance instance, |
55 PP_Resource decoder, | 57 PP_Resource decoder, |
56 uint32_t req_num_of_bufs, | 58 uint32_t req_num_of_bufs, |
57 const struct PP_Size* dimensions); | 59 const struct PP_Size* dimensions, |
| 60 uint32_t texture_target); |
58 /** | 61 /** |
59 * Callback function for decoder to deliver unneeded picture buffers back to | 62 * Callback function for decoder to deliver unneeded picture buffers back to |
60 * the plugin. | 63 * the plugin. |
61 * | 64 * |
62 * Parameters: | 65 * Parameters: |
63 * |instance| the plugin instance to which the callback is responding. | 66 * |instance| the plugin instance to which the callback is responding. |
64 * |decoder| the PPB_VideoDecoder_Dev resource. | 67 * |decoder| the PPB_VideoDecoder_Dev resource. |
65 * |picture_buffer| points to the picture buffer that is no longer needed. | 68 * |picture_buffer| points to the picture buffer that is no longer needed. |
66 */ | 69 */ |
67 void (*DismissPictureBuffer)(PP_Instance instance, | 70 void (*DismissPictureBuffer)(PP_Instance instance, |
(...skipping 19 matching lines...) Expand all Loading... |
87 * Parameters: | 90 * Parameters: |
88 * |instance| the plugin instance to which the callback is responding. | 91 * |instance| the plugin instance to which the callback is responding. |
89 * |decoder| the PPB_VideoDecoder_Dev resource. | 92 * |decoder| the PPB_VideoDecoder_Dev resource. |
90 * |error| error is the enumeration specifying the error. | 93 * |error| error is the enumeration specifying the error. |
91 */ | 94 */ |
92 void (*NotifyError)(PP_Instance instance, | 95 void (*NotifyError)(PP_Instance instance, |
93 PP_Resource decoder, | 96 PP_Resource decoder, |
94 PP_VideoDecodeError_Dev error); | 97 PP_VideoDecodeError_Dev error); |
95 }; | 98 }; |
96 | 99 |
97 typedef struct PPP_VideoDecoder_Dev_0_10 PPP_VideoDecoder_Dev; | 100 typedef struct PPP_VideoDecoder_Dev_0_11 PPP_VideoDecoder_Dev; |
98 | 101 |
99 struct PPP_VideoDecoder_Dev_0_9 { | 102 struct PPP_VideoDecoder_Dev_0_9 { |
100 void (*ProvidePictureBuffers)(PP_Instance instance, | 103 void (*ProvidePictureBuffers)(PP_Instance instance, |
101 PP_Resource decoder, | 104 PP_Resource decoder, |
102 uint32_t req_num_of_bufs, | 105 uint32_t req_num_of_bufs, |
103 const struct PP_Size* dimensions); | 106 const struct PP_Size* dimensions); |
104 void (*DismissPictureBuffer)(PP_Instance instance, | 107 void (*DismissPictureBuffer)(PP_Instance instance, |
105 PP_Resource decoder, | 108 PP_Resource decoder, |
106 int32_t picture_buffer_id); | 109 int32_t picture_buffer_id); |
107 void (*PictureReady)(PP_Instance instance, | 110 void (*PictureReady)(PP_Instance instance, |
108 PP_Resource decoder, | 111 PP_Resource decoder, |
109 const struct PP_Picture_Dev* picture); | 112 const struct PP_Picture_Dev* picture); |
110 void (*EndOfStream)(PP_Instance instance, PP_Resource decoder); | 113 void (*EndOfStream)(PP_Instance instance, PP_Resource decoder); |
111 void (*NotifyError)(PP_Instance instance, | 114 void (*NotifyError)(PP_Instance instance, |
112 PP_Resource decoder, | 115 PP_Resource decoder, |
113 PP_VideoDecodeError_Dev error); | 116 PP_VideoDecodeError_Dev error); |
114 }; | 117 }; |
| 118 |
| 119 struct PPP_VideoDecoder_Dev_0_10 { |
| 120 void (*ProvidePictureBuffers)(PP_Instance instance, |
| 121 PP_Resource decoder, |
| 122 uint32_t req_num_of_bufs, |
| 123 const struct PP_Size* dimensions); |
| 124 void (*DismissPictureBuffer)(PP_Instance instance, |
| 125 PP_Resource decoder, |
| 126 int32_t picture_buffer_id); |
| 127 void (*PictureReady)(PP_Instance instance, |
| 128 PP_Resource decoder, |
| 129 const struct PP_Picture_Dev* picture); |
| 130 void (*NotifyError)(PP_Instance instance, |
| 131 PP_Resource decoder, |
| 132 PP_VideoDecodeError_Dev error); |
| 133 }; |
115 /** | 134 /** |
116 * @} | 135 * @} |
117 */ | 136 */ |
118 | 137 |
119 #endif /* PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ */ | 138 #endif /* PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ */ |
120 | 139 |
OLD | NEW |