2 * This file generated automatically from xv.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
20 xcb_extension_t xcb_xv_id
= { "XVideo", 0 };
23 xcb_xv_port_next (xcb_xv_port_iterator_t
*i
/**< */)
27 i
->index
+= sizeof(xcb_xv_port_t
);
30 xcb_generic_iterator_t
31 xcb_xv_port_end (xcb_xv_port_iterator_t i
/**< */)
33 xcb_generic_iterator_t ret
;
34 ret
.data
= i
.data
+ i
.rem
;
35 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
41 xcb_xv_encoding_next (xcb_xv_encoding_iterator_t
*i
/**< */)
45 i
->index
+= sizeof(xcb_xv_encoding_t
);
48 xcb_generic_iterator_t
49 xcb_xv_encoding_end (xcb_xv_encoding_iterator_t i
/**< */)
51 xcb_generic_iterator_t ret
;
52 ret
.data
= i
.data
+ i
.rem
;
53 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
59 xcb_xv_rational_next (xcb_xv_rational_iterator_t
*i
/**< */)
63 i
->index
+= sizeof(xcb_xv_rational_t
);
66 xcb_generic_iterator_t
67 xcb_xv_rational_end (xcb_xv_rational_iterator_t i
/**< */)
69 xcb_generic_iterator_t ret
;
70 ret
.data
= i
.data
+ i
.rem
;
71 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
77 xcb_xv_format_next (xcb_xv_format_iterator_t
*i
/**< */)
81 i
->index
+= sizeof(xcb_xv_format_t
);
84 xcb_generic_iterator_t
85 xcb_xv_format_end (xcb_xv_format_iterator_t i
/**< */)
87 xcb_generic_iterator_t ret
;
88 ret
.data
= i
.data
+ i
.rem
;
89 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
95 xcb_xv_adaptor_info_sizeof (const void *_buffer
/**< */)
97 char *xcb_tmp
= (char *)_buffer
;
98 const xcb_xv_adaptor_info_t
*_aux
= (xcb_xv_adaptor_info_t
*)_buffer
;
99 unsigned int xcb_buffer_len
= 0;
100 unsigned int xcb_block_len
= 0;
101 unsigned int xcb_pad
= 0;
102 unsigned int xcb_align_to
= 0;
105 xcb_block_len
+= sizeof(xcb_xv_adaptor_info_t
);
106 xcb_tmp
+= xcb_block_len
;
107 xcb_buffer_len
+= xcb_block_len
;
110 xcb_block_len
+= _aux
->name_size
* sizeof(char);
111 xcb_tmp
+= xcb_block_len
;
112 xcb_align_to
= ALIGNOF(char);
115 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
116 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
123 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
124 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
131 xcb_block_len
+= _aux
->num_formats
* sizeof(xcb_xv_format_t
);
132 xcb_tmp
+= xcb_block_len
;
133 xcb_align_to
= ALIGNOF(xcb_xv_format_t
);
135 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
136 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
143 return xcb_buffer_len
;
147 xcb_xv_adaptor_info_name (const xcb_xv_adaptor_info_t
*R
/**< */)
149 return (char *) (R
+ 1);
153 xcb_xv_adaptor_info_name_length (const xcb_xv_adaptor_info_t
*R
/**< */)
158 xcb_generic_iterator_t
159 xcb_xv_adaptor_info_name_end (const xcb_xv_adaptor_info_t
*R
/**< */)
161 xcb_generic_iterator_t i
;
162 i
.data
= ((char *) (R
+ 1)) + (R
->name_size
);
164 i
.index
= (char *) i
.data
- (char *) R
;
169 xcb_xv_adaptor_info_formats (const xcb_xv_adaptor_info_t
*R
/**< */)
171 xcb_generic_iterator_t prev
= xcb_xv_adaptor_info_name_end(R
);
172 return (xcb_xv_format_t
*) ((char *) prev
.data
+ ((-prev
.index
) & (4 - 1)) + 0);
176 xcb_xv_adaptor_info_formats_length (const xcb_xv_adaptor_info_t
*R
/**< */)
178 return R
->num_formats
;
181 xcb_xv_format_iterator_t
182 xcb_xv_adaptor_info_formats_iterator (const xcb_xv_adaptor_info_t
*R
/**< */)
184 xcb_xv_format_iterator_t i
;
185 xcb_generic_iterator_t prev
= xcb_xv_adaptor_info_name_end(R
);
186 i
.data
= (xcb_xv_format_t
*) ((char *) prev
.data
+ ((-prev
.index
) & (4 - 1)));
187 i
.rem
= R
->num_formats
;
188 i
.index
= (char *) i
.data
- (char *) R
;
193 xcb_xv_adaptor_info_next (xcb_xv_adaptor_info_iterator_t
*i
/**< */)
195 xcb_xv_adaptor_info_t
*R
= i
->data
;
196 xcb_generic_iterator_t child
;
197 child
.data
= (xcb_xv_adaptor_info_t
*)(((char *)R
) + xcb_xv_adaptor_info_sizeof(R
));
198 i
->index
= (char *) child
.data
- (char *) i
->data
;
200 i
->data
= (xcb_xv_adaptor_info_t
*) child
.data
;
203 xcb_generic_iterator_t
204 xcb_xv_adaptor_info_end (xcb_xv_adaptor_info_iterator_t i
/**< */)
206 xcb_generic_iterator_t ret
;
208 xcb_xv_adaptor_info_next(&i
);
216 xcb_xv_encoding_info_sizeof (const void *_buffer
/**< */)
218 char *xcb_tmp
= (char *)_buffer
;
219 const xcb_xv_encoding_info_t
*_aux
= (xcb_xv_encoding_info_t
*)_buffer
;
220 unsigned int xcb_buffer_len
= 0;
221 unsigned int xcb_block_len
= 0;
222 unsigned int xcb_pad
= 0;
223 unsigned int xcb_align_to
= 0;
226 xcb_block_len
+= sizeof(xcb_xv_encoding_info_t
);
227 xcb_tmp
+= xcb_block_len
;
228 xcb_buffer_len
+= xcb_block_len
;
231 xcb_block_len
+= _aux
->name_size
* sizeof(char);
232 xcb_tmp
+= xcb_block_len
;
233 xcb_align_to
= ALIGNOF(char);
235 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
236 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
243 return xcb_buffer_len
;
247 xcb_xv_encoding_info_name (const xcb_xv_encoding_info_t
*R
/**< */)
249 return (char *) (R
+ 1);
253 xcb_xv_encoding_info_name_length (const xcb_xv_encoding_info_t
*R
/**< */)
258 xcb_generic_iterator_t
259 xcb_xv_encoding_info_name_end (const xcb_xv_encoding_info_t
*R
/**< */)
261 xcb_generic_iterator_t i
;
262 i
.data
= ((char *) (R
+ 1)) + (R
->name_size
);
264 i
.index
= (char *) i
.data
- (char *) R
;
269 xcb_xv_encoding_info_next (xcb_xv_encoding_info_iterator_t
*i
/**< */)
271 xcb_xv_encoding_info_t
*R
= i
->data
;
272 xcb_generic_iterator_t child
;
273 child
.data
= (xcb_xv_encoding_info_t
*)(((char *)R
) + xcb_xv_encoding_info_sizeof(R
));
274 i
->index
= (char *) child
.data
- (char *) i
->data
;
276 i
->data
= (xcb_xv_encoding_info_t
*) child
.data
;
279 xcb_generic_iterator_t
280 xcb_xv_encoding_info_end (xcb_xv_encoding_info_iterator_t i
/**< */)
282 xcb_generic_iterator_t ret
;
284 xcb_xv_encoding_info_next(&i
);
292 xcb_xv_image_sizeof (const void *_buffer
/**< */)
294 char *xcb_tmp
= (char *)_buffer
;
295 const xcb_xv_image_t
*_aux
= (xcb_xv_image_t
*)_buffer
;
296 unsigned int xcb_buffer_len
= 0;
297 unsigned int xcb_block_len
= 0;
298 unsigned int xcb_pad
= 0;
299 unsigned int xcb_align_to
= 0;
302 xcb_block_len
+= sizeof(xcb_xv_image_t
);
303 xcb_tmp
+= xcb_block_len
;
304 xcb_buffer_len
+= xcb_block_len
;
307 xcb_block_len
+= _aux
->num_planes
* sizeof(uint32_t);
308 xcb_tmp
+= xcb_block_len
;
309 xcb_align_to
= ALIGNOF(uint32_t);
311 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
312 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
319 xcb_block_len
+= _aux
->num_planes
* sizeof(uint32_t);
320 xcb_tmp
+= xcb_block_len
;
321 xcb_align_to
= ALIGNOF(uint32_t);
323 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
324 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
331 xcb_block_len
+= _aux
->data_size
* sizeof(uint8_t);
332 xcb_tmp
+= xcb_block_len
;
333 xcb_align_to
= ALIGNOF(uint8_t);
335 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
336 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
343 return xcb_buffer_len
;
347 xcb_xv_image_pitches (const xcb_xv_image_t
*R
/**< */)
349 return (uint32_t *) (R
+ 1);
353 xcb_xv_image_pitches_length (const xcb_xv_image_t
*R
/**< */)
355 return R
->num_planes
;
358 xcb_generic_iterator_t
359 xcb_xv_image_pitches_end (const xcb_xv_image_t
*R
/**< */)
361 xcb_generic_iterator_t i
;
362 i
.data
= ((uint32_t *) (R
+ 1)) + (R
->num_planes
);
364 i
.index
= (char *) i
.data
- (char *) R
;
369 xcb_xv_image_offsets (const xcb_xv_image_t
*R
/**< */)
371 xcb_generic_iterator_t prev
= xcb_xv_image_pitches_end(R
);
372 return (uint32_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint32_t, prev
.index
) + 0);
376 xcb_xv_image_offsets_length (const xcb_xv_image_t
*R
/**< */)
378 return R
->num_planes
;
381 xcb_generic_iterator_t
382 xcb_xv_image_offsets_end (const xcb_xv_image_t
*R
/**< */)
384 xcb_generic_iterator_t i
;
385 xcb_generic_iterator_t child
= xcb_xv_image_pitches_end(R
);
386 i
.data
= ((uint32_t *) child
.data
) + (R
->num_planes
);
388 i
.index
= (char *) i
.data
- (char *) R
;
393 xcb_xv_image_data (const xcb_xv_image_t
*R
/**< */)
395 xcb_generic_iterator_t prev
= xcb_xv_image_offsets_end(R
);
396 return (uint8_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint8_t, prev
.index
) + 0);
400 xcb_xv_image_data_length (const xcb_xv_image_t
*R
/**< */)
405 xcb_generic_iterator_t
406 xcb_xv_image_data_end (const xcb_xv_image_t
*R
/**< */)
408 xcb_generic_iterator_t i
;
409 xcb_generic_iterator_t child
= xcb_xv_image_offsets_end(R
);
410 i
.data
= ((uint8_t *) child
.data
) + (R
->data_size
);
412 i
.index
= (char *) i
.data
- (char *) R
;
417 xcb_xv_image_next (xcb_xv_image_iterator_t
*i
/**< */)
419 xcb_xv_image_t
*R
= i
->data
;
420 xcb_generic_iterator_t child
;
421 child
.data
= (xcb_xv_image_t
*)(((char *)R
) + xcb_xv_image_sizeof(R
));
422 i
->index
= (char *) child
.data
- (char *) i
->data
;
424 i
->data
= (xcb_xv_image_t
*) child
.data
;
427 xcb_generic_iterator_t
428 xcb_xv_image_end (xcb_xv_image_iterator_t i
/**< */)
430 xcb_generic_iterator_t ret
;
432 xcb_xv_image_next(&i
);
440 xcb_xv_attribute_info_sizeof (const void *_buffer
/**< */)
442 char *xcb_tmp
= (char *)_buffer
;
443 const xcb_xv_attribute_info_t
*_aux
= (xcb_xv_attribute_info_t
*)_buffer
;
444 unsigned int xcb_buffer_len
= 0;
445 unsigned int xcb_block_len
= 0;
446 unsigned int xcb_pad
= 0;
447 unsigned int xcb_align_to
= 0;
450 xcb_block_len
+= sizeof(xcb_xv_attribute_info_t
);
451 xcb_tmp
+= xcb_block_len
;
452 xcb_buffer_len
+= xcb_block_len
;
455 xcb_block_len
+= _aux
->size
* sizeof(char);
456 xcb_tmp
+= xcb_block_len
;
457 xcb_align_to
= ALIGNOF(char);
459 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
460 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
467 return xcb_buffer_len
;
471 xcb_xv_attribute_info_name (const xcb_xv_attribute_info_t
*R
/**< */)
473 return (char *) (R
+ 1);
477 xcb_xv_attribute_info_name_length (const xcb_xv_attribute_info_t
*R
/**< */)
482 xcb_generic_iterator_t
483 xcb_xv_attribute_info_name_end (const xcb_xv_attribute_info_t
*R
/**< */)
485 xcb_generic_iterator_t i
;
486 i
.data
= ((char *) (R
+ 1)) + (R
->size
);
488 i
.index
= (char *) i
.data
- (char *) R
;
493 xcb_xv_attribute_info_next (xcb_xv_attribute_info_iterator_t
*i
/**< */)
495 xcb_xv_attribute_info_t
*R
= i
->data
;
496 xcb_generic_iterator_t child
;
497 child
.data
= (xcb_xv_attribute_info_t
*)(((char *)R
) + xcb_xv_attribute_info_sizeof(R
));
498 i
->index
= (char *) child
.data
- (char *) i
->data
;
500 i
->data
= (xcb_xv_attribute_info_t
*) child
.data
;
503 xcb_generic_iterator_t
504 xcb_xv_attribute_info_end (xcb_xv_attribute_info_iterator_t i
/**< */)
506 xcb_generic_iterator_t ret
;
508 xcb_xv_attribute_info_next(&i
);
516 xcb_xv_image_format_info_next (xcb_xv_image_format_info_iterator_t
*i
/**< */)
520 i
->index
+= sizeof(xcb_xv_image_format_info_t
);
523 xcb_generic_iterator_t
524 xcb_xv_image_format_info_end (xcb_xv_image_format_info_iterator_t i
/**< */)
526 xcb_generic_iterator_t ret
;
527 ret
.data
= i
.data
+ i
.rem
;
528 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
533 xcb_xv_query_extension_cookie_t
534 xcb_xv_query_extension (xcb_connection_t
*c
/**< */)
536 static const xcb_protocol_request_t xcb_req
= {
538 /* ext */ &xcb_xv_id
,
539 /* opcode */ XCB_XV_QUERY_EXTENSION
,
543 struct iovec xcb_parts
[4];
544 xcb_xv_query_extension_cookie_t xcb_ret
;
545 xcb_xv_query_extension_request_t xcb_out
;
548 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
549 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
550 xcb_parts
[3].iov_base
= 0;
551 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
553 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
557 xcb_xv_query_extension_cookie_t
558 xcb_xv_query_extension_unchecked (xcb_connection_t
*c
/**< */)
560 static const xcb_protocol_request_t xcb_req
= {
562 /* ext */ &xcb_xv_id
,
563 /* opcode */ XCB_XV_QUERY_EXTENSION
,
567 struct iovec xcb_parts
[4];
568 xcb_xv_query_extension_cookie_t xcb_ret
;
569 xcb_xv_query_extension_request_t xcb_out
;
572 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
573 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
574 xcb_parts
[3].iov_base
= 0;
575 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
577 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
581 xcb_xv_query_extension_reply_t
*
582 xcb_xv_query_extension_reply (xcb_connection_t
*c
/**< */,
583 xcb_xv_query_extension_cookie_t cookie
/**< */,
584 xcb_generic_error_t
**e
/**< */)
586 return (xcb_xv_query_extension_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
590 xcb_xv_query_adaptors_sizeof (const void *_buffer
/**< */)
592 char *xcb_tmp
= (char *)_buffer
;
593 const xcb_xv_query_adaptors_reply_t
*_aux
= (xcb_xv_query_adaptors_reply_t
*)_buffer
;
594 unsigned int xcb_buffer_len
= 0;
595 unsigned int xcb_block_len
= 0;
596 unsigned int xcb_pad
= 0;
597 unsigned int xcb_align_to
= 0;
600 unsigned int xcb_tmp_len
;
602 xcb_block_len
+= sizeof(xcb_xv_query_adaptors_reply_t
);
603 xcb_tmp
+= xcb_block_len
;
604 xcb_buffer_len
+= xcb_block_len
;
607 for(i
=0; i
<_aux
->num_adaptors
; i
++) {
608 xcb_tmp_len
= xcb_xv_adaptor_info_sizeof(xcb_tmp
);
609 xcb_block_len
+= xcb_tmp_len
;
610 xcb_tmp
+= xcb_tmp_len
;
612 xcb_align_to
= ALIGNOF(xcb_xv_adaptor_info_t
);
614 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
615 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
622 return xcb_buffer_len
;
625 xcb_xv_query_adaptors_cookie_t
626 xcb_xv_query_adaptors (xcb_connection_t
*c
/**< */,
627 xcb_window_t window
/**< */)
629 static const xcb_protocol_request_t xcb_req
= {
631 /* ext */ &xcb_xv_id
,
632 /* opcode */ XCB_XV_QUERY_ADAPTORS
,
636 struct iovec xcb_parts
[4];
637 xcb_xv_query_adaptors_cookie_t xcb_ret
;
638 xcb_xv_query_adaptors_request_t xcb_out
;
640 xcb_out
.window
= window
;
642 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
643 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
644 xcb_parts
[3].iov_base
= 0;
645 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
647 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
651 xcb_xv_query_adaptors_cookie_t
652 xcb_xv_query_adaptors_unchecked (xcb_connection_t
*c
/**< */,
653 xcb_window_t window
/**< */)
655 static const xcb_protocol_request_t xcb_req
= {
657 /* ext */ &xcb_xv_id
,
658 /* opcode */ XCB_XV_QUERY_ADAPTORS
,
662 struct iovec xcb_parts
[4];
663 xcb_xv_query_adaptors_cookie_t xcb_ret
;
664 xcb_xv_query_adaptors_request_t xcb_out
;
666 xcb_out
.window
= window
;
668 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
669 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
670 xcb_parts
[3].iov_base
= 0;
671 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
673 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
678 xcb_xv_query_adaptors_info_length (const xcb_xv_query_adaptors_reply_t
*R
/**< */)
680 return R
->num_adaptors
;
683 xcb_xv_adaptor_info_iterator_t
684 xcb_xv_query_adaptors_info_iterator (const xcb_xv_query_adaptors_reply_t
*R
/**< */)
686 xcb_xv_adaptor_info_iterator_t i
;
687 i
.data
= (xcb_xv_adaptor_info_t
*) (R
+ 1);
688 i
.rem
= R
->num_adaptors
;
689 i
.index
= (char *) i
.data
- (char *) R
;
693 xcb_xv_query_adaptors_reply_t
*
694 xcb_xv_query_adaptors_reply (xcb_connection_t
*c
/**< */,
695 xcb_xv_query_adaptors_cookie_t cookie
/**< */,
696 xcb_generic_error_t
**e
/**< */)
698 return (xcb_xv_query_adaptors_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
702 xcb_xv_query_encodings_sizeof (const void *_buffer
/**< */)
704 char *xcb_tmp
= (char *)_buffer
;
705 const xcb_xv_query_encodings_reply_t
*_aux
= (xcb_xv_query_encodings_reply_t
*)_buffer
;
706 unsigned int xcb_buffer_len
= 0;
707 unsigned int xcb_block_len
= 0;
708 unsigned int xcb_pad
= 0;
709 unsigned int xcb_align_to
= 0;
712 unsigned int xcb_tmp_len
;
714 xcb_block_len
+= sizeof(xcb_xv_query_encodings_reply_t
);
715 xcb_tmp
+= xcb_block_len
;
716 xcb_buffer_len
+= xcb_block_len
;
719 for(i
=0; i
<_aux
->num_encodings
; i
++) {
720 xcb_tmp_len
= xcb_xv_encoding_info_sizeof(xcb_tmp
);
721 xcb_block_len
+= xcb_tmp_len
;
722 xcb_tmp
+= xcb_tmp_len
;
724 xcb_align_to
= ALIGNOF(xcb_xv_encoding_info_t
);
726 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
727 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
734 return xcb_buffer_len
;
737 xcb_xv_query_encodings_cookie_t
738 xcb_xv_query_encodings (xcb_connection_t
*c
/**< */,
739 xcb_xv_port_t port
/**< */)
741 static const xcb_protocol_request_t xcb_req
= {
743 /* ext */ &xcb_xv_id
,
744 /* opcode */ XCB_XV_QUERY_ENCODINGS
,
748 struct iovec xcb_parts
[4];
749 xcb_xv_query_encodings_cookie_t xcb_ret
;
750 xcb_xv_query_encodings_request_t xcb_out
;
754 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
755 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
756 xcb_parts
[3].iov_base
= 0;
757 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
759 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
763 xcb_xv_query_encodings_cookie_t
764 xcb_xv_query_encodings_unchecked (xcb_connection_t
*c
/**< */,
765 xcb_xv_port_t port
/**< */)
767 static const xcb_protocol_request_t xcb_req
= {
769 /* ext */ &xcb_xv_id
,
770 /* opcode */ XCB_XV_QUERY_ENCODINGS
,
774 struct iovec xcb_parts
[4];
775 xcb_xv_query_encodings_cookie_t xcb_ret
;
776 xcb_xv_query_encodings_request_t xcb_out
;
780 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
781 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
782 xcb_parts
[3].iov_base
= 0;
783 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
785 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
790 xcb_xv_query_encodings_info_length (const xcb_xv_query_encodings_reply_t
*R
/**< */)
792 return R
->num_encodings
;
795 xcb_xv_encoding_info_iterator_t
796 xcb_xv_query_encodings_info_iterator (const xcb_xv_query_encodings_reply_t
*R
/**< */)
798 xcb_xv_encoding_info_iterator_t i
;
799 i
.data
= (xcb_xv_encoding_info_t
*) (R
+ 1);
800 i
.rem
= R
->num_encodings
;
801 i
.index
= (char *) i
.data
- (char *) R
;
805 xcb_xv_query_encodings_reply_t
*
806 xcb_xv_query_encodings_reply (xcb_connection_t
*c
/**< */,
807 xcb_xv_query_encodings_cookie_t cookie
/**< */,
808 xcb_generic_error_t
**e
/**< */)
810 return (xcb_xv_query_encodings_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
813 xcb_xv_grab_port_cookie_t
814 xcb_xv_grab_port (xcb_connection_t
*c
/**< */,
815 xcb_xv_port_t port
/**< */,
816 xcb_timestamp_t time
/**< */)
818 static const xcb_protocol_request_t xcb_req
= {
820 /* ext */ &xcb_xv_id
,
821 /* opcode */ XCB_XV_GRAB_PORT
,
825 struct iovec xcb_parts
[4];
826 xcb_xv_grab_port_cookie_t xcb_ret
;
827 xcb_xv_grab_port_request_t xcb_out
;
832 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
833 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
834 xcb_parts
[3].iov_base
= 0;
835 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
837 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
841 xcb_xv_grab_port_cookie_t
842 xcb_xv_grab_port_unchecked (xcb_connection_t
*c
/**< */,
843 xcb_xv_port_t port
/**< */,
844 xcb_timestamp_t time
/**< */)
846 static const xcb_protocol_request_t xcb_req
= {
848 /* ext */ &xcb_xv_id
,
849 /* opcode */ XCB_XV_GRAB_PORT
,
853 struct iovec xcb_parts
[4];
854 xcb_xv_grab_port_cookie_t xcb_ret
;
855 xcb_xv_grab_port_request_t xcb_out
;
860 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
861 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
862 xcb_parts
[3].iov_base
= 0;
863 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
865 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
869 xcb_xv_grab_port_reply_t
*
870 xcb_xv_grab_port_reply (xcb_connection_t
*c
/**< */,
871 xcb_xv_grab_port_cookie_t cookie
/**< */,
872 xcb_generic_error_t
**e
/**< */)
874 return (xcb_xv_grab_port_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
878 xcb_xv_ungrab_port_checked (xcb_connection_t
*c
/**< */,
879 xcb_xv_port_t port
/**< */,
880 xcb_timestamp_t time
/**< */)
882 static const xcb_protocol_request_t xcb_req
= {
884 /* ext */ &xcb_xv_id
,
885 /* opcode */ XCB_XV_UNGRAB_PORT
,
889 struct iovec xcb_parts
[4];
890 xcb_void_cookie_t xcb_ret
;
891 xcb_xv_ungrab_port_request_t xcb_out
;
896 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
897 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
898 xcb_parts
[3].iov_base
= 0;
899 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
901 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
906 xcb_xv_ungrab_port (xcb_connection_t
*c
/**< */,
907 xcb_xv_port_t port
/**< */,
908 xcb_timestamp_t time
/**< */)
910 static const xcb_protocol_request_t xcb_req
= {
912 /* ext */ &xcb_xv_id
,
913 /* opcode */ XCB_XV_UNGRAB_PORT
,
917 struct iovec xcb_parts
[4];
918 xcb_void_cookie_t xcb_ret
;
919 xcb_xv_ungrab_port_request_t xcb_out
;
924 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
925 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
926 xcb_parts
[3].iov_base
= 0;
927 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
929 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
934 xcb_xv_put_video_checked (xcb_connection_t
*c
/**< */,
935 xcb_xv_port_t port
/**< */,
936 xcb_drawable_t drawable
/**< */,
937 xcb_gcontext_t gc
/**< */,
938 int16_t vid_x
/**< */,
939 int16_t vid_y
/**< */,
940 uint16_t vid_w
/**< */,
941 uint16_t vid_h
/**< */,
942 int16_t drw_x
/**< */,
943 int16_t drw_y
/**< */,
944 uint16_t drw_w
/**< */,
945 uint16_t drw_h
/**< */)
947 static const xcb_protocol_request_t xcb_req
= {
949 /* ext */ &xcb_xv_id
,
950 /* opcode */ XCB_XV_PUT_VIDEO
,
954 struct iovec xcb_parts
[4];
955 xcb_void_cookie_t xcb_ret
;
956 xcb_xv_put_video_request_t xcb_out
;
959 xcb_out
.drawable
= drawable
;
961 xcb_out
.vid_x
= vid_x
;
962 xcb_out
.vid_y
= vid_y
;
963 xcb_out
.vid_w
= vid_w
;
964 xcb_out
.vid_h
= vid_h
;
965 xcb_out
.drw_x
= drw_x
;
966 xcb_out
.drw_y
= drw_y
;
967 xcb_out
.drw_w
= drw_w
;
968 xcb_out
.drw_h
= drw_h
;
970 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
971 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
972 xcb_parts
[3].iov_base
= 0;
973 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
975 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
980 xcb_xv_put_video (xcb_connection_t
*c
/**< */,
981 xcb_xv_port_t port
/**< */,
982 xcb_drawable_t drawable
/**< */,
983 xcb_gcontext_t gc
/**< */,
984 int16_t vid_x
/**< */,
985 int16_t vid_y
/**< */,
986 uint16_t vid_w
/**< */,
987 uint16_t vid_h
/**< */,
988 int16_t drw_x
/**< */,
989 int16_t drw_y
/**< */,
990 uint16_t drw_w
/**< */,
991 uint16_t drw_h
/**< */)
993 static const xcb_protocol_request_t xcb_req
= {
995 /* ext */ &xcb_xv_id
,
996 /* opcode */ XCB_XV_PUT_VIDEO
,
1000 struct iovec xcb_parts
[4];
1001 xcb_void_cookie_t xcb_ret
;
1002 xcb_xv_put_video_request_t xcb_out
;
1004 xcb_out
.port
= port
;
1005 xcb_out
.drawable
= drawable
;
1007 xcb_out
.vid_x
= vid_x
;
1008 xcb_out
.vid_y
= vid_y
;
1009 xcb_out
.vid_w
= vid_w
;
1010 xcb_out
.vid_h
= vid_h
;
1011 xcb_out
.drw_x
= drw_x
;
1012 xcb_out
.drw_y
= drw_y
;
1013 xcb_out
.drw_w
= drw_w
;
1014 xcb_out
.drw_h
= drw_h
;
1016 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1017 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1018 xcb_parts
[3].iov_base
= 0;
1019 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1021 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1026 xcb_xv_put_still_checked (xcb_connection_t
*c
/**< */,
1027 xcb_xv_port_t port
/**< */,
1028 xcb_drawable_t drawable
/**< */,
1029 xcb_gcontext_t gc
/**< */,
1030 int16_t vid_x
/**< */,
1031 int16_t vid_y
/**< */,
1032 uint16_t vid_w
/**< */,
1033 uint16_t vid_h
/**< */,
1034 int16_t drw_x
/**< */,
1035 int16_t drw_y
/**< */,
1036 uint16_t drw_w
/**< */,
1037 uint16_t drw_h
/**< */)
1039 static const xcb_protocol_request_t xcb_req
= {
1041 /* ext */ &xcb_xv_id
,
1042 /* opcode */ XCB_XV_PUT_STILL
,
1046 struct iovec xcb_parts
[4];
1047 xcb_void_cookie_t xcb_ret
;
1048 xcb_xv_put_still_request_t xcb_out
;
1050 xcb_out
.port
= port
;
1051 xcb_out
.drawable
= drawable
;
1053 xcb_out
.vid_x
= vid_x
;
1054 xcb_out
.vid_y
= vid_y
;
1055 xcb_out
.vid_w
= vid_w
;
1056 xcb_out
.vid_h
= vid_h
;
1057 xcb_out
.drw_x
= drw_x
;
1058 xcb_out
.drw_y
= drw_y
;
1059 xcb_out
.drw_w
= drw_w
;
1060 xcb_out
.drw_h
= drw_h
;
1062 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1063 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1064 xcb_parts
[3].iov_base
= 0;
1065 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1067 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1072 xcb_xv_put_still (xcb_connection_t
*c
/**< */,
1073 xcb_xv_port_t port
/**< */,
1074 xcb_drawable_t drawable
/**< */,
1075 xcb_gcontext_t gc
/**< */,
1076 int16_t vid_x
/**< */,
1077 int16_t vid_y
/**< */,
1078 uint16_t vid_w
/**< */,
1079 uint16_t vid_h
/**< */,
1080 int16_t drw_x
/**< */,
1081 int16_t drw_y
/**< */,
1082 uint16_t drw_w
/**< */,
1083 uint16_t drw_h
/**< */)
1085 static const xcb_protocol_request_t xcb_req
= {
1087 /* ext */ &xcb_xv_id
,
1088 /* opcode */ XCB_XV_PUT_STILL
,
1092 struct iovec xcb_parts
[4];
1093 xcb_void_cookie_t xcb_ret
;
1094 xcb_xv_put_still_request_t xcb_out
;
1096 xcb_out
.port
= port
;
1097 xcb_out
.drawable
= drawable
;
1099 xcb_out
.vid_x
= vid_x
;
1100 xcb_out
.vid_y
= vid_y
;
1101 xcb_out
.vid_w
= vid_w
;
1102 xcb_out
.vid_h
= vid_h
;
1103 xcb_out
.drw_x
= drw_x
;
1104 xcb_out
.drw_y
= drw_y
;
1105 xcb_out
.drw_w
= drw_w
;
1106 xcb_out
.drw_h
= drw_h
;
1108 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1109 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1110 xcb_parts
[3].iov_base
= 0;
1111 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1113 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1118 xcb_xv_get_video_checked (xcb_connection_t
*c
/**< */,
1119 xcb_xv_port_t port
/**< */,
1120 xcb_drawable_t drawable
/**< */,
1121 xcb_gcontext_t gc
/**< */,
1122 int16_t vid_x
/**< */,
1123 int16_t vid_y
/**< */,
1124 uint16_t vid_w
/**< */,
1125 uint16_t vid_h
/**< */,
1126 int16_t drw_x
/**< */,
1127 int16_t drw_y
/**< */,
1128 uint16_t drw_w
/**< */,
1129 uint16_t drw_h
/**< */)
1131 static const xcb_protocol_request_t xcb_req
= {
1133 /* ext */ &xcb_xv_id
,
1134 /* opcode */ XCB_XV_GET_VIDEO
,
1138 struct iovec xcb_parts
[4];
1139 xcb_void_cookie_t xcb_ret
;
1140 xcb_xv_get_video_request_t xcb_out
;
1142 xcb_out
.port
= port
;
1143 xcb_out
.drawable
= drawable
;
1145 xcb_out
.vid_x
= vid_x
;
1146 xcb_out
.vid_y
= vid_y
;
1147 xcb_out
.vid_w
= vid_w
;
1148 xcb_out
.vid_h
= vid_h
;
1149 xcb_out
.drw_x
= drw_x
;
1150 xcb_out
.drw_y
= drw_y
;
1151 xcb_out
.drw_w
= drw_w
;
1152 xcb_out
.drw_h
= drw_h
;
1154 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1155 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1156 xcb_parts
[3].iov_base
= 0;
1157 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1159 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1164 xcb_xv_get_video (xcb_connection_t
*c
/**< */,
1165 xcb_xv_port_t port
/**< */,
1166 xcb_drawable_t drawable
/**< */,
1167 xcb_gcontext_t gc
/**< */,
1168 int16_t vid_x
/**< */,
1169 int16_t vid_y
/**< */,
1170 uint16_t vid_w
/**< */,
1171 uint16_t vid_h
/**< */,
1172 int16_t drw_x
/**< */,
1173 int16_t drw_y
/**< */,
1174 uint16_t drw_w
/**< */,
1175 uint16_t drw_h
/**< */)
1177 static const xcb_protocol_request_t xcb_req
= {
1179 /* ext */ &xcb_xv_id
,
1180 /* opcode */ XCB_XV_GET_VIDEO
,
1184 struct iovec xcb_parts
[4];
1185 xcb_void_cookie_t xcb_ret
;
1186 xcb_xv_get_video_request_t xcb_out
;
1188 xcb_out
.port
= port
;
1189 xcb_out
.drawable
= drawable
;
1191 xcb_out
.vid_x
= vid_x
;
1192 xcb_out
.vid_y
= vid_y
;
1193 xcb_out
.vid_w
= vid_w
;
1194 xcb_out
.vid_h
= vid_h
;
1195 xcb_out
.drw_x
= drw_x
;
1196 xcb_out
.drw_y
= drw_y
;
1197 xcb_out
.drw_w
= drw_w
;
1198 xcb_out
.drw_h
= drw_h
;
1200 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1201 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1202 xcb_parts
[3].iov_base
= 0;
1203 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1205 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1210 xcb_xv_get_still_checked (xcb_connection_t
*c
/**< */,
1211 xcb_xv_port_t port
/**< */,
1212 xcb_drawable_t drawable
/**< */,
1213 xcb_gcontext_t gc
/**< */,
1214 int16_t vid_x
/**< */,
1215 int16_t vid_y
/**< */,
1216 uint16_t vid_w
/**< */,
1217 uint16_t vid_h
/**< */,
1218 int16_t drw_x
/**< */,
1219 int16_t drw_y
/**< */,
1220 uint16_t drw_w
/**< */,
1221 uint16_t drw_h
/**< */)
1223 static const xcb_protocol_request_t xcb_req
= {
1225 /* ext */ &xcb_xv_id
,
1226 /* opcode */ XCB_XV_GET_STILL
,
1230 struct iovec xcb_parts
[4];
1231 xcb_void_cookie_t xcb_ret
;
1232 xcb_xv_get_still_request_t xcb_out
;
1234 xcb_out
.port
= port
;
1235 xcb_out
.drawable
= drawable
;
1237 xcb_out
.vid_x
= vid_x
;
1238 xcb_out
.vid_y
= vid_y
;
1239 xcb_out
.vid_w
= vid_w
;
1240 xcb_out
.vid_h
= vid_h
;
1241 xcb_out
.drw_x
= drw_x
;
1242 xcb_out
.drw_y
= drw_y
;
1243 xcb_out
.drw_w
= drw_w
;
1244 xcb_out
.drw_h
= drw_h
;
1246 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1247 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1248 xcb_parts
[3].iov_base
= 0;
1249 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1251 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1256 xcb_xv_get_still (xcb_connection_t
*c
/**< */,
1257 xcb_xv_port_t port
/**< */,
1258 xcb_drawable_t drawable
/**< */,
1259 xcb_gcontext_t gc
/**< */,
1260 int16_t vid_x
/**< */,
1261 int16_t vid_y
/**< */,
1262 uint16_t vid_w
/**< */,
1263 uint16_t vid_h
/**< */,
1264 int16_t drw_x
/**< */,
1265 int16_t drw_y
/**< */,
1266 uint16_t drw_w
/**< */,
1267 uint16_t drw_h
/**< */)
1269 static const xcb_protocol_request_t xcb_req
= {
1271 /* ext */ &xcb_xv_id
,
1272 /* opcode */ XCB_XV_GET_STILL
,
1276 struct iovec xcb_parts
[4];
1277 xcb_void_cookie_t xcb_ret
;
1278 xcb_xv_get_still_request_t xcb_out
;
1280 xcb_out
.port
= port
;
1281 xcb_out
.drawable
= drawable
;
1283 xcb_out
.vid_x
= vid_x
;
1284 xcb_out
.vid_y
= vid_y
;
1285 xcb_out
.vid_w
= vid_w
;
1286 xcb_out
.vid_h
= vid_h
;
1287 xcb_out
.drw_x
= drw_x
;
1288 xcb_out
.drw_y
= drw_y
;
1289 xcb_out
.drw_w
= drw_w
;
1290 xcb_out
.drw_h
= drw_h
;
1292 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1293 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1294 xcb_parts
[3].iov_base
= 0;
1295 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1297 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1302 xcb_xv_stop_video_checked (xcb_connection_t
*c
/**< */,
1303 xcb_xv_port_t port
/**< */,
1304 xcb_drawable_t drawable
/**< */)
1306 static const xcb_protocol_request_t xcb_req
= {
1308 /* ext */ &xcb_xv_id
,
1309 /* opcode */ XCB_XV_STOP_VIDEO
,
1313 struct iovec xcb_parts
[4];
1314 xcb_void_cookie_t xcb_ret
;
1315 xcb_xv_stop_video_request_t xcb_out
;
1317 xcb_out
.port
= port
;
1318 xcb_out
.drawable
= drawable
;
1320 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1321 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1322 xcb_parts
[3].iov_base
= 0;
1323 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1325 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1330 xcb_xv_stop_video (xcb_connection_t
*c
/**< */,
1331 xcb_xv_port_t port
/**< */,
1332 xcb_drawable_t drawable
/**< */)
1334 static const xcb_protocol_request_t xcb_req
= {
1336 /* ext */ &xcb_xv_id
,
1337 /* opcode */ XCB_XV_STOP_VIDEO
,
1341 struct iovec xcb_parts
[4];
1342 xcb_void_cookie_t xcb_ret
;
1343 xcb_xv_stop_video_request_t xcb_out
;
1345 xcb_out
.port
= port
;
1346 xcb_out
.drawable
= drawable
;
1348 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1349 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1350 xcb_parts
[3].iov_base
= 0;
1351 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1353 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1358 xcb_xv_select_video_notify_checked (xcb_connection_t
*c
/**< */,
1359 xcb_drawable_t drawable
/**< */,
1360 uint8_t onoff
/**< */)
1362 static const xcb_protocol_request_t xcb_req
= {
1364 /* ext */ &xcb_xv_id
,
1365 /* opcode */ XCB_XV_SELECT_VIDEO_NOTIFY
,
1369 struct iovec xcb_parts
[4];
1370 xcb_void_cookie_t xcb_ret
;
1371 xcb_xv_select_video_notify_request_t xcb_out
;
1373 xcb_out
.drawable
= drawable
;
1374 xcb_out
.onoff
= onoff
;
1375 memset(xcb_out
.pad0
, 0, 3);
1377 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1378 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1379 xcb_parts
[3].iov_base
= 0;
1380 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1382 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1387 xcb_xv_select_video_notify (xcb_connection_t
*c
/**< */,
1388 xcb_drawable_t drawable
/**< */,
1389 uint8_t onoff
/**< */)
1391 static const xcb_protocol_request_t xcb_req
= {
1393 /* ext */ &xcb_xv_id
,
1394 /* opcode */ XCB_XV_SELECT_VIDEO_NOTIFY
,
1398 struct iovec xcb_parts
[4];
1399 xcb_void_cookie_t xcb_ret
;
1400 xcb_xv_select_video_notify_request_t xcb_out
;
1402 xcb_out
.drawable
= drawable
;
1403 xcb_out
.onoff
= onoff
;
1404 memset(xcb_out
.pad0
, 0, 3);
1406 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1407 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1408 xcb_parts
[3].iov_base
= 0;
1409 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1411 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1416 xcb_xv_select_port_notify_checked (xcb_connection_t
*c
/**< */,
1417 xcb_xv_port_t port
/**< */,
1418 uint8_t onoff
/**< */)
1420 static const xcb_protocol_request_t xcb_req
= {
1422 /* ext */ &xcb_xv_id
,
1423 /* opcode */ XCB_XV_SELECT_PORT_NOTIFY
,
1427 struct iovec xcb_parts
[4];
1428 xcb_void_cookie_t xcb_ret
;
1429 xcb_xv_select_port_notify_request_t xcb_out
;
1431 xcb_out
.port
= port
;
1432 xcb_out
.onoff
= onoff
;
1433 memset(xcb_out
.pad0
, 0, 3);
1435 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1436 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1437 xcb_parts
[3].iov_base
= 0;
1438 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1440 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1445 xcb_xv_select_port_notify (xcb_connection_t
*c
/**< */,
1446 xcb_xv_port_t port
/**< */,
1447 uint8_t onoff
/**< */)
1449 static const xcb_protocol_request_t xcb_req
= {
1451 /* ext */ &xcb_xv_id
,
1452 /* opcode */ XCB_XV_SELECT_PORT_NOTIFY
,
1456 struct iovec xcb_parts
[4];
1457 xcb_void_cookie_t xcb_ret
;
1458 xcb_xv_select_port_notify_request_t xcb_out
;
1460 xcb_out
.port
= port
;
1461 xcb_out
.onoff
= onoff
;
1462 memset(xcb_out
.pad0
, 0, 3);
1464 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1465 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1466 xcb_parts
[3].iov_base
= 0;
1467 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1469 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1473 xcb_xv_query_best_size_cookie_t
1474 xcb_xv_query_best_size (xcb_connection_t
*c
/**< */,
1475 xcb_xv_port_t port
/**< */,
1476 uint16_t vid_w
/**< */,
1477 uint16_t vid_h
/**< */,
1478 uint16_t drw_w
/**< */,
1479 uint16_t drw_h
/**< */,
1480 uint8_t motion
/**< */)
1482 static const xcb_protocol_request_t xcb_req
= {
1484 /* ext */ &xcb_xv_id
,
1485 /* opcode */ XCB_XV_QUERY_BEST_SIZE
,
1489 struct iovec xcb_parts
[4];
1490 xcb_xv_query_best_size_cookie_t xcb_ret
;
1491 xcb_xv_query_best_size_request_t xcb_out
;
1493 xcb_out
.port
= port
;
1494 xcb_out
.vid_w
= vid_w
;
1495 xcb_out
.vid_h
= vid_h
;
1496 xcb_out
.drw_w
= drw_w
;
1497 xcb_out
.drw_h
= drw_h
;
1498 xcb_out
.motion
= motion
;
1499 memset(xcb_out
.pad0
, 0, 3);
1501 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1502 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1503 xcb_parts
[3].iov_base
= 0;
1504 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1506 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1510 xcb_xv_query_best_size_cookie_t
1511 xcb_xv_query_best_size_unchecked (xcb_connection_t
*c
/**< */,
1512 xcb_xv_port_t port
/**< */,
1513 uint16_t vid_w
/**< */,
1514 uint16_t vid_h
/**< */,
1515 uint16_t drw_w
/**< */,
1516 uint16_t drw_h
/**< */,
1517 uint8_t motion
/**< */)
1519 static const xcb_protocol_request_t xcb_req
= {
1521 /* ext */ &xcb_xv_id
,
1522 /* opcode */ XCB_XV_QUERY_BEST_SIZE
,
1526 struct iovec xcb_parts
[4];
1527 xcb_xv_query_best_size_cookie_t xcb_ret
;
1528 xcb_xv_query_best_size_request_t xcb_out
;
1530 xcb_out
.port
= port
;
1531 xcb_out
.vid_w
= vid_w
;
1532 xcb_out
.vid_h
= vid_h
;
1533 xcb_out
.drw_w
= drw_w
;
1534 xcb_out
.drw_h
= drw_h
;
1535 xcb_out
.motion
= motion
;
1536 memset(xcb_out
.pad0
, 0, 3);
1538 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1539 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1540 xcb_parts
[3].iov_base
= 0;
1541 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1543 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1547 xcb_xv_query_best_size_reply_t
*
1548 xcb_xv_query_best_size_reply (xcb_connection_t
*c
/**< */,
1549 xcb_xv_query_best_size_cookie_t cookie
/**< */,
1550 xcb_generic_error_t
**e
/**< */)
1552 return (xcb_xv_query_best_size_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1556 xcb_xv_set_port_attribute_checked (xcb_connection_t
*c
/**< */,
1557 xcb_xv_port_t port
/**< */,
1558 xcb_atom_t attribute
/**< */,
1559 int32_t value
/**< */)
1561 static const xcb_protocol_request_t xcb_req
= {
1563 /* ext */ &xcb_xv_id
,
1564 /* opcode */ XCB_XV_SET_PORT_ATTRIBUTE
,
1568 struct iovec xcb_parts
[4];
1569 xcb_void_cookie_t xcb_ret
;
1570 xcb_xv_set_port_attribute_request_t xcb_out
;
1572 xcb_out
.port
= port
;
1573 xcb_out
.attribute
= attribute
;
1574 xcb_out
.value
= value
;
1576 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1577 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1578 xcb_parts
[3].iov_base
= 0;
1579 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1581 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1586 xcb_xv_set_port_attribute (xcb_connection_t
*c
/**< */,
1587 xcb_xv_port_t port
/**< */,
1588 xcb_atom_t attribute
/**< */,
1589 int32_t value
/**< */)
1591 static const xcb_protocol_request_t xcb_req
= {
1593 /* ext */ &xcb_xv_id
,
1594 /* opcode */ XCB_XV_SET_PORT_ATTRIBUTE
,
1598 struct iovec xcb_parts
[4];
1599 xcb_void_cookie_t xcb_ret
;
1600 xcb_xv_set_port_attribute_request_t xcb_out
;
1602 xcb_out
.port
= port
;
1603 xcb_out
.attribute
= attribute
;
1604 xcb_out
.value
= value
;
1606 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1607 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1608 xcb_parts
[3].iov_base
= 0;
1609 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1611 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1615 xcb_xv_get_port_attribute_cookie_t
1616 xcb_xv_get_port_attribute (xcb_connection_t
*c
/**< */,
1617 xcb_xv_port_t port
/**< */,
1618 xcb_atom_t attribute
/**< */)
1620 static const xcb_protocol_request_t xcb_req
= {
1622 /* ext */ &xcb_xv_id
,
1623 /* opcode */ XCB_XV_GET_PORT_ATTRIBUTE
,
1627 struct iovec xcb_parts
[4];
1628 xcb_xv_get_port_attribute_cookie_t xcb_ret
;
1629 xcb_xv_get_port_attribute_request_t xcb_out
;
1631 xcb_out
.port
= port
;
1632 xcb_out
.attribute
= attribute
;
1634 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1635 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1636 xcb_parts
[3].iov_base
= 0;
1637 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1639 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1643 xcb_xv_get_port_attribute_cookie_t
1644 xcb_xv_get_port_attribute_unchecked (xcb_connection_t
*c
/**< */,
1645 xcb_xv_port_t port
/**< */,
1646 xcb_atom_t attribute
/**< */)
1648 static const xcb_protocol_request_t xcb_req
= {
1650 /* ext */ &xcb_xv_id
,
1651 /* opcode */ XCB_XV_GET_PORT_ATTRIBUTE
,
1655 struct iovec xcb_parts
[4];
1656 xcb_xv_get_port_attribute_cookie_t xcb_ret
;
1657 xcb_xv_get_port_attribute_request_t xcb_out
;
1659 xcb_out
.port
= port
;
1660 xcb_out
.attribute
= attribute
;
1662 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1663 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1664 xcb_parts
[3].iov_base
= 0;
1665 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1667 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1671 xcb_xv_get_port_attribute_reply_t
*
1672 xcb_xv_get_port_attribute_reply (xcb_connection_t
*c
/**< */,
1673 xcb_xv_get_port_attribute_cookie_t cookie
/**< */,
1674 xcb_generic_error_t
**e
/**< */)
1676 return (xcb_xv_get_port_attribute_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1680 xcb_xv_query_port_attributes_sizeof (const void *_buffer
/**< */)
1682 char *xcb_tmp
= (char *)_buffer
;
1683 const xcb_xv_query_port_attributes_reply_t
*_aux
= (xcb_xv_query_port_attributes_reply_t
*)_buffer
;
1684 unsigned int xcb_buffer_len
= 0;
1685 unsigned int xcb_block_len
= 0;
1686 unsigned int xcb_pad
= 0;
1687 unsigned int xcb_align_to
= 0;
1690 unsigned int xcb_tmp_len
;
1692 xcb_block_len
+= sizeof(xcb_xv_query_port_attributes_reply_t
);
1693 xcb_tmp
+= xcb_block_len
;
1694 xcb_buffer_len
+= xcb_block_len
;
1697 for(i
=0; i
<_aux
->num_attributes
; i
++) {
1698 xcb_tmp_len
= xcb_xv_attribute_info_sizeof(xcb_tmp
);
1699 xcb_block_len
+= xcb_tmp_len
;
1700 xcb_tmp
+= xcb_tmp_len
;
1702 xcb_align_to
= ALIGNOF(xcb_xv_attribute_info_t
);
1703 /* insert padding */
1704 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1705 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1712 return xcb_buffer_len
;
1715 xcb_xv_query_port_attributes_cookie_t
1716 xcb_xv_query_port_attributes (xcb_connection_t
*c
/**< */,
1717 xcb_xv_port_t port
/**< */)
1719 static const xcb_protocol_request_t xcb_req
= {
1721 /* ext */ &xcb_xv_id
,
1722 /* opcode */ XCB_XV_QUERY_PORT_ATTRIBUTES
,
1726 struct iovec xcb_parts
[4];
1727 xcb_xv_query_port_attributes_cookie_t xcb_ret
;
1728 xcb_xv_query_port_attributes_request_t xcb_out
;
1730 xcb_out
.port
= port
;
1732 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1733 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1734 xcb_parts
[3].iov_base
= 0;
1735 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1737 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1741 xcb_xv_query_port_attributes_cookie_t
1742 xcb_xv_query_port_attributes_unchecked (xcb_connection_t
*c
/**< */,
1743 xcb_xv_port_t port
/**< */)
1745 static const xcb_protocol_request_t xcb_req
= {
1747 /* ext */ &xcb_xv_id
,
1748 /* opcode */ XCB_XV_QUERY_PORT_ATTRIBUTES
,
1752 struct iovec xcb_parts
[4];
1753 xcb_xv_query_port_attributes_cookie_t xcb_ret
;
1754 xcb_xv_query_port_attributes_request_t xcb_out
;
1756 xcb_out
.port
= port
;
1758 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1759 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1760 xcb_parts
[3].iov_base
= 0;
1761 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1763 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1768 xcb_xv_query_port_attributes_attributes_length (const xcb_xv_query_port_attributes_reply_t
*R
/**< */)
1770 return R
->num_attributes
;
1773 xcb_xv_attribute_info_iterator_t
1774 xcb_xv_query_port_attributes_attributes_iterator (const xcb_xv_query_port_attributes_reply_t
*R
/**< */)
1776 xcb_xv_attribute_info_iterator_t i
;
1777 i
.data
= (xcb_xv_attribute_info_t
*) (R
+ 1);
1778 i
.rem
= R
->num_attributes
;
1779 i
.index
= (char *) i
.data
- (char *) R
;
1783 xcb_xv_query_port_attributes_reply_t
*
1784 xcb_xv_query_port_attributes_reply (xcb_connection_t
*c
/**< */,
1785 xcb_xv_query_port_attributes_cookie_t cookie
/**< */,
1786 xcb_generic_error_t
**e
/**< */)
1788 return (xcb_xv_query_port_attributes_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1792 xcb_xv_list_image_formats_sizeof (const void *_buffer
/**< */)
1794 char *xcb_tmp
= (char *)_buffer
;
1795 const xcb_xv_list_image_formats_reply_t
*_aux
= (xcb_xv_list_image_formats_reply_t
*)_buffer
;
1796 unsigned int xcb_buffer_len
= 0;
1797 unsigned int xcb_block_len
= 0;
1798 unsigned int xcb_pad
= 0;
1799 unsigned int xcb_align_to
= 0;
1802 xcb_block_len
+= sizeof(xcb_xv_list_image_formats_reply_t
);
1803 xcb_tmp
+= xcb_block_len
;
1804 xcb_buffer_len
+= xcb_block_len
;
1807 xcb_block_len
+= _aux
->num_formats
* sizeof(xcb_xv_image_format_info_t
);
1808 xcb_tmp
+= xcb_block_len
;
1809 xcb_align_to
= ALIGNOF(xcb_xv_image_format_info_t
);
1810 /* insert padding */
1811 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1812 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1819 return xcb_buffer_len
;
1822 xcb_xv_list_image_formats_cookie_t
1823 xcb_xv_list_image_formats (xcb_connection_t
*c
/**< */,
1824 xcb_xv_port_t port
/**< */)
1826 static const xcb_protocol_request_t xcb_req
= {
1828 /* ext */ &xcb_xv_id
,
1829 /* opcode */ XCB_XV_LIST_IMAGE_FORMATS
,
1833 struct iovec xcb_parts
[4];
1834 xcb_xv_list_image_formats_cookie_t xcb_ret
;
1835 xcb_xv_list_image_formats_request_t xcb_out
;
1837 xcb_out
.port
= port
;
1839 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1840 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1841 xcb_parts
[3].iov_base
= 0;
1842 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1844 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1848 xcb_xv_list_image_formats_cookie_t
1849 xcb_xv_list_image_formats_unchecked (xcb_connection_t
*c
/**< */,
1850 xcb_xv_port_t port
/**< */)
1852 static const xcb_protocol_request_t xcb_req
= {
1854 /* ext */ &xcb_xv_id
,
1855 /* opcode */ XCB_XV_LIST_IMAGE_FORMATS
,
1859 struct iovec xcb_parts
[4];
1860 xcb_xv_list_image_formats_cookie_t xcb_ret
;
1861 xcb_xv_list_image_formats_request_t xcb_out
;
1863 xcb_out
.port
= port
;
1865 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1866 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1867 xcb_parts
[3].iov_base
= 0;
1868 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1870 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1874 xcb_xv_image_format_info_t
*
1875 xcb_xv_list_image_formats_format (const xcb_xv_list_image_formats_reply_t
*R
/**< */)
1877 return (xcb_xv_image_format_info_t
*) (R
+ 1);
1881 xcb_xv_list_image_formats_format_length (const xcb_xv_list_image_formats_reply_t
*R
/**< */)
1883 return R
->num_formats
;
1886 xcb_xv_image_format_info_iterator_t
1887 xcb_xv_list_image_formats_format_iterator (const xcb_xv_list_image_formats_reply_t
*R
/**< */)
1889 xcb_xv_image_format_info_iterator_t i
;
1890 i
.data
= (xcb_xv_image_format_info_t
*) (R
+ 1);
1891 i
.rem
= R
->num_formats
;
1892 i
.index
= (char *) i
.data
- (char *) R
;
1896 xcb_xv_list_image_formats_reply_t
*
1897 xcb_xv_list_image_formats_reply (xcb_connection_t
*c
/**< */,
1898 xcb_xv_list_image_formats_cookie_t cookie
/**< */,
1899 xcb_generic_error_t
**e
/**< */)
1901 return (xcb_xv_list_image_formats_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1905 xcb_xv_query_image_attributes_sizeof (const void *_buffer
/**< */)
1907 char *xcb_tmp
= (char *)_buffer
;
1908 const xcb_xv_query_image_attributes_reply_t
*_aux
= (xcb_xv_query_image_attributes_reply_t
*)_buffer
;
1909 unsigned int xcb_buffer_len
= 0;
1910 unsigned int xcb_block_len
= 0;
1911 unsigned int xcb_pad
= 0;
1912 unsigned int xcb_align_to
= 0;
1915 xcb_block_len
+= sizeof(xcb_xv_query_image_attributes_reply_t
);
1916 xcb_tmp
+= xcb_block_len
;
1917 xcb_buffer_len
+= xcb_block_len
;
1920 xcb_block_len
+= _aux
->num_planes
* sizeof(uint32_t);
1921 xcb_tmp
+= xcb_block_len
;
1922 xcb_align_to
= ALIGNOF(uint32_t);
1923 /* insert padding */
1924 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1925 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1932 xcb_block_len
+= _aux
->num_planes
* sizeof(uint32_t);
1933 xcb_tmp
+= xcb_block_len
;
1934 xcb_align_to
= ALIGNOF(uint32_t);
1935 /* insert padding */
1936 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1937 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1944 return xcb_buffer_len
;
1947 xcb_xv_query_image_attributes_cookie_t
1948 xcb_xv_query_image_attributes (xcb_connection_t
*c
/**< */,
1949 xcb_xv_port_t port
/**< */,
1950 uint32_t id
/**< */,
1951 uint16_t width
/**< */,
1952 uint16_t height
/**< */)
1954 static const xcb_protocol_request_t xcb_req
= {
1956 /* ext */ &xcb_xv_id
,
1957 /* opcode */ XCB_XV_QUERY_IMAGE_ATTRIBUTES
,
1961 struct iovec xcb_parts
[4];
1962 xcb_xv_query_image_attributes_cookie_t xcb_ret
;
1963 xcb_xv_query_image_attributes_request_t xcb_out
;
1965 xcb_out
.port
= port
;
1967 xcb_out
.width
= width
;
1968 xcb_out
.height
= height
;
1970 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1971 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1972 xcb_parts
[3].iov_base
= 0;
1973 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1975 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1979 xcb_xv_query_image_attributes_cookie_t
1980 xcb_xv_query_image_attributes_unchecked (xcb_connection_t
*c
/**< */,
1981 xcb_xv_port_t port
/**< */,
1982 uint32_t id
/**< */,
1983 uint16_t width
/**< */,
1984 uint16_t height
/**< */)
1986 static const xcb_protocol_request_t xcb_req
= {
1988 /* ext */ &xcb_xv_id
,
1989 /* opcode */ XCB_XV_QUERY_IMAGE_ATTRIBUTES
,
1993 struct iovec xcb_parts
[4];
1994 xcb_xv_query_image_attributes_cookie_t xcb_ret
;
1995 xcb_xv_query_image_attributes_request_t xcb_out
;
1997 xcb_out
.port
= port
;
1999 xcb_out
.width
= width
;
2000 xcb_out
.height
= height
;
2002 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2003 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2004 xcb_parts
[3].iov_base
= 0;
2005 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2007 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2012 xcb_xv_query_image_attributes_pitches (const xcb_xv_query_image_attributes_reply_t
*R
/**< */)
2014 return (uint32_t *) (R
+ 1);
2018 xcb_xv_query_image_attributes_pitches_length (const xcb_xv_query_image_attributes_reply_t
*R
/**< */)
2020 return R
->num_planes
;
2023 xcb_generic_iterator_t
2024 xcb_xv_query_image_attributes_pitches_end (const xcb_xv_query_image_attributes_reply_t
*R
/**< */)
2026 xcb_generic_iterator_t i
;
2027 i
.data
= ((uint32_t *) (R
+ 1)) + (R
->num_planes
);
2029 i
.index
= (char *) i
.data
- (char *) R
;
2034 xcb_xv_query_image_attributes_offsets (const xcb_xv_query_image_attributes_reply_t
*R
/**< */)
2036 xcb_generic_iterator_t prev
= xcb_xv_query_image_attributes_pitches_end(R
);
2037 return (uint32_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint32_t, prev
.index
) + 0);
2041 xcb_xv_query_image_attributes_offsets_length (const xcb_xv_query_image_attributes_reply_t
*R
/**< */)
2043 return R
->num_planes
;
2046 xcb_generic_iterator_t
2047 xcb_xv_query_image_attributes_offsets_end (const xcb_xv_query_image_attributes_reply_t
*R
/**< */)
2049 xcb_generic_iterator_t i
;
2050 xcb_generic_iterator_t child
= xcb_xv_query_image_attributes_pitches_end(R
);
2051 i
.data
= ((uint32_t *) child
.data
) + (R
->num_planes
);
2053 i
.index
= (char *) i
.data
- (char *) R
;
2057 xcb_xv_query_image_attributes_reply_t
*
2058 xcb_xv_query_image_attributes_reply (xcb_connection_t
*c
/**< */,
2059 xcb_xv_query_image_attributes_cookie_t cookie
/**< */,
2060 xcb_generic_error_t
**e
/**< */)
2062 return (xcb_xv_query_image_attributes_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2066 xcb_xv_put_image_sizeof (const void *_buffer
/**< */,
2067 uint32_t data_len
/**< */)
2069 char *xcb_tmp
= (char *)_buffer
;
2070 unsigned int xcb_buffer_len
= 0;
2071 unsigned int xcb_block_len
= 0;
2072 unsigned int xcb_pad
= 0;
2073 unsigned int xcb_align_to
= 0;
2076 xcb_block_len
+= sizeof(xcb_xv_put_image_request_t
);
2077 xcb_tmp
+= xcb_block_len
;
2078 xcb_buffer_len
+= xcb_block_len
;
2081 xcb_block_len
+= data_len
* sizeof(uint8_t);
2082 xcb_tmp
+= xcb_block_len
;
2083 xcb_align_to
= ALIGNOF(uint8_t);
2084 /* insert padding */
2085 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2086 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2093 return xcb_buffer_len
;
2097 xcb_xv_put_image_checked (xcb_connection_t
*c
/**< */,
2098 xcb_xv_port_t port
/**< */,
2099 xcb_drawable_t drawable
/**< */,
2100 xcb_gcontext_t gc
/**< */,
2101 uint32_t id
/**< */,
2102 int16_t src_x
/**< */,
2103 int16_t src_y
/**< */,
2104 uint16_t src_w
/**< */,
2105 uint16_t src_h
/**< */,
2106 int16_t drw_x
/**< */,
2107 int16_t drw_y
/**< */,
2108 uint16_t drw_w
/**< */,
2109 uint16_t drw_h
/**< */,
2110 uint16_t width
/**< */,
2111 uint16_t height
/**< */,
2112 uint32_t data_len
/**< */,
2113 const uint8_t *data
/**< */)
2115 static const xcb_protocol_request_t xcb_req
= {
2117 /* ext */ &xcb_xv_id
,
2118 /* opcode */ XCB_XV_PUT_IMAGE
,
2122 struct iovec xcb_parts
[6];
2123 xcb_void_cookie_t xcb_ret
;
2124 xcb_xv_put_image_request_t xcb_out
;
2126 xcb_out
.port
= port
;
2127 xcb_out
.drawable
= drawable
;
2130 xcb_out
.src_x
= src_x
;
2131 xcb_out
.src_y
= src_y
;
2132 xcb_out
.src_w
= src_w
;
2133 xcb_out
.src_h
= src_h
;
2134 xcb_out
.drw_x
= drw_x
;
2135 xcb_out
.drw_y
= drw_y
;
2136 xcb_out
.drw_w
= drw_w
;
2137 xcb_out
.drw_h
= drw_h
;
2138 xcb_out
.width
= width
;
2139 xcb_out
.height
= height
;
2141 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2142 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2143 xcb_parts
[3].iov_base
= 0;
2144 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2146 xcb_parts
[4].iov_base
= (char *) data
;
2147 xcb_parts
[4].iov_len
= data_len
* sizeof(uint8_t);
2148 xcb_parts
[5].iov_base
= 0;
2149 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2151 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2156 xcb_xv_put_image (xcb_connection_t
*c
/**< */,
2157 xcb_xv_port_t port
/**< */,
2158 xcb_drawable_t drawable
/**< */,
2159 xcb_gcontext_t gc
/**< */,
2160 uint32_t id
/**< */,
2161 int16_t src_x
/**< */,
2162 int16_t src_y
/**< */,
2163 uint16_t src_w
/**< */,
2164 uint16_t src_h
/**< */,
2165 int16_t drw_x
/**< */,
2166 int16_t drw_y
/**< */,
2167 uint16_t drw_w
/**< */,
2168 uint16_t drw_h
/**< */,
2169 uint16_t width
/**< */,
2170 uint16_t height
/**< */,
2171 uint32_t data_len
/**< */,
2172 const uint8_t *data
/**< */)
2174 static const xcb_protocol_request_t xcb_req
= {
2176 /* ext */ &xcb_xv_id
,
2177 /* opcode */ XCB_XV_PUT_IMAGE
,
2181 struct iovec xcb_parts
[6];
2182 xcb_void_cookie_t xcb_ret
;
2183 xcb_xv_put_image_request_t xcb_out
;
2185 xcb_out
.port
= port
;
2186 xcb_out
.drawable
= drawable
;
2189 xcb_out
.src_x
= src_x
;
2190 xcb_out
.src_y
= src_y
;
2191 xcb_out
.src_w
= src_w
;
2192 xcb_out
.src_h
= src_h
;
2193 xcb_out
.drw_x
= drw_x
;
2194 xcb_out
.drw_y
= drw_y
;
2195 xcb_out
.drw_w
= drw_w
;
2196 xcb_out
.drw_h
= drw_h
;
2197 xcb_out
.width
= width
;
2198 xcb_out
.height
= height
;
2200 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2201 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2202 xcb_parts
[3].iov_base
= 0;
2203 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2205 xcb_parts
[4].iov_base
= (char *) data
;
2206 xcb_parts
[4].iov_len
= data_len
* sizeof(uint8_t);
2207 xcb_parts
[5].iov_base
= 0;
2208 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2210 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2215 xcb_xv_shm_put_image_checked (xcb_connection_t
*c
/**< */,
2216 xcb_xv_port_t port
/**< */,
2217 xcb_drawable_t drawable
/**< */,
2218 xcb_gcontext_t gc
/**< */,
2219 xcb_shm_seg_t shmseg
/**< */,
2220 uint32_t id
/**< */,
2221 uint32_t offset
/**< */,
2222 int16_t src_x
/**< */,
2223 int16_t src_y
/**< */,
2224 uint16_t src_w
/**< */,
2225 uint16_t src_h
/**< */,
2226 int16_t drw_x
/**< */,
2227 int16_t drw_y
/**< */,
2228 uint16_t drw_w
/**< */,
2229 uint16_t drw_h
/**< */,
2230 uint16_t width
/**< */,
2231 uint16_t height
/**< */,
2232 uint8_t send_event
/**< */)
2234 static const xcb_protocol_request_t xcb_req
= {
2236 /* ext */ &xcb_xv_id
,
2237 /* opcode */ XCB_XV_SHM_PUT_IMAGE
,
2241 struct iovec xcb_parts
[4];
2242 xcb_void_cookie_t xcb_ret
;
2243 xcb_xv_shm_put_image_request_t xcb_out
;
2245 xcb_out
.port
= port
;
2246 xcb_out
.drawable
= drawable
;
2248 xcb_out
.shmseg
= shmseg
;
2250 xcb_out
.offset
= offset
;
2251 xcb_out
.src_x
= src_x
;
2252 xcb_out
.src_y
= src_y
;
2253 xcb_out
.src_w
= src_w
;
2254 xcb_out
.src_h
= src_h
;
2255 xcb_out
.drw_x
= drw_x
;
2256 xcb_out
.drw_y
= drw_y
;
2257 xcb_out
.drw_w
= drw_w
;
2258 xcb_out
.drw_h
= drw_h
;
2259 xcb_out
.width
= width
;
2260 xcb_out
.height
= height
;
2261 xcb_out
.send_event
= send_event
;
2262 memset(xcb_out
.pad0
, 0, 3);
2264 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2265 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2266 xcb_parts
[3].iov_base
= 0;
2267 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2269 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2274 xcb_xv_shm_put_image (xcb_connection_t
*c
/**< */,
2275 xcb_xv_port_t port
/**< */,
2276 xcb_drawable_t drawable
/**< */,
2277 xcb_gcontext_t gc
/**< */,
2278 xcb_shm_seg_t shmseg
/**< */,
2279 uint32_t id
/**< */,
2280 uint32_t offset
/**< */,
2281 int16_t src_x
/**< */,
2282 int16_t src_y
/**< */,
2283 uint16_t src_w
/**< */,
2284 uint16_t src_h
/**< */,
2285 int16_t drw_x
/**< */,
2286 int16_t drw_y
/**< */,
2287 uint16_t drw_w
/**< */,
2288 uint16_t drw_h
/**< */,
2289 uint16_t width
/**< */,
2290 uint16_t height
/**< */,
2291 uint8_t send_event
/**< */)
2293 static const xcb_protocol_request_t xcb_req
= {
2295 /* ext */ &xcb_xv_id
,
2296 /* opcode */ XCB_XV_SHM_PUT_IMAGE
,
2300 struct iovec xcb_parts
[4];
2301 xcb_void_cookie_t xcb_ret
;
2302 xcb_xv_shm_put_image_request_t xcb_out
;
2304 xcb_out
.port
= port
;
2305 xcb_out
.drawable
= drawable
;
2307 xcb_out
.shmseg
= shmseg
;
2309 xcb_out
.offset
= offset
;
2310 xcb_out
.src_x
= src_x
;
2311 xcb_out
.src_y
= src_y
;
2312 xcb_out
.src_w
= src_w
;
2313 xcb_out
.src_h
= src_h
;
2314 xcb_out
.drw_x
= drw_x
;
2315 xcb_out
.drw_y
= drw_y
;
2316 xcb_out
.drw_w
= drw_w
;
2317 xcb_out
.drw_h
= drw_h
;
2318 xcb_out
.width
= width
;
2319 xcb_out
.height
= height
;
2320 xcb_out
.send_event
= send_event
;
2321 memset(xcb_out
.pad0
, 0, 3);
2323 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2324 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2325 xcb_parts
[3].iov_base
= 0;
2326 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2328 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);