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 Tue May 29 10:59:23 2012. */ | 6 /* From dev/ppp_video_decoder_dev.idl modified Fri Dec 13 15:21:30 2013. */ |
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" | |
19 #define PPP_VIDEODECODER_DEV_INTERFACE_0_10 "PPP_VideoDecoder(Dev);0.10" | |
20 #define PPP_VIDEODECODER_DEV_INTERFACE_0_11 "PPP_VideoDecoder(Dev);0.11" | 18 #define PPP_VIDEODECODER_DEV_INTERFACE_0_11 "PPP_VideoDecoder(Dev);0.11" |
21 #define PPP_VIDEODECODER_DEV_INTERFACE PPP_VIDEODECODER_DEV_INTERFACE_0_11 | 19 #define PPP_VIDEODECODER_DEV_INTERFACE PPP_VIDEODECODER_DEV_INTERFACE_0_11 |
22 | 20 |
23 /** | 21 /** |
24 * @file | 22 * @file |
25 * This file defines the <code>PPP_VideoDecoder_Dev</code> interface. | 23 * This file defines the <code>PPP_VideoDecoder_Dev</code> interface. |
26 */ | 24 */ |
27 | 25 |
28 | 26 |
29 /** | 27 /** |
(...skipping 14 matching lines...) Expand all Loading... |
44 * to the API. If |req_num_of_bufs| matching exactly the specification | 42 * to the API. If |req_num_of_bufs| matching exactly the specification |
45 * given in the parameters cannot be allocated decoder should be destroyed. | 43 * given in the parameters cannot be allocated decoder should be destroyed. |
46 * | 44 * |
47 * Decoding will not proceed until buffers have been provided. | 45 * Decoding will not proceed until buffers have been provided. |
48 * | 46 * |
49 * Parameters: | 47 * Parameters: |
50 * |instance| the plugin instance to which the callback is responding. | 48 * |instance| the plugin instance to which the callback is responding. |
51 * |decoder| the PPB_VideoDecoder_Dev resource. | 49 * |decoder| the PPB_VideoDecoder_Dev resource. |
52 * |req_num_of_bufs| tells how many buffers are needed by the decoder. | 50 * |req_num_of_bufs| tells how many buffers are needed by the decoder. |
53 * |dimensions| tells the dimensions of the buffer to allocate. | 51 * |dimensions| tells the dimensions of the buffer to allocate. |
54 * |texture_target| the type of texture used. | 52 * |texture_target| the type of texture used. Sample targets in use are |
| 53 * TEXTURE_2D (most platforms) and TEXTURE_EXTERNAL_OES (on ARM). |
55 */ | 54 */ |
56 void (*ProvidePictureBuffers)(PP_Instance instance, | 55 void (*ProvidePictureBuffers)(PP_Instance instance, |
57 PP_Resource decoder, | 56 PP_Resource decoder, |
58 uint32_t req_num_of_bufs, | 57 uint32_t req_num_of_bufs, |
59 const struct PP_Size* dimensions, | 58 const struct PP_Size* dimensions, |
60 uint32_t texture_target); | 59 uint32_t texture_target); |
61 /** | 60 /** |
62 * Callback function for decoder to deliver unneeded picture buffers back to | 61 * Callback function for decoder to deliver unneeded picture buffers back to |
63 * the plugin. | 62 * the plugin. |
64 * | 63 * |
(...skipping 26 matching lines...) Expand all Loading... |
91 * |instance| the plugin instance to which the callback is responding. | 90 * |instance| the plugin instance to which the callback is responding. |
92 * |decoder| the PPB_VideoDecoder_Dev resource. | 91 * |decoder| the PPB_VideoDecoder_Dev resource. |
93 * |error| error is the enumeration specifying the error. | 92 * |error| error is the enumeration specifying the error. |
94 */ | 93 */ |
95 void (*NotifyError)(PP_Instance instance, | 94 void (*NotifyError)(PP_Instance instance, |
96 PP_Resource decoder, | 95 PP_Resource decoder, |
97 PP_VideoDecodeError_Dev error); | 96 PP_VideoDecodeError_Dev error); |
98 }; | 97 }; |
99 | 98 |
100 typedef struct PPP_VideoDecoder_Dev_0_11 PPP_VideoDecoder_Dev; | 99 typedef struct PPP_VideoDecoder_Dev_0_11 PPP_VideoDecoder_Dev; |
101 | |
102 struct PPP_VideoDecoder_Dev_0_9 { | |
103 void (*ProvidePictureBuffers)(PP_Instance instance, | |
104 PP_Resource decoder, | |
105 uint32_t req_num_of_bufs, | |
106 const struct PP_Size* dimensions); | |
107 void (*DismissPictureBuffer)(PP_Instance instance, | |
108 PP_Resource decoder, | |
109 int32_t picture_buffer_id); | |
110 void (*PictureReady)(PP_Instance instance, | |
111 PP_Resource decoder, | |
112 const struct PP_Picture_Dev* picture); | |
113 void (*EndOfStream)(PP_Instance instance, PP_Resource decoder); | |
114 void (*NotifyError)(PP_Instance instance, | |
115 PP_Resource decoder, | |
116 PP_VideoDecodeError_Dev error); | |
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 }; | |
134 /** | 100 /** |
135 * @} | 101 * @} |
136 */ | 102 */ |
137 | 103 |
138 #endif /* PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ */ | 104 #endif /* PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ */ |
139 | 105 |
OLD | NEW |