xref: /minix3/external/mit/xorg/lib/libxcb/files/xvmc.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1971bb1a5SLionel Sambuc /*
2971bb1a5SLionel Sambuc  * This file generated automatically from xvmc.xml by c_client.py.
3971bb1a5SLionel Sambuc  * Edit at your peril.
4971bb1a5SLionel Sambuc  */
5971bb1a5SLionel Sambuc 
6971bb1a5SLionel Sambuc #ifdef HAVE_CONFIG_H
7971bb1a5SLionel Sambuc #include "config.h"
8971bb1a5SLionel Sambuc #endif
9971bb1a5SLionel Sambuc #include <stdlib.h>
10971bb1a5SLionel Sambuc #include <string.h>
11971bb1a5SLionel Sambuc #include <assert.h>
12971bb1a5SLionel Sambuc #include <stddef.h>  /* for offsetof() */
13971bb1a5SLionel Sambuc #include "xcbext.h"
14971bb1a5SLionel Sambuc #include "xvmc.h"
15971bb1a5SLionel Sambuc 
16971bb1a5SLionel Sambuc #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17971bb1a5SLionel Sambuc #include "xv.h"
18971bb1a5SLionel Sambuc 
19971bb1a5SLionel Sambuc xcb_extension_t xcb_xvmc_id = { "XVideo-MotionCompensation", 0 };
20971bb1a5SLionel Sambuc 
21971bb1a5SLionel Sambuc void
xcb_xvmc_context_next(xcb_xvmc_context_iterator_t * i)22971bb1a5SLionel Sambuc xcb_xvmc_context_next (xcb_xvmc_context_iterator_t *i  /**< */)
23971bb1a5SLionel Sambuc {
24971bb1a5SLionel Sambuc     --i->rem;
25971bb1a5SLionel Sambuc     ++i->data;
26971bb1a5SLionel Sambuc     i->index += sizeof(xcb_xvmc_context_t);
27971bb1a5SLionel Sambuc }
28971bb1a5SLionel Sambuc 
29971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xvmc_context_end(xcb_xvmc_context_iterator_t i)30971bb1a5SLionel Sambuc xcb_xvmc_context_end (xcb_xvmc_context_iterator_t i  /**< */)
31971bb1a5SLionel Sambuc {
32971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
33971bb1a5SLionel Sambuc     ret.data = i.data + i.rem;
34971bb1a5SLionel Sambuc     ret.index = i.index + ((char *) ret.data - (char *) i.data);
35971bb1a5SLionel Sambuc     ret.rem = 0;
36971bb1a5SLionel Sambuc     return ret;
37971bb1a5SLionel Sambuc }
38971bb1a5SLionel Sambuc 
39971bb1a5SLionel Sambuc void
xcb_xvmc_surface_next(xcb_xvmc_surface_iterator_t * i)40971bb1a5SLionel Sambuc xcb_xvmc_surface_next (xcb_xvmc_surface_iterator_t *i  /**< */)
41971bb1a5SLionel Sambuc {
42971bb1a5SLionel Sambuc     --i->rem;
43971bb1a5SLionel Sambuc     ++i->data;
44971bb1a5SLionel Sambuc     i->index += sizeof(xcb_xvmc_surface_t);
45971bb1a5SLionel Sambuc }
46971bb1a5SLionel Sambuc 
47971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xvmc_surface_end(xcb_xvmc_surface_iterator_t i)48971bb1a5SLionel Sambuc xcb_xvmc_surface_end (xcb_xvmc_surface_iterator_t i  /**< */)
49971bb1a5SLionel Sambuc {
50971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
51971bb1a5SLionel Sambuc     ret.data = i.data + i.rem;
52971bb1a5SLionel Sambuc     ret.index = i.index + ((char *) ret.data - (char *) i.data);
53971bb1a5SLionel Sambuc     ret.rem = 0;
54971bb1a5SLionel Sambuc     return ret;
55971bb1a5SLionel Sambuc }
56971bb1a5SLionel Sambuc 
57971bb1a5SLionel Sambuc void
xcb_xvmc_subpicture_next(xcb_xvmc_subpicture_iterator_t * i)58971bb1a5SLionel Sambuc xcb_xvmc_subpicture_next (xcb_xvmc_subpicture_iterator_t *i  /**< */)
59971bb1a5SLionel Sambuc {
60971bb1a5SLionel Sambuc     --i->rem;
61971bb1a5SLionel Sambuc     ++i->data;
62971bb1a5SLionel Sambuc     i->index += sizeof(xcb_xvmc_subpicture_t);
63971bb1a5SLionel Sambuc }
64971bb1a5SLionel Sambuc 
65971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xvmc_subpicture_end(xcb_xvmc_subpicture_iterator_t i)66971bb1a5SLionel Sambuc xcb_xvmc_subpicture_end (xcb_xvmc_subpicture_iterator_t i  /**< */)
67971bb1a5SLionel Sambuc {
68971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
69971bb1a5SLionel Sambuc     ret.data = i.data + i.rem;
70971bb1a5SLionel Sambuc     ret.index = i.index + ((char *) ret.data - (char *) i.data);
71971bb1a5SLionel Sambuc     ret.rem = 0;
72971bb1a5SLionel Sambuc     return ret;
73971bb1a5SLionel Sambuc }
74971bb1a5SLionel Sambuc 
75971bb1a5SLionel Sambuc void
xcb_xvmc_surface_info_next(xcb_xvmc_surface_info_iterator_t * i)76971bb1a5SLionel Sambuc xcb_xvmc_surface_info_next (xcb_xvmc_surface_info_iterator_t *i  /**< */)
77971bb1a5SLionel Sambuc {
78971bb1a5SLionel Sambuc     --i->rem;
79971bb1a5SLionel Sambuc     ++i->data;
80971bb1a5SLionel Sambuc     i->index += sizeof(xcb_xvmc_surface_info_t);
81971bb1a5SLionel Sambuc }
82971bb1a5SLionel Sambuc 
83971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xvmc_surface_info_end(xcb_xvmc_surface_info_iterator_t i)84971bb1a5SLionel Sambuc xcb_xvmc_surface_info_end (xcb_xvmc_surface_info_iterator_t i  /**< */)
85971bb1a5SLionel Sambuc {
86971bb1a5SLionel Sambuc     xcb_generic_iterator_t ret;
87971bb1a5SLionel Sambuc     ret.data = i.data + i.rem;
88971bb1a5SLionel Sambuc     ret.index = i.index + ((char *) ret.data - (char *) i.data);
89971bb1a5SLionel Sambuc     ret.rem = 0;
90971bb1a5SLionel Sambuc     return ret;
91971bb1a5SLionel Sambuc }
92971bb1a5SLionel Sambuc 
93971bb1a5SLionel Sambuc xcb_xvmc_query_version_cookie_t
xcb_xvmc_query_version(xcb_connection_t * c)94971bb1a5SLionel Sambuc xcb_xvmc_query_version (xcb_connection_t *c  /**< */)
95971bb1a5SLionel Sambuc {
96971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
97971bb1a5SLionel Sambuc         /* count */ 2,
98971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
99971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_QUERY_VERSION,
100971bb1a5SLionel Sambuc         /* isvoid */ 0
101971bb1a5SLionel Sambuc     };
102971bb1a5SLionel Sambuc 
103971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
104971bb1a5SLionel Sambuc     xcb_xvmc_query_version_cookie_t xcb_ret;
105971bb1a5SLionel Sambuc     xcb_xvmc_query_version_request_t xcb_out;
106971bb1a5SLionel Sambuc 
107971bb1a5SLionel Sambuc 
108971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
109971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
110971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
111971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
112971bb1a5SLionel Sambuc 
113971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
114971bb1a5SLionel Sambuc     return xcb_ret;
115971bb1a5SLionel Sambuc }
116971bb1a5SLionel Sambuc 
117971bb1a5SLionel Sambuc xcb_xvmc_query_version_cookie_t
xcb_xvmc_query_version_unchecked(xcb_connection_t * c)118971bb1a5SLionel Sambuc xcb_xvmc_query_version_unchecked (xcb_connection_t *c  /**< */)
119971bb1a5SLionel Sambuc {
120971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
121971bb1a5SLionel Sambuc         /* count */ 2,
122971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
123971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_QUERY_VERSION,
124971bb1a5SLionel Sambuc         /* isvoid */ 0
125971bb1a5SLionel Sambuc     };
126971bb1a5SLionel Sambuc 
127971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
128971bb1a5SLionel Sambuc     xcb_xvmc_query_version_cookie_t xcb_ret;
129971bb1a5SLionel Sambuc     xcb_xvmc_query_version_request_t xcb_out;
130971bb1a5SLionel Sambuc 
131971bb1a5SLionel Sambuc 
132971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
133971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
134971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
135971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
136971bb1a5SLionel Sambuc 
137971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
138971bb1a5SLionel Sambuc     return xcb_ret;
139971bb1a5SLionel Sambuc }
140971bb1a5SLionel Sambuc 
141971bb1a5SLionel Sambuc xcb_xvmc_query_version_reply_t *
xcb_xvmc_query_version_reply(xcb_connection_t * c,xcb_xvmc_query_version_cookie_t cookie,xcb_generic_error_t ** e)142971bb1a5SLionel Sambuc xcb_xvmc_query_version_reply (xcb_connection_t                 *c  /**< */,
143971bb1a5SLionel Sambuc                               xcb_xvmc_query_version_cookie_t   cookie  /**< */,
144971bb1a5SLionel Sambuc                               xcb_generic_error_t             **e  /**< */)
145971bb1a5SLionel Sambuc {
146971bb1a5SLionel Sambuc     return (xcb_xvmc_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
147971bb1a5SLionel Sambuc }
148971bb1a5SLionel Sambuc 
149971bb1a5SLionel Sambuc int
xcb_xvmc_list_surface_types_sizeof(const void * _buffer)150971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types_sizeof (const void  *_buffer  /**< */)
151971bb1a5SLionel Sambuc {
152971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
153971bb1a5SLionel Sambuc     const xcb_xvmc_list_surface_types_reply_t *_aux = (xcb_xvmc_list_surface_types_reply_t *)_buffer;
154971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
155971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
156971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
157*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
158971bb1a5SLionel Sambuc 
159971bb1a5SLionel Sambuc 
160971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xvmc_list_surface_types_reply_t);
161971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
162*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
163*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
164971bb1a5SLionel Sambuc     /* surfaces */
165971bb1a5SLionel Sambuc     xcb_block_len += _aux->num * sizeof(xcb_xvmc_surface_info_t);
166971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
167971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(xcb_xvmc_surface_info_t);
168971bb1a5SLionel Sambuc     /* insert padding */
169971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
170971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
171971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
172971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
173971bb1a5SLionel Sambuc         xcb_pad = 0;
174971bb1a5SLionel Sambuc     }
175971bb1a5SLionel Sambuc     xcb_block_len = 0;
176971bb1a5SLionel Sambuc 
177971bb1a5SLionel Sambuc     return xcb_buffer_len;
178971bb1a5SLionel Sambuc }
179971bb1a5SLionel Sambuc 
180971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types_cookie_t
xcb_xvmc_list_surface_types(xcb_connection_t * c,xcb_xv_port_t port_id)181971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types (xcb_connection_t *c  /**< */,
182971bb1a5SLionel Sambuc                              xcb_xv_port_t     port_id  /**< */)
183971bb1a5SLionel Sambuc {
184971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
185971bb1a5SLionel Sambuc         /* count */ 2,
186971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
187971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_LIST_SURFACE_TYPES,
188971bb1a5SLionel Sambuc         /* isvoid */ 0
189971bb1a5SLionel Sambuc     };
190971bb1a5SLionel Sambuc 
191971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
192971bb1a5SLionel Sambuc     xcb_xvmc_list_surface_types_cookie_t xcb_ret;
193971bb1a5SLionel Sambuc     xcb_xvmc_list_surface_types_request_t xcb_out;
194971bb1a5SLionel Sambuc 
195971bb1a5SLionel Sambuc     xcb_out.port_id = port_id;
196971bb1a5SLionel Sambuc 
197971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
198971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
199971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
200971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
201971bb1a5SLionel Sambuc 
202971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
203971bb1a5SLionel Sambuc     return xcb_ret;
204971bb1a5SLionel Sambuc }
205971bb1a5SLionel Sambuc 
206971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types_cookie_t
xcb_xvmc_list_surface_types_unchecked(xcb_connection_t * c,xcb_xv_port_t port_id)207971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types_unchecked (xcb_connection_t *c  /**< */,
208971bb1a5SLionel Sambuc                                        xcb_xv_port_t     port_id  /**< */)
209971bb1a5SLionel Sambuc {
210971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
211971bb1a5SLionel Sambuc         /* count */ 2,
212971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
213971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_LIST_SURFACE_TYPES,
214971bb1a5SLionel Sambuc         /* isvoid */ 0
215971bb1a5SLionel Sambuc     };
216971bb1a5SLionel Sambuc 
217971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
218971bb1a5SLionel Sambuc     xcb_xvmc_list_surface_types_cookie_t xcb_ret;
219971bb1a5SLionel Sambuc     xcb_xvmc_list_surface_types_request_t xcb_out;
220971bb1a5SLionel Sambuc 
221971bb1a5SLionel Sambuc     xcb_out.port_id = port_id;
222971bb1a5SLionel Sambuc 
223971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
224971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
225971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
226971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
227971bb1a5SLionel Sambuc 
228971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
229971bb1a5SLionel Sambuc     return xcb_ret;
230971bb1a5SLionel Sambuc }
231971bb1a5SLionel Sambuc 
232971bb1a5SLionel Sambuc xcb_xvmc_surface_info_t *
xcb_xvmc_list_surface_types_surfaces(const xcb_xvmc_list_surface_types_reply_t * R)233971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types_surfaces (const xcb_xvmc_list_surface_types_reply_t *R  /**< */)
234971bb1a5SLionel Sambuc {
235971bb1a5SLionel Sambuc     return (xcb_xvmc_surface_info_t *) (R + 1);
236971bb1a5SLionel Sambuc }
237971bb1a5SLionel Sambuc 
238971bb1a5SLionel Sambuc int
xcb_xvmc_list_surface_types_surfaces_length(const xcb_xvmc_list_surface_types_reply_t * R)239971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types_surfaces_length (const xcb_xvmc_list_surface_types_reply_t *R  /**< */)
240971bb1a5SLionel Sambuc {
241971bb1a5SLionel Sambuc     return R->num;
242971bb1a5SLionel Sambuc }
243971bb1a5SLionel Sambuc 
244971bb1a5SLionel Sambuc xcb_xvmc_surface_info_iterator_t
xcb_xvmc_list_surface_types_surfaces_iterator(const xcb_xvmc_list_surface_types_reply_t * R)245971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types_surfaces_iterator (const xcb_xvmc_list_surface_types_reply_t *R  /**< */)
246971bb1a5SLionel Sambuc {
247971bb1a5SLionel Sambuc     xcb_xvmc_surface_info_iterator_t i;
248971bb1a5SLionel Sambuc     i.data = (xcb_xvmc_surface_info_t *) (R + 1);
249971bb1a5SLionel Sambuc     i.rem = R->num;
250971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
251971bb1a5SLionel Sambuc     return i;
252971bb1a5SLionel Sambuc }
253971bb1a5SLionel Sambuc 
254971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types_reply_t *
xcb_xvmc_list_surface_types_reply(xcb_connection_t * c,xcb_xvmc_list_surface_types_cookie_t cookie,xcb_generic_error_t ** e)255971bb1a5SLionel Sambuc xcb_xvmc_list_surface_types_reply (xcb_connection_t                      *c  /**< */,
256971bb1a5SLionel Sambuc                                    xcb_xvmc_list_surface_types_cookie_t   cookie  /**< */,
257971bb1a5SLionel Sambuc                                    xcb_generic_error_t                  **e  /**< */)
258971bb1a5SLionel Sambuc {
259971bb1a5SLionel Sambuc     return (xcb_xvmc_list_surface_types_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
260971bb1a5SLionel Sambuc }
261971bb1a5SLionel Sambuc 
262971bb1a5SLionel Sambuc int
xcb_xvmc_create_context_sizeof(const void * _buffer)263971bb1a5SLionel Sambuc xcb_xvmc_create_context_sizeof (const void  *_buffer  /**< */)
264971bb1a5SLionel Sambuc {
265971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
266971bb1a5SLionel Sambuc     const xcb_xvmc_create_context_reply_t *_aux = (xcb_xvmc_create_context_reply_t *)_buffer;
267971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
268971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
269971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
270*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
271971bb1a5SLionel Sambuc 
272971bb1a5SLionel Sambuc 
273971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xvmc_create_context_reply_t);
274971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
275*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
276*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
277971bb1a5SLionel Sambuc     /* priv_data */
278971bb1a5SLionel Sambuc     xcb_block_len += _aux->length * sizeof(uint32_t);
279971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
280971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(uint32_t);
281971bb1a5SLionel Sambuc     /* insert padding */
282971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
283971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
284971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
285971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
286971bb1a5SLionel Sambuc         xcb_pad = 0;
287971bb1a5SLionel Sambuc     }
288971bb1a5SLionel Sambuc     xcb_block_len = 0;
289971bb1a5SLionel Sambuc 
290971bb1a5SLionel Sambuc     return xcb_buffer_len;
291971bb1a5SLionel Sambuc }
292971bb1a5SLionel Sambuc 
293971bb1a5SLionel Sambuc xcb_xvmc_create_context_cookie_t
xcb_xvmc_create_context(xcb_connection_t * c,xcb_xvmc_context_t context_id,xcb_xv_port_t port_id,xcb_xvmc_surface_t surface_id,uint16_t width,uint16_t height,uint32_t flags)294971bb1a5SLionel Sambuc xcb_xvmc_create_context (xcb_connection_t   *c  /**< */,
295971bb1a5SLionel Sambuc                          xcb_xvmc_context_t  context_id  /**< */,
296971bb1a5SLionel Sambuc                          xcb_xv_port_t       port_id  /**< */,
297971bb1a5SLionel Sambuc                          xcb_xvmc_surface_t  surface_id  /**< */,
298971bb1a5SLionel Sambuc                          uint16_t            width  /**< */,
299971bb1a5SLionel Sambuc                          uint16_t            height  /**< */,
300971bb1a5SLionel Sambuc                          uint32_t            flags  /**< */)
301971bb1a5SLionel Sambuc {
302971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
303971bb1a5SLionel Sambuc         /* count */ 2,
304971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
305971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_CREATE_CONTEXT,
306971bb1a5SLionel Sambuc         /* isvoid */ 0
307971bb1a5SLionel Sambuc     };
308971bb1a5SLionel Sambuc 
309971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
310971bb1a5SLionel Sambuc     xcb_xvmc_create_context_cookie_t xcb_ret;
311971bb1a5SLionel Sambuc     xcb_xvmc_create_context_request_t xcb_out;
312971bb1a5SLionel Sambuc 
313971bb1a5SLionel Sambuc     xcb_out.context_id = context_id;
314971bb1a5SLionel Sambuc     xcb_out.port_id = port_id;
315971bb1a5SLionel Sambuc     xcb_out.surface_id = surface_id;
316971bb1a5SLionel Sambuc     xcb_out.width = width;
317971bb1a5SLionel Sambuc     xcb_out.height = height;
318971bb1a5SLionel Sambuc     xcb_out.flags = flags;
319971bb1a5SLionel Sambuc 
320971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
321971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
322971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
323971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
324971bb1a5SLionel Sambuc 
325971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
326971bb1a5SLionel Sambuc     return xcb_ret;
327971bb1a5SLionel Sambuc }
328971bb1a5SLionel Sambuc 
329971bb1a5SLionel Sambuc xcb_xvmc_create_context_cookie_t
xcb_xvmc_create_context_unchecked(xcb_connection_t * c,xcb_xvmc_context_t context_id,xcb_xv_port_t port_id,xcb_xvmc_surface_t surface_id,uint16_t width,uint16_t height,uint32_t flags)330971bb1a5SLionel Sambuc xcb_xvmc_create_context_unchecked (xcb_connection_t   *c  /**< */,
331971bb1a5SLionel Sambuc                                    xcb_xvmc_context_t  context_id  /**< */,
332971bb1a5SLionel Sambuc                                    xcb_xv_port_t       port_id  /**< */,
333971bb1a5SLionel Sambuc                                    xcb_xvmc_surface_t  surface_id  /**< */,
334971bb1a5SLionel Sambuc                                    uint16_t            width  /**< */,
335971bb1a5SLionel Sambuc                                    uint16_t            height  /**< */,
336971bb1a5SLionel Sambuc                                    uint32_t            flags  /**< */)
337971bb1a5SLionel Sambuc {
338971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
339971bb1a5SLionel Sambuc         /* count */ 2,
340971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
341971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_CREATE_CONTEXT,
342971bb1a5SLionel Sambuc         /* isvoid */ 0
343971bb1a5SLionel Sambuc     };
344971bb1a5SLionel Sambuc 
345971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
346971bb1a5SLionel Sambuc     xcb_xvmc_create_context_cookie_t xcb_ret;
347971bb1a5SLionel Sambuc     xcb_xvmc_create_context_request_t xcb_out;
348971bb1a5SLionel Sambuc 
349971bb1a5SLionel Sambuc     xcb_out.context_id = context_id;
350971bb1a5SLionel Sambuc     xcb_out.port_id = port_id;
351971bb1a5SLionel Sambuc     xcb_out.surface_id = surface_id;
352971bb1a5SLionel Sambuc     xcb_out.width = width;
353971bb1a5SLionel Sambuc     xcb_out.height = height;
354971bb1a5SLionel Sambuc     xcb_out.flags = flags;
355971bb1a5SLionel Sambuc 
356971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
357971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
358971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
359971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
360971bb1a5SLionel Sambuc 
361971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
362971bb1a5SLionel Sambuc     return xcb_ret;
363971bb1a5SLionel Sambuc }
364971bb1a5SLionel Sambuc 
365971bb1a5SLionel Sambuc uint32_t *
xcb_xvmc_create_context_priv_data(const xcb_xvmc_create_context_reply_t * R)366971bb1a5SLionel Sambuc xcb_xvmc_create_context_priv_data (const xcb_xvmc_create_context_reply_t *R  /**< */)
367971bb1a5SLionel Sambuc {
368971bb1a5SLionel Sambuc     return (uint32_t *) (R + 1);
369971bb1a5SLionel Sambuc }
370971bb1a5SLionel Sambuc 
371971bb1a5SLionel Sambuc int
xcb_xvmc_create_context_priv_data_length(const xcb_xvmc_create_context_reply_t * R)372971bb1a5SLionel Sambuc xcb_xvmc_create_context_priv_data_length (const xcb_xvmc_create_context_reply_t *R  /**< */)
373971bb1a5SLionel Sambuc {
374971bb1a5SLionel Sambuc     return R->length;
375971bb1a5SLionel Sambuc }
376971bb1a5SLionel Sambuc 
377971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xvmc_create_context_priv_data_end(const xcb_xvmc_create_context_reply_t * R)378971bb1a5SLionel Sambuc xcb_xvmc_create_context_priv_data_end (const xcb_xvmc_create_context_reply_t *R  /**< */)
379971bb1a5SLionel Sambuc {
380971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
381971bb1a5SLionel Sambuc     i.data = ((uint32_t *) (R + 1)) + (R->length);
382971bb1a5SLionel Sambuc     i.rem = 0;
383971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
384971bb1a5SLionel Sambuc     return i;
385971bb1a5SLionel Sambuc }
386971bb1a5SLionel Sambuc 
387971bb1a5SLionel Sambuc xcb_xvmc_create_context_reply_t *
xcb_xvmc_create_context_reply(xcb_connection_t * c,xcb_xvmc_create_context_cookie_t cookie,xcb_generic_error_t ** e)388971bb1a5SLionel Sambuc xcb_xvmc_create_context_reply (xcb_connection_t                  *c  /**< */,
389971bb1a5SLionel Sambuc                                xcb_xvmc_create_context_cookie_t   cookie  /**< */,
390971bb1a5SLionel Sambuc                                xcb_generic_error_t              **e  /**< */)
391971bb1a5SLionel Sambuc {
392971bb1a5SLionel Sambuc     return (xcb_xvmc_create_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
393971bb1a5SLionel Sambuc }
394971bb1a5SLionel Sambuc 
395971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xvmc_destroy_context_checked(xcb_connection_t * c,xcb_xvmc_context_t context_id)396971bb1a5SLionel Sambuc xcb_xvmc_destroy_context_checked (xcb_connection_t   *c  /**< */,
397971bb1a5SLionel Sambuc                                   xcb_xvmc_context_t  context_id  /**< */)
398971bb1a5SLionel Sambuc {
399971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
400971bb1a5SLionel Sambuc         /* count */ 2,
401971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
402971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_DESTROY_CONTEXT,
403971bb1a5SLionel Sambuc         /* isvoid */ 1
404971bb1a5SLionel Sambuc     };
405971bb1a5SLionel Sambuc 
406971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
407971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
408971bb1a5SLionel Sambuc     xcb_xvmc_destroy_context_request_t xcb_out;
409971bb1a5SLionel Sambuc 
410971bb1a5SLionel Sambuc     xcb_out.context_id = context_id;
411971bb1a5SLionel Sambuc 
412971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
413971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
414971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
415971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
416971bb1a5SLionel Sambuc 
417971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
418971bb1a5SLionel Sambuc     return xcb_ret;
419971bb1a5SLionel Sambuc }
420971bb1a5SLionel Sambuc 
421971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xvmc_destroy_context(xcb_connection_t * c,xcb_xvmc_context_t context_id)422971bb1a5SLionel Sambuc xcb_xvmc_destroy_context (xcb_connection_t   *c  /**< */,
423971bb1a5SLionel Sambuc                           xcb_xvmc_context_t  context_id  /**< */)
424971bb1a5SLionel Sambuc {
425971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
426971bb1a5SLionel Sambuc         /* count */ 2,
427971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
428971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_DESTROY_CONTEXT,
429971bb1a5SLionel Sambuc         /* isvoid */ 1
430971bb1a5SLionel Sambuc     };
431971bb1a5SLionel Sambuc 
432971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
433971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
434971bb1a5SLionel Sambuc     xcb_xvmc_destroy_context_request_t xcb_out;
435971bb1a5SLionel Sambuc 
436971bb1a5SLionel Sambuc     xcb_out.context_id = context_id;
437971bb1a5SLionel Sambuc 
438971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
439971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
440971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
441971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
442971bb1a5SLionel Sambuc 
443971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
444971bb1a5SLionel Sambuc     return xcb_ret;
445971bb1a5SLionel Sambuc }
446971bb1a5SLionel Sambuc 
447971bb1a5SLionel Sambuc int
xcb_xvmc_create_surface_sizeof(const void * _buffer)448971bb1a5SLionel Sambuc xcb_xvmc_create_surface_sizeof (const void  *_buffer  /**< */)
449971bb1a5SLionel Sambuc {
450971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
451971bb1a5SLionel Sambuc     const xcb_xvmc_create_surface_reply_t *_aux = (xcb_xvmc_create_surface_reply_t *)_buffer;
452971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
453971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
454971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
455*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
456971bb1a5SLionel Sambuc 
457971bb1a5SLionel Sambuc 
458971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xvmc_create_surface_reply_t);
459971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
460*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
461*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
462971bb1a5SLionel Sambuc     /* priv_data */
463971bb1a5SLionel Sambuc     xcb_block_len += _aux->length * sizeof(uint32_t);
464971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
465971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(uint32_t);
466971bb1a5SLionel Sambuc     /* insert padding */
467971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
468971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
469971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
470971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
471971bb1a5SLionel Sambuc         xcb_pad = 0;
472971bb1a5SLionel Sambuc     }
473971bb1a5SLionel Sambuc     xcb_block_len = 0;
474971bb1a5SLionel Sambuc 
475971bb1a5SLionel Sambuc     return xcb_buffer_len;
476971bb1a5SLionel Sambuc }
477971bb1a5SLionel Sambuc 
478971bb1a5SLionel Sambuc xcb_xvmc_create_surface_cookie_t
xcb_xvmc_create_surface(xcb_connection_t * c,xcb_xvmc_surface_t surface_id,xcb_xvmc_context_t context_id)479971bb1a5SLionel Sambuc xcb_xvmc_create_surface (xcb_connection_t   *c  /**< */,
480971bb1a5SLionel Sambuc                          xcb_xvmc_surface_t  surface_id  /**< */,
481971bb1a5SLionel Sambuc                          xcb_xvmc_context_t  context_id  /**< */)
482971bb1a5SLionel Sambuc {
483971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
484971bb1a5SLionel Sambuc         /* count */ 2,
485971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
486971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_CREATE_SURFACE,
487971bb1a5SLionel Sambuc         /* isvoid */ 0
488971bb1a5SLionel Sambuc     };
489971bb1a5SLionel Sambuc 
490971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
491971bb1a5SLionel Sambuc     xcb_xvmc_create_surface_cookie_t xcb_ret;
492971bb1a5SLionel Sambuc     xcb_xvmc_create_surface_request_t xcb_out;
493971bb1a5SLionel Sambuc 
494971bb1a5SLionel Sambuc     xcb_out.surface_id = surface_id;
495971bb1a5SLionel Sambuc     xcb_out.context_id = context_id;
496971bb1a5SLionel Sambuc 
497971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
498971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
499971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
500971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
501971bb1a5SLionel Sambuc 
502971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
503971bb1a5SLionel Sambuc     return xcb_ret;
504971bb1a5SLionel Sambuc }
505971bb1a5SLionel Sambuc 
506971bb1a5SLionel Sambuc xcb_xvmc_create_surface_cookie_t
xcb_xvmc_create_surface_unchecked(xcb_connection_t * c,xcb_xvmc_surface_t surface_id,xcb_xvmc_context_t context_id)507971bb1a5SLionel Sambuc xcb_xvmc_create_surface_unchecked (xcb_connection_t   *c  /**< */,
508971bb1a5SLionel Sambuc                                    xcb_xvmc_surface_t  surface_id  /**< */,
509971bb1a5SLionel Sambuc                                    xcb_xvmc_context_t  context_id  /**< */)
510971bb1a5SLionel Sambuc {
511971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
512971bb1a5SLionel Sambuc         /* count */ 2,
513971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
514971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_CREATE_SURFACE,
515971bb1a5SLionel Sambuc         /* isvoid */ 0
516971bb1a5SLionel Sambuc     };
517971bb1a5SLionel Sambuc 
518971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
519971bb1a5SLionel Sambuc     xcb_xvmc_create_surface_cookie_t xcb_ret;
520971bb1a5SLionel Sambuc     xcb_xvmc_create_surface_request_t xcb_out;
521971bb1a5SLionel Sambuc 
522971bb1a5SLionel Sambuc     xcb_out.surface_id = surface_id;
523971bb1a5SLionel Sambuc     xcb_out.context_id = context_id;
524971bb1a5SLionel Sambuc 
525971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
526971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
527971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
528971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
529971bb1a5SLionel Sambuc 
530971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
531971bb1a5SLionel Sambuc     return xcb_ret;
532971bb1a5SLionel Sambuc }
533971bb1a5SLionel Sambuc 
534971bb1a5SLionel Sambuc uint32_t *
xcb_xvmc_create_surface_priv_data(const xcb_xvmc_create_surface_reply_t * R)535971bb1a5SLionel Sambuc xcb_xvmc_create_surface_priv_data (const xcb_xvmc_create_surface_reply_t *R  /**< */)
536971bb1a5SLionel Sambuc {
537971bb1a5SLionel Sambuc     return (uint32_t *) (R + 1);
538971bb1a5SLionel Sambuc }
539971bb1a5SLionel Sambuc 
540971bb1a5SLionel Sambuc int
xcb_xvmc_create_surface_priv_data_length(const xcb_xvmc_create_surface_reply_t * R)541971bb1a5SLionel Sambuc xcb_xvmc_create_surface_priv_data_length (const xcb_xvmc_create_surface_reply_t *R  /**< */)
542971bb1a5SLionel Sambuc {
543971bb1a5SLionel Sambuc     return R->length;
544971bb1a5SLionel Sambuc }
545971bb1a5SLionel Sambuc 
546971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xvmc_create_surface_priv_data_end(const xcb_xvmc_create_surface_reply_t * R)547971bb1a5SLionel Sambuc xcb_xvmc_create_surface_priv_data_end (const xcb_xvmc_create_surface_reply_t *R  /**< */)
548971bb1a5SLionel Sambuc {
549971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
550971bb1a5SLionel Sambuc     i.data = ((uint32_t *) (R + 1)) + (R->length);
551971bb1a5SLionel Sambuc     i.rem = 0;
552971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
553971bb1a5SLionel Sambuc     return i;
554971bb1a5SLionel Sambuc }
555971bb1a5SLionel Sambuc 
556971bb1a5SLionel Sambuc xcb_xvmc_create_surface_reply_t *
xcb_xvmc_create_surface_reply(xcb_connection_t * c,xcb_xvmc_create_surface_cookie_t cookie,xcb_generic_error_t ** e)557971bb1a5SLionel Sambuc xcb_xvmc_create_surface_reply (xcb_connection_t                  *c  /**< */,
558971bb1a5SLionel Sambuc                                xcb_xvmc_create_surface_cookie_t   cookie  /**< */,
559971bb1a5SLionel Sambuc                                xcb_generic_error_t              **e  /**< */)
560971bb1a5SLionel Sambuc {
561971bb1a5SLionel Sambuc     return (xcb_xvmc_create_surface_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
562971bb1a5SLionel Sambuc }
563971bb1a5SLionel Sambuc 
564971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xvmc_destroy_surface_checked(xcb_connection_t * c,xcb_xvmc_surface_t surface_id)565971bb1a5SLionel Sambuc xcb_xvmc_destroy_surface_checked (xcb_connection_t   *c  /**< */,
566971bb1a5SLionel Sambuc                                   xcb_xvmc_surface_t  surface_id  /**< */)
567971bb1a5SLionel Sambuc {
568971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
569971bb1a5SLionel Sambuc         /* count */ 2,
570971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
571971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_DESTROY_SURFACE,
572971bb1a5SLionel Sambuc         /* isvoid */ 1
573971bb1a5SLionel Sambuc     };
574971bb1a5SLionel Sambuc 
575971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
576971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
577971bb1a5SLionel Sambuc     xcb_xvmc_destroy_surface_request_t xcb_out;
578971bb1a5SLionel Sambuc 
579971bb1a5SLionel Sambuc     xcb_out.surface_id = surface_id;
580971bb1a5SLionel Sambuc 
581971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
582971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
583971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
584971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
585971bb1a5SLionel Sambuc 
586971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
587971bb1a5SLionel Sambuc     return xcb_ret;
588971bb1a5SLionel Sambuc }
589971bb1a5SLionel Sambuc 
590971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xvmc_destroy_surface(xcb_connection_t * c,xcb_xvmc_surface_t surface_id)591971bb1a5SLionel Sambuc xcb_xvmc_destroy_surface (xcb_connection_t   *c  /**< */,
592971bb1a5SLionel Sambuc                           xcb_xvmc_surface_t  surface_id  /**< */)
593971bb1a5SLionel Sambuc {
594971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
595971bb1a5SLionel Sambuc         /* count */ 2,
596971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
597971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_DESTROY_SURFACE,
598971bb1a5SLionel Sambuc         /* isvoid */ 1
599971bb1a5SLionel Sambuc     };
600971bb1a5SLionel Sambuc 
601971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
602971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
603971bb1a5SLionel Sambuc     xcb_xvmc_destroy_surface_request_t xcb_out;
604971bb1a5SLionel Sambuc 
605971bb1a5SLionel Sambuc     xcb_out.surface_id = surface_id;
606971bb1a5SLionel Sambuc 
607971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
608971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
609971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
610971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
611971bb1a5SLionel Sambuc 
612971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
613971bb1a5SLionel Sambuc     return xcb_ret;
614971bb1a5SLionel Sambuc }
615971bb1a5SLionel Sambuc 
616971bb1a5SLionel Sambuc int
xcb_xvmc_create_subpicture_sizeof(const void * _buffer)617971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture_sizeof (const void  *_buffer  /**< */)
618971bb1a5SLionel Sambuc {
619971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
620971bb1a5SLionel Sambuc     const xcb_xvmc_create_subpicture_reply_t *_aux = (xcb_xvmc_create_subpicture_reply_t *)_buffer;
621971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
622971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
623971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
624*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
625971bb1a5SLionel Sambuc 
626971bb1a5SLionel Sambuc 
627971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xvmc_create_subpicture_reply_t);
628971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
629*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
630*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
631971bb1a5SLionel Sambuc     /* priv_data */
632971bb1a5SLionel Sambuc     xcb_block_len += _aux->length * sizeof(uint32_t);
633971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
634971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(uint32_t);
635971bb1a5SLionel Sambuc     /* insert padding */
636971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
637971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
638971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
639971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
640971bb1a5SLionel Sambuc         xcb_pad = 0;
641971bb1a5SLionel Sambuc     }
642971bb1a5SLionel Sambuc     xcb_block_len = 0;
643971bb1a5SLionel Sambuc 
644971bb1a5SLionel Sambuc     return xcb_buffer_len;
645971bb1a5SLionel Sambuc }
646971bb1a5SLionel Sambuc 
647971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture_cookie_t
xcb_xvmc_create_subpicture(xcb_connection_t * c,xcb_xvmc_subpicture_t subpicture_id,xcb_xvmc_context_t context,uint32_t xvimage_id,uint16_t width,uint16_t height)648971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture (xcb_connection_t      *c  /**< */,
649971bb1a5SLionel Sambuc                             xcb_xvmc_subpicture_t  subpicture_id  /**< */,
650971bb1a5SLionel Sambuc                             xcb_xvmc_context_t     context  /**< */,
651971bb1a5SLionel Sambuc                             uint32_t               xvimage_id  /**< */,
652971bb1a5SLionel Sambuc                             uint16_t               width  /**< */,
653971bb1a5SLionel Sambuc                             uint16_t               height  /**< */)
654971bb1a5SLionel Sambuc {
655971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
656971bb1a5SLionel Sambuc         /* count */ 2,
657971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
658971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_CREATE_SUBPICTURE,
659971bb1a5SLionel Sambuc         /* isvoid */ 0
660971bb1a5SLionel Sambuc     };
661971bb1a5SLionel Sambuc 
662971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
663971bb1a5SLionel Sambuc     xcb_xvmc_create_subpicture_cookie_t xcb_ret;
664971bb1a5SLionel Sambuc     xcb_xvmc_create_subpicture_request_t xcb_out;
665971bb1a5SLionel Sambuc 
666971bb1a5SLionel Sambuc     xcb_out.subpicture_id = subpicture_id;
667971bb1a5SLionel Sambuc     xcb_out.context = context;
668971bb1a5SLionel Sambuc     xcb_out.xvimage_id = xvimage_id;
669971bb1a5SLionel Sambuc     xcb_out.width = width;
670971bb1a5SLionel Sambuc     xcb_out.height = height;
671971bb1a5SLionel Sambuc 
672971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
673971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
674971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
675971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
676971bb1a5SLionel Sambuc 
677971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
678971bb1a5SLionel Sambuc     return xcb_ret;
679971bb1a5SLionel Sambuc }
680971bb1a5SLionel Sambuc 
681971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture_cookie_t
xcb_xvmc_create_subpicture_unchecked(xcb_connection_t * c,xcb_xvmc_subpicture_t subpicture_id,xcb_xvmc_context_t context,uint32_t xvimage_id,uint16_t width,uint16_t height)682971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture_unchecked (xcb_connection_t      *c  /**< */,
683971bb1a5SLionel Sambuc                                       xcb_xvmc_subpicture_t  subpicture_id  /**< */,
684971bb1a5SLionel Sambuc                                       xcb_xvmc_context_t     context  /**< */,
685971bb1a5SLionel Sambuc                                       uint32_t               xvimage_id  /**< */,
686971bb1a5SLionel Sambuc                                       uint16_t               width  /**< */,
687971bb1a5SLionel Sambuc                                       uint16_t               height  /**< */)
688971bb1a5SLionel Sambuc {
689971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
690971bb1a5SLionel Sambuc         /* count */ 2,
691971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
692971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_CREATE_SUBPICTURE,
693971bb1a5SLionel Sambuc         /* isvoid */ 0
694971bb1a5SLionel Sambuc     };
695971bb1a5SLionel Sambuc 
696971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
697971bb1a5SLionel Sambuc     xcb_xvmc_create_subpicture_cookie_t xcb_ret;
698971bb1a5SLionel Sambuc     xcb_xvmc_create_subpicture_request_t xcb_out;
699971bb1a5SLionel Sambuc 
700971bb1a5SLionel Sambuc     xcb_out.subpicture_id = subpicture_id;
701971bb1a5SLionel Sambuc     xcb_out.context = context;
702971bb1a5SLionel Sambuc     xcb_out.xvimage_id = xvimage_id;
703971bb1a5SLionel Sambuc     xcb_out.width = width;
704971bb1a5SLionel Sambuc     xcb_out.height = height;
705971bb1a5SLionel Sambuc 
706971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
707971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
708971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
709971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
710971bb1a5SLionel Sambuc 
711971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
712971bb1a5SLionel Sambuc     return xcb_ret;
713971bb1a5SLionel Sambuc }
714971bb1a5SLionel Sambuc 
715971bb1a5SLionel Sambuc uint32_t *
xcb_xvmc_create_subpicture_priv_data(const xcb_xvmc_create_subpicture_reply_t * R)716971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture_priv_data (const xcb_xvmc_create_subpicture_reply_t *R  /**< */)
717971bb1a5SLionel Sambuc {
718971bb1a5SLionel Sambuc     return (uint32_t *) (R + 1);
719971bb1a5SLionel Sambuc }
720971bb1a5SLionel Sambuc 
721971bb1a5SLionel Sambuc int
xcb_xvmc_create_subpicture_priv_data_length(const xcb_xvmc_create_subpicture_reply_t * R)722971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture_priv_data_length (const xcb_xvmc_create_subpicture_reply_t *R  /**< */)
723971bb1a5SLionel Sambuc {
724971bb1a5SLionel Sambuc     return R->length;
725971bb1a5SLionel Sambuc }
726971bb1a5SLionel Sambuc 
727971bb1a5SLionel Sambuc xcb_generic_iterator_t
xcb_xvmc_create_subpicture_priv_data_end(const xcb_xvmc_create_subpicture_reply_t * R)728971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture_priv_data_end (const xcb_xvmc_create_subpicture_reply_t *R  /**< */)
729971bb1a5SLionel Sambuc {
730971bb1a5SLionel Sambuc     xcb_generic_iterator_t i;
731971bb1a5SLionel Sambuc     i.data = ((uint32_t *) (R + 1)) + (R->length);
732971bb1a5SLionel Sambuc     i.rem = 0;
733971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
734971bb1a5SLionel Sambuc     return i;
735971bb1a5SLionel Sambuc }
736971bb1a5SLionel Sambuc 
737971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture_reply_t *
xcb_xvmc_create_subpicture_reply(xcb_connection_t * c,xcb_xvmc_create_subpicture_cookie_t cookie,xcb_generic_error_t ** e)738971bb1a5SLionel Sambuc xcb_xvmc_create_subpicture_reply (xcb_connection_t                     *c  /**< */,
739971bb1a5SLionel Sambuc                                   xcb_xvmc_create_subpicture_cookie_t   cookie  /**< */,
740971bb1a5SLionel Sambuc                                   xcb_generic_error_t                 **e  /**< */)
741971bb1a5SLionel Sambuc {
742971bb1a5SLionel Sambuc     return (xcb_xvmc_create_subpicture_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
743971bb1a5SLionel Sambuc }
744971bb1a5SLionel Sambuc 
745971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xvmc_destroy_subpicture_checked(xcb_connection_t * c,xcb_xvmc_subpicture_t subpicture_id)746971bb1a5SLionel Sambuc xcb_xvmc_destroy_subpicture_checked (xcb_connection_t      *c  /**< */,
747971bb1a5SLionel Sambuc                                      xcb_xvmc_subpicture_t  subpicture_id  /**< */)
748971bb1a5SLionel Sambuc {
749971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
750971bb1a5SLionel Sambuc         /* count */ 2,
751971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
752971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_DESTROY_SUBPICTURE,
753971bb1a5SLionel Sambuc         /* isvoid */ 1
754971bb1a5SLionel Sambuc     };
755971bb1a5SLionel Sambuc 
756971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
757971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
758971bb1a5SLionel Sambuc     xcb_xvmc_destroy_subpicture_request_t xcb_out;
759971bb1a5SLionel Sambuc 
760971bb1a5SLionel Sambuc     xcb_out.subpicture_id = subpicture_id;
761971bb1a5SLionel Sambuc 
762971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
763971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
764971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
765971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
766971bb1a5SLionel Sambuc 
767971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
768971bb1a5SLionel Sambuc     return xcb_ret;
769971bb1a5SLionel Sambuc }
770971bb1a5SLionel Sambuc 
771971bb1a5SLionel Sambuc xcb_void_cookie_t
xcb_xvmc_destroy_subpicture(xcb_connection_t * c,xcb_xvmc_subpicture_t subpicture_id)772971bb1a5SLionel Sambuc xcb_xvmc_destroy_subpicture (xcb_connection_t      *c  /**< */,
773971bb1a5SLionel Sambuc                              xcb_xvmc_subpicture_t  subpicture_id  /**< */)
774971bb1a5SLionel Sambuc {
775971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
776971bb1a5SLionel Sambuc         /* count */ 2,
777971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
778971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_DESTROY_SUBPICTURE,
779971bb1a5SLionel Sambuc         /* isvoid */ 1
780971bb1a5SLionel Sambuc     };
781971bb1a5SLionel Sambuc 
782971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
783971bb1a5SLionel Sambuc     xcb_void_cookie_t xcb_ret;
784971bb1a5SLionel Sambuc     xcb_xvmc_destroy_subpicture_request_t xcb_out;
785971bb1a5SLionel Sambuc 
786971bb1a5SLionel Sambuc     xcb_out.subpicture_id = subpicture_id;
787971bb1a5SLionel Sambuc 
788971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
789971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
790971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
791971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
792971bb1a5SLionel Sambuc 
793971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
794971bb1a5SLionel Sambuc     return xcb_ret;
795971bb1a5SLionel Sambuc }
796971bb1a5SLionel Sambuc 
797971bb1a5SLionel Sambuc int
xcb_xvmc_list_subpicture_types_sizeof(const void * _buffer)798971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types_sizeof (const void  *_buffer  /**< */)
799971bb1a5SLionel Sambuc {
800971bb1a5SLionel Sambuc     char *xcb_tmp = (char *)_buffer;
801971bb1a5SLionel Sambuc     const xcb_xvmc_list_subpicture_types_reply_t *_aux = (xcb_xvmc_list_subpicture_types_reply_t *)_buffer;
802971bb1a5SLionel Sambuc     unsigned int xcb_buffer_len = 0;
803971bb1a5SLionel Sambuc     unsigned int xcb_block_len = 0;
804971bb1a5SLionel Sambuc     unsigned int xcb_pad = 0;
805*0a6a1f1dSLionel Sambuc     unsigned int xcb_align_to = 0;
806971bb1a5SLionel Sambuc 
807971bb1a5SLionel Sambuc 
808971bb1a5SLionel Sambuc     xcb_block_len += sizeof(xcb_xvmc_list_subpicture_types_reply_t);
809971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
810*0a6a1f1dSLionel Sambuc     xcb_buffer_len += xcb_block_len;
811*0a6a1f1dSLionel Sambuc     xcb_block_len = 0;
812971bb1a5SLionel Sambuc     /* types */
813971bb1a5SLionel Sambuc     xcb_block_len += _aux->num * sizeof(xcb_xv_image_format_info_t);
814971bb1a5SLionel Sambuc     xcb_tmp += xcb_block_len;
815971bb1a5SLionel Sambuc     xcb_align_to = ALIGNOF(xcb_xv_image_format_info_t);
816971bb1a5SLionel Sambuc     /* insert padding */
817971bb1a5SLionel Sambuc     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
818971bb1a5SLionel Sambuc     xcb_buffer_len += xcb_block_len + xcb_pad;
819971bb1a5SLionel Sambuc     if (0 != xcb_pad) {
820971bb1a5SLionel Sambuc         xcb_tmp += xcb_pad;
821971bb1a5SLionel Sambuc         xcb_pad = 0;
822971bb1a5SLionel Sambuc     }
823971bb1a5SLionel Sambuc     xcb_block_len = 0;
824971bb1a5SLionel Sambuc 
825971bb1a5SLionel Sambuc     return xcb_buffer_len;
826971bb1a5SLionel Sambuc }
827971bb1a5SLionel Sambuc 
828971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types_cookie_t
xcb_xvmc_list_subpicture_types(xcb_connection_t * c,xcb_xv_port_t port_id,xcb_xvmc_surface_t surface_id)829971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types (xcb_connection_t   *c  /**< */,
830971bb1a5SLionel Sambuc                                 xcb_xv_port_t       port_id  /**< */,
831971bb1a5SLionel Sambuc                                 xcb_xvmc_surface_t  surface_id  /**< */)
832971bb1a5SLionel Sambuc {
833971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
834971bb1a5SLionel Sambuc         /* count */ 2,
835971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
836971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_LIST_SUBPICTURE_TYPES,
837971bb1a5SLionel Sambuc         /* isvoid */ 0
838971bb1a5SLionel Sambuc     };
839971bb1a5SLionel Sambuc 
840971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
841971bb1a5SLionel Sambuc     xcb_xvmc_list_subpicture_types_cookie_t xcb_ret;
842971bb1a5SLionel Sambuc     xcb_xvmc_list_subpicture_types_request_t xcb_out;
843971bb1a5SLionel Sambuc 
844971bb1a5SLionel Sambuc     xcb_out.port_id = port_id;
845971bb1a5SLionel Sambuc     xcb_out.surface_id = surface_id;
846971bb1a5SLionel Sambuc 
847971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
848971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
849971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
850971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
851971bb1a5SLionel Sambuc 
852971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
853971bb1a5SLionel Sambuc     return xcb_ret;
854971bb1a5SLionel Sambuc }
855971bb1a5SLionel Sambuc 
856971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types_cookie_t
xcb_xvmc_list_subpicture_types_unchecked(xcb_connection_t * c,xcb_xv_port_t port_id,xcb_xvmc_surface_t surface_id)857971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types_unchecked (xcb_connection_t   *c  /**< */,
858971bb1a5SLionel Sambuc                                           xcb_xv_port_t       port_id  /**< */,
859971bb1a5SLionel Sambuc                                           xcb_xvmc_surface_t  surface_id  /**< */)
860971bb1a5SLionel Sambuc {
861971bb1a5SLionel Sambuc     static const xcb_protocol_request_t xcb_req = {
862971bb1a5SLionel Sambuc         /* count */ 2,
863971bb1a5SLionel Sambuc         /* ext */ &xcb_xvmc_id,
864971bb1a5SLionel Sambuc         /* opcode */ XCB_XVMC_LIST_SUBPICTURE_TYPES,
865971bb1a5SLionel Sambuc         /* isvoid */ 0
866971bb1a5SLionel Sambuc     };
867971bb1a5SLionel Sambuc 
868971bb1a5SLionel Sambuc     struct iovec xcb_parts[4];
869971bb1a5SLionel Sambuc     xcb_xvmc_list_subpicture_types_cookie_t xcb_ret;
870971bb1a5SLionel Sambuc     xcb_xvmc_list_subpicture_types_request_t xcb_out;
871971bb1a5SLionel Sambuc 
872971bb1a5SLionel Sambuc     xcb_out.port_id = port_id;
873971bb1a5SLionel Sambuc     xcb_out.surface_id = surface_id;
874971bb1a5SLionel Sambuc 
875971bb1a5SLionel Sambuc     xcb_parts[2].iov_base = (char *) &xcb_out;
876971bb1a5SLionel Sambuc     xcb_parts[2].iov_len = sizeof(xcb_out);
877971bb1a5SLionel Sambuc     xcb_parts[3].iov_base = 0;
878971bb1a5SLionel Sambuc     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
879971bb1a5SLionel Sambuc 
880971bb1a5SLionel Sambuc     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
881971bb1a5SLionel Sambuc     return xcb_ret;
882971bb1a5SLionel Sambuc }
883971bb1a5SLionel Sambuc 
884971bb1a5SLionel Sambuc xcb_xv_image_format_info_t *
xcb_xvmc_list_subpicture_types_types(const xcb_xvmc_list_subpicture_types_reply_t * R)885971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types_types (const xcb_xvmc_list_subpicture_types_reply_t *R  /**< */)
886971bb1a5SLionel Sambuc {
887971bb1a5SLionel Sambuc     return (xcb_xv_image_format_info_t *) (R + 1);
888971bb1a5SLionel Sambuc }
889971bb1a5SLionel Sambuc 
890971bb1a5SLionel Sambuc int
xcb_xvmc_list_subpicture_types_types_length(const xcb_xvmc_list_subpicture_types_reply_t * R)891971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types_types_length (const xcb_xvmc_list_subpicture_types_reply_t *R  /**< */)
892971bb1a5SLionel Sambuc {
893971bb1a5SLionel Sambuc     return R->num;
894971bb1a5SLionel Sambuc }
895971bb1a5SLionel Sambuc 
896971bb1a5SLionel Sambuc xcb_xv_image_format_info_iterator_t
xcb_xvmc_list_subpicture_types_types_iterator(const xcb_xvmc_list_subpicture_types_reply_t * R)897971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types_types_iterator (const xcb_xvmc_list_subpicture_types_reply_t *R  /**< */)
898971bb1a5SLionel Sambuc {
899971bb1a5SLionel Sambuc     xcb_xv_image_format_info_iterator_t i;
900971bb1a5SLionel Sambuc     i.data = (xcb_xv_image_format_info_t *) (R + 1);
901971bb1a5SLionel Sambuc     i.rem = R->num;
902971bb1a5SLionel Sambuc     i.index = (char *) i.data - (char *) R;
903971bb1a5SLionel Sambuc     return i;
904971bb1a5SLionel Sambuc }
905971bb1a5SLionel Sambuc 
906971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types_reply_t *
xcb_xvmc_list_subpicture_types_reply(xcb_connection_t * c,xcb_xvmc_list_subpicture_types_cookie_t cookie,xcb_generic_error_t ** e)907971bb1a5SLionel Sambuc xcb_xvmc_list_subpicture_types_reply (xcb_connection_t                         *c  /**< */,
908971bb1a5SLionel Sambuc                                       xcb_xvmc_list_subpicture_types_cookie_t   cookie  /**< */,
909971bb1a5SLionel Sambuc                                       xcb_generic_error_t                     **e  /**< */)
910971bb1a5SLionel Sambuc {
911971bb1a5SLionel Sambuc     return (xcb_xvmc_list_subpicture_types_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
912971bb1a5SLionel Sambuc }
913971bb1a5SLionel Sambuc 
914