Remove building with NOCRYPTO option
[minix.git] / external / mit / xorg / lib / libxcb / files / xvmc.c
blobe309689c41fc55ff6ee7a9ffa57fb31610c16564
1 /*
2 * This file generated automatically from xvmc.xml by c_client.py.
3 * Edit at your peril.
4 */
6 #ifdef HAVE_CONFIG_H
7 #include "config.h"
8 #endif
9 #include <stdlib.h>
10 #include <string.h>
11 #include <assert.h>
12 #include <stddef.h> /* for offsetof() */
13 #include "xcbext.h"
14 #include "xvmc.h"
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xv.h"
19 xcb_extension_t xcb_xvmc_id = { "XVideo-MotionCompensation", 0 };
21 void
22 xcb_xvmc_context_next (xcb_xvmc_context_iterator_t *i /**< */)
24 --i->rem;
25 ++i->data;
26 i->index += sizeof(xcb_xvmc_context_t);
29 xcb_generic_iterator_t
30 xcb_xvmc_context_end (xcb_xvmc_context_iterator_t i /**< */)
32 xcb_generic_iterator_t ret;
33 ret.data = i.data + i.rem;
34 ret.index = i.index + ((char *) ret.data - (char *) i.data);
35 ret.rem = 0;
36 return ret;
39 void
40 xcb_xvmc_surface_next (xcb_xvmc_surface_iterator_t *i /**< */)
42 --i->rem;
43 ++i->data;
44 i->index += sizeof(xcb_xvmc_surface_t);
47 xcb_generic_iterator_t
48 xcb_xvmc_surface_end (xcb_xvmc_surface_iterator_t i /**< */)
50 xcb_generic_iterator_t ret;
51 ret.data = i.data + i.rem;
52 ret.index = i.index + ((char *) ret.data - (char *) i.data);
53 ret.rem = 0;
54 return ret;
57 void
58 xcb_xvmc_subpicture_next (xcb_xvmc_subpicture_iterator_t *i /**< */)
60 --i->rem;
61 ++i->data;
62 i->index += sizeof(xcb_xvmc_subpicture_t);
65 xcb_generic_iterator_t
66 xcb_xvmc_subpicture_end (xcb_xvmc_subpicture_iterator_t i /**< */)
68 xcb_generic_iterator_t ret;
69 ret.data = i.data + i.rem;
70 ret.index = i.index + ((char *) ret.data - (char *) i.data);
71 ret.rem = 0;
72 return ret;
75 void
76 xcb_xvmc_surface_info_next (xcb_xvmc_surface_info_iterator_t *i /**< */)
78 --i->rem;
79 ++i->data;
80 i->index += sizeof(xcb_xvmc_surface_info_t);
83 xcb_generic_iterator_t
84 xcb_xvmc_surface_info_end (xcb_xvmc_surface_info_iterator_t i /**< */)
86 xcb_generic_iterator_t ret;
87 ret.data = i.data + i.rem;
88 ret.index = i.index + ((char *) ret.data - (char *) i.data);
89 ret.rem = 0;
90 return ret;
93 xcb_xvmc_query_version_cookie_t
94 xcb_xvmc_query_version (xcb_connection_t *c /**< */)
96 static const xcb_protocol_request_t xcb_req = {
97 /* count */ 2,
98 /* ext */ &xcb_xvmc_id,
99 /* opcode */ XCB_XVMC_QUERY_VERSION,
100 /* isvoid */ 0
103 struct iovec xcb_parts[4];
104 xcb_xvmc_query_version_cookie_t xcb_ret;
105 xcb_xvmc_query_version_request_t xcb_out;
108 xcb_parts[2].iov_base = (char *) &xcb_out;
109 xcb_parts[2].iov_len = sizeof(xcb_out);
110 xcb_parts[3].iov_base = 0;
111 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
113 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
114 return xcb_ret;
117 xcb_xvmc_query_version_cookie_t
118 xcb_xvmc_query_version_unchecked (xcb_connection_t *c /**< */)
120 static const xcb_protocol_request_t xcb_req = {
121 /* count */ 2,
122 /* ext */ &xcb_xvmc_id,
123 /* opcode */ XCB_XVMC_QUERY_VERSION,
124 /* isvoid */ 0
127 struct iovec xcb_parts[4];
128 xcb_xvmc_query_version_cookie_t xcb_ret;
129 xcb_xvmc_query_version_request_t xcb_out;
132 xcb_parts[2].iov_base = (char *) &xcb_out;
133 xcb_parts[2].iov_len = sizeof(xcb_out);
134 xcb_parts[3].iov_base = 0;
135 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
137 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
138 return xcb_ret;
141 xcb_xvmc_query_version_reply_t *
142 xcb_xvmc_query_version_reply (xcb_connection_t *c /**< */,
143 xcb_xvmc_query_version_cookie_t cookie /**< */,
144 xcb_generic_error_t **e /**< */)
146 return (xcb_xvmc_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
150 xcb_xvmc_list_surface_types_sizeof (const void *_buffer /**< */)
152 char *xcb_tmp = (char *)_buffer;
153 const xcb_xvmc_list_surface_types_reply_t *_aux = (xcb_xvmc_list_surface_types_reply_t *)_buffer;
154 unsigned int xcb_buffer_len = 0;
155 unsigned int xcb_block_len = 0;
156 unsigned int xcb_pad = 0;
157 unsigned int xcb_align_to = 0;
160 xcb_block_len += sizeof(xcb_xvmc_list_surface_types_reply_t);
161 xcb_tmp += xcb_block_len;
162 xcb_buffer_len += xcb_block_len;
163 xcb_block_len = 0;
164 /* surfaces */
165 xcb_block_len += _aux->num * sizeof(xcb_xvmc_surface_info_t);
166 xcb_tmp += xcb_block_len;
167 xcb_align_to = ALIGNOF(xcb_xvmc_surface_info_t);
168 /* insert padding */
169 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
170 xcb_buffer_len += xcb_block_len + xcb_pad;
171 if (0 != xcb_pad) {
172 xcb_tmp += xcb_pad;
173 xcb_pad = 0;
175 xcb_block_len = 0;
177 return xcb_buffer_len;
180 xcb_xvmc_list_surface_types_cookie_t
181 xcb_xvmc_list_surface_types (xcb_connection_t *c /**< */,
182 xcb_xv_port_t port_id /**< */)
184 static const xcb_protocol_request_t xcb_req = {
185 /* count */ 2,
186 /* ext */ &xcb_xvmc_id,
187 /* opcode */ XCB_XVMC_LIST_SURFACE_TYPES,
188 /* isvoid */ 0
191 struct iovec xcb_parts[4];
192 xcb_xvmc_list_surface_types_cookie_t xcb_ret;
193 xcb_xvmc_list_surface_types_request_t xcb_out;
195 xcb_out.port_id = port_id;
197 xcb_parts[2].iov_base = (char *) &xcb_out;
198 xcb_parts[2].iov_len = sizeof(xcb_out);
199 xcb_parts[3].iov_base = 0;
200 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
202 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
203 return xcb_ret;
206 xcb_xvmc_list_surface_types_cookie_t
207 xcb_xvmc_list_surface_types_unchecked (xcb_connection_t *c /**< */,
208 xcb_xv_port_t port_id /**< */)
210 static const xcb_protocol_request_t xcb_req = {
211 /* count */ 2,
212 /* ext */ &xcb_xvmc_id,
213 /* opcode */ XCB_XVMC_LIST_SURFACE_TYPES,
214 /* isvoid */ 0
217 struct iovec xcb_parts[4];
218 xcb_xvmc_list_surface_types_cookie_t xcb_ret;
219 xcb_xvmc_list_surface_types_request_t xcb_out;
221 xcb_out.port_id = port_id;
223 xcb_parts[2].iov_base = (char *) &xcb_out;
224 xcb_parts[2].iov_len = sizeof(xcb_out);
225 xcb_parts[3].iov_base = 0;
226 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
228 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
229 return xcb_ret;
232 xcb_xvmc_surface_info_t *
233 xcb_xvmc_list_surface_types_surfaces (const xcb_xvmc_list_surface_types_reply_t *R /**< */)
235 return (xcb_xvmc_surface_info_t *) (R + 1);
239 xcb_xvmc_list_surface_types_surfaces_length (const xcb_xvmc_list_surface_types_reply_t *R /**< */)
241 return R->num;
244 xcb_xvmc_surface_info_iterator_t
245 xcb_xvmc_list_surface_types_surfaces_iterator (const xcb_xvmc_list_surface_types_reply_t *R /**< */)
247 xcb_xvmc_surface_info_iterator_t i;
248 i.data = (xcb_xvmc_surface_info_t *) (R + 1);
249 i.rem = R->num;
250 i.index = (char *) i.data - (char *) R;
251 return i;
254 xcb_xvmc_list_surface_types_reply_t *
255 xcb_xvmc_list_surface_types_reply (xcb_connection_t *c /**< */,
256 xcb_xvmc_list_surface_types_cookie_t cookie /**< */,
257 xcb_generic_error_t **e /**< */)
259 return (xcb_xvmc_list_surface_types_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
263 xcb_xvmc_create_context_sizeof (const void *_buffer /**< */)
265 char *xcb_tmp = (char *)_buffer;
266 const xcb_xvmc_create_context_reply_t *_aux = (xcb_xvmc_create_context_reply_t *)_buffer;
267 unsigned int xcb_buffer_len = 0;
268 unsigned int xcb_block_len = 0;
269 unsigned int xcb_pad = 0;
270 unsigned int xcb_align_to = 0;
273 xcb_block_len += sizeof(xcb_xvmc_create_context_reply_t);
274 xcb_tmp += xcb_block_len;
275 xcb_buffer_len += xcb_block_len;
276 xcb_block_len = 0;
277 /* priv_data */
278 xcb_block_len += _aux->length * sizeof(uint32_t);
279 xcb_tmp += xcb_block_len;
280 xcb_align_to = ALIGNOF(uint32_t);
281 /* insert padding */
282 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
283 xcb_buffer_len += xcb_block_len + xcb_pad;
284 if (0 != xcb_pad) {
285 xcb_tmp += xcb_pad;
286 xcb_pad = 0;
288 xcb_block_len = 0;
290 return xcb_buffer_len;
293 xcb_xvmc_create_context_cookie_t
294 xcb_xvmc_create_context (xcb_connection_t *c /**< */,
295 xcb_xvmc_context_t context_id /**< */,
296 xcb_xv_port_t port_id /**< */,
297 xcb_xvmc_surface_t surface_id /**< */,
298 uint16_t width /**< */,
299 uint16_t height /**< */,
300 uint32_t flags /**< */)
302 static const xcb_protocol_request_t xcb_req = {
303 /* count */ 2,
304 /* ext */ &xcb_xvmc_id,
305 /* opcode */ XCB_XVMC_CREATE_CONTEXT,
306 /* isvoid */ 0
309 struct iovec xcb_parts[4];
310 xcb_xvmc_create_context_cookie_t xcb_ret;
311 xcb_xvmc_create_context_request_t xcb_out;
313 xcb_out.context_id = context_id;
314 xcb_out.port_id = port_id;
315 xcb_out.surface_id = surface_id;
316 xcb_out.width = width;
317 xcb_out.height = height;
318 xcb_out.flags = flags;
320 xcb_parts[2].iov_base = (char *) &xcb_out;
321 xcb_parts[2].iov_len = sizeof(xcb_out);
322 xcb_parts[3].iov_base = 0;
323 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
325 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
326 return xcb_ret;
329 xcb_xvmc_create_context_cookie_t
330 xcb_xvmc_create_context_unchecked (xcb_connection_t *c /**< */,
331 xcb_xvmc_context_t context_id /**< */,
332 xcb_xv_port_t port_id /**< */,
333 xcb_xvmc_surface_t surface_id /**< */,
334 uint16_t width /**< */,
335 uint16_t height /**< */,
336 uint32_t flags /**< */)
338 static const xcb_protocol_request_t xcb_req = {
339 /* count */ 2,
340 /* ext */ &xcb_xvmc_id,
341 /* opcode */ XCB_XVMC_CREATE_CONTEXT,
342 /* isvoid */ 0
345 struct iovec xcb_parts[4];
346 xcb_xvmc_create_context_cookie_t xcb_ret;
347 xcb_xvmc_create_context_request_t xcb_out;
349 xcb_out.context_id = context_id;
350 xcb_out.port_id = port_id;
351 xcb_out.surface_id = surface_id;
352 xcb_out.width = width;
353 xcb_out.height = height;
354 xcb_out.flags = flags;
356 xcb_parts[2].iov_base = (char *) &xcb_out;
357 xcb_parts[2].iov_len = sizeof(xcb_out);
358 xcb_parts[3].iov_base = 0;
359 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
361 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
362 return xcb_ret;
365 uint32_t *
366 xcb_xvmc_create_context_priv_data (const xcb_xvmc_create_context_reply_t *R /**< */)
368 return (uint32_t *) (R + 1);
372 xcb_xvmc_create_context_priv_data_length (const xcb_xvmc_create_context_reply_t *R /**< */)
374 return R->length;
377 xcb_generic_iterator_t
378 xcb_xvmc_create_context_priv_data_end (const xcb_xvmc_create_context_reply_t *R /**< */)
380 xcb_generic_iterator_t i;
381 i.data = ((uint32_t *) (R + 1)) + (R->length);
382 i.rem = 0;
383 i.index = (char *) i.data - (char *) R;
384 return i;
387 xcb_xvmc_create_context_reply_t *
388 xcb_xvmc_create_context_reply (xcb_connection_t *c /**< */,
389 xcb_xvmc_create_context_cookie_t cookie /**< */,
390 xcb_generic_error_t **e /**< */)
392 return (xcb_xvmc_create_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
395 xcb_void_cookie_t
396 xcb_xvmc_destroy_context_checked (xcb_connection_t *c /**< */,
397 xcb_xvmc_context_t context_id /**< */)
399 static const xcb_protocol_request_t xcb_req = {
400 /* count */ 2,
401 /* ext */ &xcb_xvmc_id,
402 /* opcode */ XCB_XVMC_DESTROY_CONTEXT,
403 /* isvoid */ 1
406 struct iovec xcb_parts[4];
407 xcb_void_cookie_t xcb_ret;
408 xcb_xvmc_destroy_context_request_t xcb_out;
410 xcb_out.context_id = context_id;
412 xcb_parts[2].iov_base = (char *) &xcb_out;
413 xcb_parts[2].iov_len = sizeof(xcb_out);
414 xcb_parts[3].iov_base = 0;
415 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
417 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
418 return xcb_ret;
421 xcb_void_cookie_t
422 xcb_xvmc_destroy_context (xcb_connection_t *c /**< */,
423 xcb_xvmc_context_t context_id /**< */)
425 static const xcb_protocol_request_t xcb_req = {
426 /* count */ 2,
427 /* ext */ &xcb_xvmc_id,
428 /* opcode */ XCB_XVMC_DESTROY_CONTEXT,
429 /* isvoid */ 1
432 struct iovec xcb_parts[4];
433 xcb_void_cookie_t xcb_ret;
434 xcb_xvmc_destroy_context_request_t xcb_out;
436 xcb_out.context_id = context_id;
438 xcb_parts[2].iov_base = (char *) &xcb_out;
439 xcb_parts[2].iov_len = sizeof(xcb_out);
440 xcb_parts[3].iov_base = 0;
441 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
443 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
444 return xcb_ret;
448 xcb_xvmc_create_surface_sizeof (const void *_buffer /**< */)
450 char *xcb_tmp = (char *)_buffer;
451 const xcb_xvmc_create_surface_reply_t *_aux = (xcb_xvmc_create_surface_reply_t *)_buffer;
452 unsigned int xcb_buffer_len = 0;
453 unsigned int xcb_block_len = 0;
454 unsigned int xcb_pad = 0;
455 unsigned int xcb_align_to = 0;
458 xcb_block_len += sizeof(xcb_xvmc_create_surface_reply_t);
459 xcb_tmp += xcb_block_len;
460 xcb_buffer_len += xcb_block_len;
461 xcb_block_len = 0;
462 /* priv_data */
463 xcb_block_len += _aux->length * sizeof(uint32_t);
464 xcb_tmp += xcb_block_len;
465 xcb_align_to = ALIGNOF(uint32_t);
466 /* insert padding */
467 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
468 xcb_buffer_len += xcb_block_len + xcb_pad;
469 if (0 != xcb_pad) {
470 xcb_tmp += xcb_pad;
471 xcb_pad = 0;
473 xcb_block_len = 0;
475 return xcb_buffer_len;
478 xcb_xvmc_create_surface_cookie_t
479 xcb_xvmc_create_surface (xcb_connection_t *c /**< */,
480 xcb_xvmc_surface_t surface_id /**< */,
481 xcb_xvmc_context_t context_id /**< */)
483 static const xcb_protocol_request_t xcb_req = {
484 /* count */ 2,
485 /* ext */ &xcb_xvmc_id,
486 /* opcode */ XCB_XVMC_CREATE_SURFACE,
487 /* isvoid */ 0
490 struct iovec xcb_parts[4];
491 xcb_xvmc_create_surface_cookie_t xcb_ret;
492 xcb_xvmc_create_surface_request_t xcb_out;
494 xcb_out.surface_id = surface_id;
495 xcb_out.context_id = context_id;
497 xcb_parts[2].iov_base = (char *) &xcb_out;
498 xcb_parts[2].iov_len = sizeof(xcb_out);
499 xcb_parts[3].iov_base = 0;
500 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
502 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
503 return xcb_ret;
506 xcb_xvmc_create_surface_cookie_t
507 xcb_xvmc_create_surface_unchecked (xcb_connection_t *c /**< */,
508 xcb_xvmc_surface_t surface_id /**< */,
509 xcb_xvmc_context_t context_id /**< */)
511 static const xcb_protocol_request_t xcb_req = {
512 /* count */ 2,
513 /* ext */ &xcb_xvmc_id,
514 /* opcode */ XCB_XVMC_CREATE_SURFACE,
515 /* isvoid */ 0
518 struct iovec xcb_parts[4];
519 xcb_xvmc_create_surface_cookie_t xcb_ret;
520 xcb_xvmc_create_surface_request_t xcb_out;
522 xcb_out.surface_id = surface_id;
523 xcb_out.context_id = context_id;
525 xcb_parts[2].iov_base = (char *) &xcb_out;
526 xcb_parts[2].iov_len = sizeof(xcb_out);
527 xcb_parts[3].iov_base = 0;
528 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
530 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
531 return xcb_ret;
534 uint32_t *
535 xcb_xvmc_create_surface_priv_data (const xcb_xvmc_create_surface_reply_t *R /**< */)
537 return (uint32_t *) (R + 1);
541 xcb_xvmc_create_surface_priv_data_length (const xcb_xvmc_create_surface_reply_t *R /**< */)
543 return R->length;
546 xcb_generic_iterator_t
547 xcb_xvmc_create_surface_priv_data_end (const xcb_xvmc_create_surface_reply_t *R /**< */)
549 xcb_generic_iterator_t i;
550 i.data = ((uint32_t *) (R + 1)) + (R->length);
551 i.rem = 0;
552 i.index = (char *) i.data - (char *) R;
553 return i;
556 xcb_xvmc_create_surface_reply_t *
557 xcb_xvmc_create_surface_reply (xcb_connection_t *c /**< */,
558 xcb_xvmc_create_surface_cookie_t cookie /**< */,
559 xcb_generic_error_t **e /**< */)
561 return (xcb_xvmc_create_surface_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
564 xcb_void_cookie_t
565 xcb_xvmc_destroy_surface_checked (xcb_connection_t *c /**< */,
566 xcb_xvmc_surface_t surface_id /**< */)
568 static const xcb_protocol_request_t xcb_req = {
569 /* count */ 2,
570 /* ext */ &xcb_xvmc_id,
571 /* opcode */ XCB_XVMC_DESTROY_SURFACE,
572 /* isvoid */ 1
575 struct iovec xcb_parts[4];
576 xcb_void_cookie_t xcb_ret;
577 xcb_xvmc_destroy_surface_request_t xcb_out;
579 xcb_out.surface_id = surface_id;
581 xcb_parts[2].iov_base = (char *) &xcb_out;
582 xcb_parts[2].iov_len = sizeof(xcb_out);
583 xcb_parts[3].iov_base = 0;
584 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
586 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
587 return xcb_ret;
590 xcb_void_cookie_t
591 xcb_xvmc_destroy_surface (xcb_connection_t *c /**< */,
592 xcb_xvmc_surface_t surface_id /**< */)
594 static const xcb_protocol_request_t xcb_req = {
595 /* count */ 2,
596 /* ext */ &xcb_xvmc_id,
597 /* opcode */ XCB_XVMC_DESTROY_SURFACE,
598 /* isvoid */ 1
601 struct iovec xcb_parts[4];
602 xcb_void_cookie_t xcb_ret;
603 xcb_xvmc_destroy_surface_request_t xcb_out;
605 xcb_out.surface_id = surface_id;
607 xcb_parts[2].iov_base = (char *) &xcb_out;
608 xcb_parts[2].iov_len = sizeof(xcb_out);
609 xcb_parts[3].iov_base = 0;
610 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
612 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
613 return xcb_ret;
617 xcb_xvmc_create_subpicture_sizeof (const void *_buffer /**< */)
619 char *xcb_tmp = (char *)_buffer;
620 const xcb_xvmc_create_subpicture_reply_t *_aux = (xcb_xvmc_create_subpicture_reply_t *)_buffer;
621 unsigned int xcb_buffer_len = 0;
622 unsigned int xcb_block_len = 0;
623 unsigned int xcb_pad = 0;
624 unsigned int xcb_align_to = 0;
627 xcb_block_len += sizeof(xcb_xvmc_create_subpicture_reply_t);
628 xcb_tmp += xcb_block_len;
629 xcb_buffer_len += xcb_block_len;
630 xcb_block_len = 0;
631 /* priv_data */
632 xcb_block_len += _aux->length * sizeof(uint32_t);
633 xcb_tmp += xcb_block_len;
634 xcb_align_to = ALIGNOF(uint32_t);
635 /* insert padding */
636 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
637 xcb_buffer_len += xcb_block_len + xcb_pad;
638 if (0 != xcb_pad) {
639 xcb_tmp += xcb_pad;
640 xcb_pad = 0;
642 xcb_block_len = 0;
644 return xcb_buffer_len;
647 xcb_xvmc_create_subpicture_cookie_t
648 xcb_xvmc_create_subpicture (xcb_connection_t *c /**< */,
649 xcb_xvmc_subpicture_t subpicture_id /**< */,
650 xcb_xvmc_context_t context /**< */,
651 uint32_t xvimage_id /**< */,
652 uint16_t width /**< */,
653 uint16_t height /**< */)
655 static const xcb_protocol_request_t xcb_req = {
656 /* count */ 2,
657 /* ext */ &xcb_xvmc_id,
658 /* opcode */ XCB_XVMC_CREATE_SUBPICTURE,
659 /* isvoid */ 0
662 struct iovec xcb_parts[4];
663 xcb_xvmc_create_subpicture_cookie_t xcb_ret;
664 xcb_xvmc_create_subpicture_request_t xcb_out;
666 xcb_out.subpicture_id = subpicture_id;
667 xcb_out.context = context;
668 xcb_out.xvimage_id = xvimage_id;
669 xcb_out.width = width;
670 xcb_out.height = height;
672 xcb_parts[2].iov_base = (char *) &xcb_out;
673 xcb_parts[2].iov_len = sizeof(xcb_out);
674 xcb_parts[3].iov_base = 0;
675 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
677 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
678 return xcb_ret;
681 xcb_xvmc_create_subpicture_cookie_t
682 xcb_xvmc_create_subpicture_unchecked (xcb_connection_t *c /**< */,
683 xcb_xvmc_subpicture_t subpicture_id /**< */,
684 xcb_xvmc_context_t context /**< */,
685 uint32_t xvimage_id /**< */,
686 uint16_t width /**< */,
687 uint16_t height /**< */)
689 static const xcb_protocol_request_t xcb_req = {
690 /* count */ 2,
691 /* ext */ &xcb_xvmc_id,
692 /* opcode */ XCB_XVMC_CREATE_SUBPICTURE,
693 /* isvoid */ 0
696 struct iovec xcb_parts[4];
697 xcb_xvmc_create_subpicture_cookie_t xcb_ret;
698 xcb_xvmc_create_subpicture_request_t xcb_out;
700 xcb_out.subpicture_id = subpicture_id;
701 xcb_out.context = context;
702 xcb_out.xvimage_id = xvimage_id;
703 xcb_out.width = width;
704 xcb_out.height = height;
706 xcb_parts[2].iov_base = (char *) &xcb_out;
707 xcb_parts[2].iov_len = sizeof(xcb_out);
708 xcb_parts[3].iov_base = 0;
709 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
711 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
712 return xcb_ret;
715 uint32_t *
716 xcb_xvmc_create_subpicture_priv_data (const xcb_xvmc_create_subpicture_reply_t *R /**< */)
718 return (uint32_t *) (R + 1);
722 xcb_xvmc_create_subpicture_priv_data_length (const xcb_xvmc_create_subpicture_reply_t *R /**< */)
724 return R->length;
727 xcb_generic_iterator_t
728 xcb_xvmc_create_subpicture_priv_data_end (const xcb_xvmc_create_subpicture_reply_t *R /**< */)
730 xcb_generic_iterator_t i;
731 i.data = ((uint32_t *) (R + 1)) + (R->length);
732 i.rem = 0;
733 i.index = (char *) i.data - (char *) R;
734 return i;
737 xcb_xvmc_create_subpicture_reply_t *
738 xcb_xvmc_create_subpicture_reply (xcb_connection_t *c /**< */,
739 xcb_xvmc_create_subpicture_cookie_t cookie /**< */,
740 xcb_generic_error_t **e /**< */)
742 return (xcb_xvmc_create_subpicture_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
745 xcb_void_cookie_t
746 xcb_xvmc_destroy_subpicture_checked (xcb_connection_t *c /**< */,
747 xcb_xvmc_subpicture_t subpicture_id /**< */)
749 static const xcb_protocol_request_t xcb_req = {
750 /* count */ 2,
751 /* ext */ &xcb_xvmc_id,
752 /* opcode */ XCB_XVMC_DESTROY_SUBPICTURE,
753 /* isvoid */ 1
756 struct iovec xcb_parts[4];
757 xcb_void_cookie_t xcb_ret;
758 xcb_xvmc_destroy_subpicture_request_t xcb_out;
760 xcb_out.subpicture_id = subpicture_id;
762 xcb_parts[2].iov_base = (char *) &xcb_out;
763 xcb_parts[2].iov_len = sizeof(xcb_out);
764 xcb_parts[3].iov_base = 0;
765 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
767 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
768 return xcb_ret;
771 xcb_void_cookie_t
772 xcb_xvmc_destroy_subpicture (xcb_connection_t *c /**< */,
773 xcb_xvmc_subpicture_t subpicture_id /**< */)
775 static const xcb_protocol_request_t xcb_req = {
776 /* count */ 2,
777 /* ext */ &xcb_xvmc_id,
778 /* opcode */ XCB_XVMC_DESTROY_SUBPICTURE,
779 /* isvoid */ 1
782 struct iovec xcb_parts[4];
783 xcb_void_cookie_t xcb_ret;
784 xcb_xvmc_destroy_subpicture_request_t xcb_out;
786 xcb_out.subpicture_id = subpicture_id;
788 xcb_parts[2].iov_base = (char *) &xcb_out;
789 xcb_parts[2].iov_len = sizeof(xcb_out);
790 xcb_parts[3].iov_base = 0;
791 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
793 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
794 return xcb_ret;
798 xcb_xvmc_list_subpicture_types_sizeof (const void *_buffer /**< */)
800 char *xcb_tmp = (char *)_buffer;
801 const xcb_xvmc_list_subpicture_types_reply_t *_aux = (xcb_xvmc_list_subpicture_types_reply_t *)_buffer;
802 unsigned int xcb_buffer_len = 0;
803 unsigned int xcb_block_len = 0;
804 unsigned int xcb_pad = 0;
805 unsigned int xcb_align_to = 0;
808 xcb_block_len += sizeof(xcb_xvmc_list_subpicture_types_reply_t);
809 xcb_tmp += xcb_block_len;
810 xcb_buffer_len += xcb_block_len;
811 xcb_block_len = 0;
812 /* types */
813 xcb_block_len += _aux->num * sizeof(xcb_xv_image_format_info_t);
814 xcb_tmp += xcb_block_len;
815 xcb_align_to = ALIGNOF(xcb_xv_image_format_info_t);
816 /* insert padding */
817 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
818 xcb_buffer_len += xcb_block_len + xcb_pad;
819 if (0 != xcb_pad) {
820 xcb_tmp += xcb_pad;
821 xcb_pad = 0;
823 xcb_block_len = 0;
825 return xcb_buffer_len;
828 xcb_xvmc_list_subpicture_types_cookie_t
829 xcb_xvmc_list_subpicture_types (xcb_connection_t *c /**< */,
830 xcb_xv_port_t port_id /**< */,
831 xcb_xvmc_surface_t surface_id /**< */)
833 static const xcb_protocol_request_t xcb_req = {
834 /* count */ 2,
835 /* ext */ &xcb_xvmc_id,
836 /* opcode */ XCB_XVMC_LIST_SUBPICTURE_TYPES,
837 /* isvoid */ 0
840 struct iovec xcb_parts[4];
841 xcb_xvmc_list_subpicture_types_cookie_t xcb_ret;
842 xcb_xvmc_list_subpicture_types_request_t xcb_out;
844 xcb_out.port_id = port_id;
845 xcb_out.surface_id = surface_id;
847 xcb_parts[2].iov_base = (char *) &xcb_out;
848 xcb_parts[2].iov_len = sizeof(xcb_out);
849 xcb_parts[3].iov_base = 0;
850 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
852 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
853 return xcb_ret;
856 xcb_xvmc_list_subpicture_types_cookie_t
857 xcb_xvmc_list_subpicture_types_unchecked (xcb_connection_t *c /**< */,
858 xcb_xv_port_t port_id /**< */,
859 xcb_xvmc_surface_t surface_id /**< */)
861 static const xcb_protocol_request_t xcb_req = {
862 /* count */ 2,
863 /* ext */ &xcb_xvmc_id,
864 /* opcode */ XCB_XVMC_LIST_SUBPICTURE_TYPES,
865 /* isvoid */ 0
868 struct iovec xcb_parts[4];
869 xcb_xvmc_list_subpicture_types_cookie_t xcb_ret;
870 xcb_xvmc_list_subpicture_types_request_t xcb_out;
872 xcb_out.port_id = port_id;
873 xcb_out.surface_id = surface_id;
875 xcb_parts[2].iov_base = (char *) &xcb_out;
876 xcb_parts[2].iov_len = sizeof(xcb_out);
877 xcb_parts[3].iov_base = 0;
878 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
880 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
881 return xcb_ret;
884 xcb_xv_image_format_info_t *
885 xcb_xvmc_list_subpicture_types_types (const xcb_xvmc_list_subpicture_types_reply_t *R /**< */)
887 return (xcb_xv_image_format_info_t *) (R + 1);
891 xcb_xvmc_list_subpicture_types_types_length (const xcb_xvmc_list_subpicture_types_reply_t *R /**< */)
893 return R->num;
896 xcb_xv_image_format_info_iterator_t
897 xcb_xvmc_list_subpicture_types_types_iterator (const xcb_xvmc_list_subpicture_types_reply_t *R /**< */)
899 xcb_xv_image_format_info_iterator_t i;
900 i.data = (xcb_xv_image_format_info_t *) (R + 1);
901 i.rem = R->num;
902 i.index = (char *) i.data - (char *) R;
903 return i;
906 xcb_xvmc_list_subpicture_types_reply_t *
907 xcb_xvmc_list_subpicture_types_reply (xcb_connection_t *c /**< */,
908 xcb_xvmc_list_subpicture_types_cookie_t cookie /**< */,
909 xcb_generic_error_t **e /**< */)
911 return (xcb_xvmc_list_subpicture_types_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);