Home | History | Annotate | Line # | Download | only in files
xvmc.c revision 1.2
      1 /*
      2  * This file generated automatically from xvmc.xml by c_client.py.
      3  * Edit at your peril.
      4  */
      5 
      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"
     15 
     16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
     17 #include "xproto.h"
     18 #include "shm.h"
     19 #include "xv.h"
     20 
     21 xcb_extension_t xcb_xvmc_id = { "XVideo-MotionCompensation", 0 };
     22 
     23 
     24 /*****************************************************************************
     25  **
     26  ** void xcb_xvmc_context_next
     27  **
     28  ** @param xcb_xvmc_context_iterator_t *i
     29  ** @returns void
     30  **
     31  *****************************************************************************/
     32 
     33 void
     34 xcb_xvmc_context_next (xcb_xvmc_context_iterator_t *i  /**< */)
     35 {
     36     --i->rem;
     37     ++i->data;
     38     i->index += sizeof(xcb_xvmc_context_t);
     39 }
     40 
     41 
     42 /*****************************************************************************
     43  **
     44  ** xcb_generic_iterator_t xcb_xvmc_context_end
     45  **
     46  ** @param xcb_xvmc_context_iterator_t i
     47  ** @returns xcb_generic_iterator_t
     48  **
     49  *****************************************************************************/
     50 
     51 xcb_generic_iterator_t
     52 xcb_xvmc_context_end (xcb_xvmc_context_iterator_t i  /**< */)
     53 {
     54     xcb_generic_iterator_t ret;
     55     ret.data = i.data + i.rem;
     56     ret.index = i.index + ((char *) ret.data - (char *) i.data);
     57     ret.rem = 0;
     58     return ret;
     59 }
     60 
     61 
     62 /*****************************************************************************
     63  **
     64  ** void xcb_xvmc_surface_next
     65  **
     66  ** @param xcb_xvmc_surface_iterator_t *i
     67  ** @returns void
     68  **
     69  *****************************************************************************/
     70 
     71 void
     72 xcb_xvmc_surface_next (xcb_xvmc_surface_iterator_t *i  /**< */)
     73 {
     74     --i->rem;
     75     ++i->data;
     76     i->index += sizeof(xcb_xvmc_surface_t);
     77 }
     78 
     79 
     80 /*****************************************************************************
     81  **
     82  ** xcb_generic_iterator_t xcb_xvmc_surface_end
     83  **
     84  ** @param xcb_xvmc_surface_iterator_t i
     85  ** @returns xcb_generic_iterator_t
     86  **
     87  *****************************************************************************/
     88 
     89 xcb_generic_iterator_t
     90 xcb_xvmc_surface_end (xcb_xvmc_surface_iterator_t i  /**< */)
     91 {
     92     xcb_generic_iterator_t ret;
     93     ret.data = i.data + i.rem;
     94     ret.index = i.index + ((char *) ret.data - (char *) i.data);
     95     ret.rem = 0;
     96     return ret;
     97 }
     98 
     99 
    100 /*****************************************************************************
    101  **
    102  ** void xcb_xvmc_subpicture_next
    103  **
    104  ** @param xcb_xvmc_subpicture_iterator_t *i
    105  ** @returns void
    106  **
    107  *****************************************************************************/
    108 
    109 void
    110 xcb_xvmc_subpicture_next (xcb_xvmc_subpicture_iterator_t *i  /**< */)
    111 {
    112     --i->rem;
    113     ++i->data;
    114     i->index += sizeof(xcb_xvmc_subpicture_t);
    115 }
    116 
    117 
    118 /*****************************************************************************
    119  **
    120  ** xcb_generic_iterator_t xcb_xvmc_subpicture_end
    121  **
    122  ** @param xcb_xvmc_subpicture_iterator_t i
    123  ** @returns xcb_generic_iterator_t
    124  **
    125  *****************************************************************************/
    126 
    127 xcb_generic_iterator_t
    128 xcb_xvmc_subpicture_end (xcb_xvmc_subpicture_iterator_t i  /**< */)
    129 {
    130     xcb_generic_iterator_t ret;
    131     ret.data = i.data + i.rem;
    132     ret.index = i.index + ((char *) ret.data - (char *) i.data);
    133     ret.rem = 0;
    134     return ret;
    135 }
    136 
    137 
    138 /*****************************************************************************
    139  **
    140  ** void xcb_xvmc_surface_info_next
    141  **
    142  ** @param xcb_xvmc_surface_info_iterator_t *i
    143  ** @returns void
    144  **
    145  *****************************************************************************/
    146 
    147 void
    148 xcb_xvmc_surface_info_next (xcb_xvmc_surface_info_iterator_t *i  /**< */)
    149 {
    150     --i->rem;
    151     ++i->data;
    152     i->index += sizeof(xcb_xvmc_surface_info_t);
    153 }
    154 
    155 
    156 /*****************************************************************************
    157  **
    158  ** xcb_generic_iterator_t xcb_xvmc_surface_info_end
    159  **
    160  ** @param xcb_xvmc_surface_info_iterator_t i
    161  ** @returns xcb_generic_iterator_t
    162  **
    163  *****************************************************************************/
    164 
    165 xcb_generic_iterator_t
    166 xcb_xvmc_surface_info_end (xcb_xvmc_surface_info_iterator_t i  /**< */)
    167 {
    168     xcb_generic_iterator_t ret;
    169     ret.data = i.data + i.rem;
    170     ret.index = i.index + ((char *) ret.data - (char *) i.data);
    171     ret.rem = 0;
    172     return ret;
    173 }
    174 
    175 
    176 /*****************************************************************************
    177  **
    178  ** xcb_xvmc_query_version_cookie_t xcb_xvmc_query_version
    179  **
    180  ** @param xcb_connection_t *c
    181  ** @returns xcb_xvmc_query_version_cookie_t
    182  **
    183  *****************************************************************************/
    184 
    185 xcb_xvmc_query_version_cookie_t
    186 xcb_xvmc_query_version (xcb_connection_t *c  /**< */)
    187 {
    188     static const xcb_protocol_request_t xcb_req = {
    189         /* count */ 2,
    190         /* ext */ &xcb_xvmc_id,
    191         /* opcode */ XCB_XVMC_QUERY_VERSION,
    192         /* isvoid */ 0
    193     };
    194 
    195     struct iovec xcb_parts[4];
    196     xcb_xvmc_query_version_cookie_t xcb_ret;
    197     xcb_xvmc_query_version_request_t xcb_out;
    198 
    199 
    200     xcb_parts[2].iov_base = (char *) &xcb_out;
    201     xcb_parts[2].iov_len = sizeof(xcb_out);
    202     xcb_parts[3].iov_base = 0;
    203     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    204 
    205     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    206     return xcb_ret;
    207 }
    208 
    209 
    210 /*****************************************************************************
    211  **
    212  ** xcb_xvmc_query_version_cookie_t xcb_xvmc_query_version_unchecked
    213  **
    214  ** @param xcb_connection_t *c
    215  ** @returns xcb_xvmc_query_version_cookie_t
    216  **
    217  *****************************************************************************/
    218 
    219 xcb_xvmc_query_version_cookie_t
    220 xcb_xvmc_query_version_unchecked (xcb_connection_t *c  /**< */)
    221 {
    222     static const xcb_protocol_request_t xcb_req = {
    223         /* count */ 2,
    224         /* ext */ &xcb_xvmc_id,
    225         /* opcode */ XCB_XVMC_QUERY_VERSION,
    226         /* isvoid */ 0
    227     };
    228 
    229     struct iovec xcb_parts[4];
    230     xcb_xvmc_query_version_cookie_t xcb_ret;
    231     xcb_xvmc_query_version_request_t xcb_out;
    232 
    233 
    234     xcb_parts[2].iov_base = (char *) &xcb_out;
    235     xcb_parts[2].iov_len = sizeof(xcb_out);
    236     xcb_parts[3].iov_base = 0;
    237     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    238 
    239     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    240     return xcb_ret;
    241 }
    242 
    243 
    244 /*****************************************************************************
    245  **
    246  ** xcb_xvmc_query_version_reply_t * xcb_xvmc_query_version_reply
    247  **
    248  ** @param xcb_connection_t                 *c
    249  ** @param xcb_xvmc_query_version_cookie_t   cookie
    250  ** @param xcb_generic_error_t             **e
    251  ** @returns xcb_xvmc_query_version_reply_t *
    252  **
    253  *****************************************************************************/
    254 
    255 xcb_xvmc_query_version_reply_t *
    256 xcb_xvmc_query_version_reply (xcb_connection_t                 *c  /**< */,
    257                               xcb_xvmc_query_version_cookie_t   cookie  /**< */,
    258                               xcb_generic_error_t             **e  /**< */)
    259 {
    260     return (xcb_xvmc_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    261 }
    262 
    263 int
    264 xcb_xvmc_list_surface_types_sizeof (const void  *_buffer  /**< */)
    265 {
    266     char *xcb_tmp = (char *)_buffer;
    267     const xcb_xvmc_list_surface_types_reply_t *_aux = (xcb_xvmc_list_surface_types_reply_t *)_buffer;
    268     unsigned int xcb_buffer_len = 0;
    269     unsigned int xcb_block_len = 0;
    270     unsigned int xcb_pad = 0;
    271     unsigned int xcb_align_to;
    272 
    273 
    274     xcb_block_len += sizeof(xcb_xvmc_list_surface_types_reply_t);
    275     xcb_tmp += xcb_block_len;
    276     /* surfaces */
    277     xcb_block_len += _aux->num * sizeof(xcb_xvmc_surface_info_t);
    278     xcb_tmp += xcb_block_len;
    279     xcb_align_to = ALIGNOF(xcb_xvmc_surface_info_t);
    280     /* insert padding */
    281     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    282     xcb_buffer_len += xcb_block_len + xcb_pad;
    283     if (0 != xcb_pad) {
    284         xcb_tmp += xcb_pad;
    285         xcb_pad = 0;
    286     }
    287     xcb_block_len = 0;
    288 
    289     return xcb_buffer_len;
    290 }
    291 
    292 
    293 /*****************************************************************************
    294  **
    295  ** xcb_xvmc_list_surface_types_cookie_t xcb_xvmc_list_surface_types
    296  **
    297  ** @param xcb_connection_t *c
    298  ** @param xcb_xv_port_t     port_id
    299  ** @returns xcb_xvmc_list_surface_types_cookie_t
    300  **
    301  *****************************************************************************/
    302 
    303 xcb_xvmc_list_surface_types_cookie_t
    304 xcb_xvmc_list_surface_types (xcb_connection_t *c  /**< */,
    305                              xcb_xv_port_t     port_id  /**< */)
    306 {
    307     static const xcb_protocol_request_t xcb_req = {
    308         /* count */ 2,
    309         /* ext */ &xcb_xvmc_id,
    310         /* opcode */ XCB_XVMC_LIST_SURFACE_TYPES,
    311         /* isvoid */ 0
    312     };
    313 
    314     struct iovec xcb_parts[4];
    315     xcb_xvmc_list_surface_types_cookie_t xcb_ret;
    316     xcb_xvmc_list_surface_types_request_t xcb_out;
    317 
    318     xcb_out.port_id = port_id;
    319 
    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;
    324 
    325     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    326     return xcb_ret;
    327 }
    328 
    329 
    330 /*****************************************************************************
    331  **
    332  ** xcb_xvmc_list_surface_types_cookie_t xcb_xvmc_list_surface_types_unchecked
    333  **
    334  ** @param xcb_connection_t *c
    335  ** @param xcb_xv_port_t     port_id
    336  ** @returns xcb_xvmc_list_surface_types_cookie_t
    337  **
    338  *****************************************************************************/
    339 
    340 xcb_xvmc_list_surface_types_cookie_t
    341 xcb_xvmc_list_surface_types_unchecked (xcb_connection_t *c  /**< */,
    342                                        xcb_xv_port_t     port_id  /**< */)
    343 {
    344     static const xcb_protocol_request_t xcb_req = {
    345         /* count */ 2,
    346         /* ext */ &xcb_xvmc_id,
    347         /* opcode */ XCB_XVMC_LIST_SURFACE_TYPES,
    348         /* isvoid */ 0
    349     };
    350 
    351     struct iovec xcb_parts[4];
    352     xcb_xvmc_list_surface_types_cookie_t xcb_ret;
    353     xcb_xvmc_list_surface_types_request_t xcb_out;
    354 
    355     xcb_out.port_id = port_id;
    356 
    357     xcb_parts[2].iov_base = (char *) &xcb_out;
    358     xcb_parts[2].iov_len = sizeof(xcb_out);
    359     xcb_parts[3].iov_base = 0;
    360     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    361 
    362     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    363     return xcb_ret;
    364 }
    365 
    366 
    367 /*****************************************************************************
    368  **
    369  ** xcb_xvmc_surface_info_t * xcb_xvmc_list_surface_types_surfaces
    370  **
    371  ** @param const xcb_xvmc_list_surface_types_reply_t *R
    372  ** @returns xcb_xvmc_surface_info_t *
    373  **
    374  *****************************************************************************/
    375 
    376 xcb_xvmc_surface_info_t *
    377 xcb_xvmc_list_surface_types_surfaces (const xcb_xvmc_list_surface_types_reply_t *R  /**< */)
    378 {
    379     return (xcb_xvmc_surface_info_t *) (R + 1);
    380 }
    381 
    382 
    383 /*****************************************************************************
    384  **
    385  ** int xcb_xvmc_list_surface_types_surfaces_length
    386  **
    387  ** @param const xcb_xvmc_list_surface_types_reply_t *R
    388  ** @returns int
    389  **
    390  *****************************************************************************/
    391 
    392 int
    393 xcb_xvmc_list_surface_types_surfaces_length (const xcb_xvmc_list_surface_types_reply_t *R  /**< */)
    394 {
    395     return R->num;
    396 }
    397 
    398 
    399 /*****************************************************************************
    400  **
    401  ** xcb_xvmc_surface_info_iterator_t xcb_xvmc_list_surface_types_surfaces_iterator
    402  **
    403  ** @param const xcb_xvmc_list_surface_types_reply_t *R
    404  ** @returns xcb_xvmc_surface_info_iterator_t
    405  **
    406  *****************************************************************************/
    407 
    408 xcb_xvmc_surface_info_iterator_t
    409 xcb_xvmc_list_surface_types_surfaces_iterator (const xcb_xvmc_list_surface_types_reply_t *R  /**< */)
    410 {
    411     xcb_xvmc_surface_info_iterator_t i;
    412     i.data = (xcb_xvmc_surface_info_t *) (R + 1);
    413     i.rem = R->num;
    414     i.index = (char *) i.data - (char *) R;
    415     return i;
    416 }
    417 
    418 
    419 /*****************************************************************************
    420  **
    421  ** xcb_xvmc_list_surface_types_reply_t * xcb_xvmc_list_surface_types_reply
    422  **
    423  ** @param xcb_connection_t                      *c
    424  ** @param xcb_xvmc_list_surface_types_cookie_t   cookie
    425  ** @param xcb_generic_error_t                  **e
    426  ** @returns xcb_xvmc_list_surface_types_reply_t *
    427  **
    428  *****************************************************************************/
    429 
    430 xcb_xvmc_list_surface_types_reply_t *
    431 xcb_xvmc_list_surface_types_reply (xcb_connection_t                      *c  /**< */,
    432                                    xcb_xvmc_list_surface_types_cookie_t   cookie  /**< */,
    433                                    xcb_generic_error_t                  **e  /**< */)
    434 {
    435     return (xcb_xvmc_list_surface_types_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    436 }
    437 
    438 int
    439 xcb_xvmc_create_context_sizeof (const void  *_buffer  /**< */)
    440 {
    441     char *xcb_tmp = (char *)_buffer;
    442     const xcb_xvmc_create_context_reply_t *_aux = (xcb_xvmc_create_context_reply_t *)_buffer;
    443     unsigned int xcb_buffer_len = 0;
    444     unsigned int xcb_block_len = 0;
    445     unsigned int xcb_pad = 0;
    446     unsigned int xcb_align_to;
    447 
    448 
    449     xcb_block_len += sizeof(xcb_xvmc_create_context_reply_t);
    450     xcb_tmp += xcb_block_len;
    451     /* priv_data */
    452     xcb_block_len += _aux->length * sizeof(uint32_t);
    453     xcb_tmp += xcb_block_len;
    454     xcb_align_to = ALIGNOF(uint32_t);
    455     /* insert padding */
    456     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    457     xcb_buffer_len += xcb_block_len + xcb_pad;
    458     if (0 != xcb_pad) {
    459         xcb_tmp += xcb_pad;
    460         xcb_pad = 0;
    461     }
    462     xcb_block_len = 0;
    463 
    464     return xcb_buffer_len;
    465 }
    466 
    467 
    468 /*****************************************************************************
    469  **
    470  ** xcb_xvmc_create_context_cookie_t xcb_xvmc_create_context
    471  **
    472  ** @param xcb_connection_t   *c
    473  ** @param xcb_xvmc_context_t  context_id
    474  ** @param xcb_xv_port_t       port_id
    475  ** @param xcb_xvmc_surface_t  surface_id
    476  ** @param uint16_t            width
    477  ** @param uint16_t            height
    478  ** @param uint32_t            flags
    479  ** @returns xcb_xvmc_create_context_cookie_t
    480  **
    481  *****************************************************************************/
    482 
    483 xcb_xvmc_create_context_cookie_t
    484 xcb_xvmc_create_context (xcb_connection_t   *c  /**< */,
    485                          xcb_xvmc_context_t  context_id  /**< */,
    486                          xcb_xv_port_t       port_id  /**< */,
    487                          xcb_xvmc_surface_t  surface_id  /**< */,
    488                          uint16_t            width  /**< */,
    489                          uint16_t            height  /**< */,
    490                          uint32_t            flags  /**< */)
    491 {
    492     static const xcb_protocol_request_t xcb_req = {
    493         /* count */ 2,
    494         /* ext */ &xcb_xvmc_id,
    495         /* opcode */ XCB_XVMC_CREATE_CONTEXT,
    496         /* isvoid */ 0
    497     };
    498 
    499     struct iovec xcb_parts[4];
    500     xcb_xvmc_create_context_cookie_t xcb_ret;
    501     xcb_xvmc_create_context_request_t xcb_out;
    502 
    503     xcb_out.context_id = context_id;
    504     xcb_out.port_id = port_id;
    505     xcb_out.surface_id = surface_id;
    506     xcb_out.width = width;
    507     xcb_out.height = height;
    508     xcb_out.flags = flags;
    509 
    510     xcb_parts[2].iov_base = (char *) &xcb_out;
    511     xcb_parts[2].iov_len = sizeof(xcb_out);
    512     xcb_parts[3].iov_base = 0;
    513     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    514 
    515     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    516     return xcb_ret;
    517 }
    518 
    519 
    520 /*****************************************************************************
    521  **
    522  ** xcb_xvmc_create_context_cookie_t xcb_xvmc_create_context_unchecked
    523  **
    524  ** @param xcb_connection_t   *c
    525  ** @param xcb_xvmc_context_t  context_id
    526  ** @param xcb_xv_port_t       port_id
    527  ** @param xcb_xvmc_surface_t  surface_id
    528  ** @param uint16_t            width
    529  ** @param uint16_t            height
    530  ** @param uint32_t            flags
    531  ** @returns xcb_xvmc_create_context_cookie_t
    532  **
    533  *****************************************************************************/
    534 
    535 xcb_xvmc_create_context_cookie_t
    536 xcb_xvmc_create_context_unchecked (xcb_connection_t   *c  /**< */,
    537                                    xcb_xvmc_context_t  context_id  /**< */,
    538                                    xcb_xv_port_t       port_id  /**< */,
    539                                    xcb_xvmc_surface_t  surface_id  /**< */,
    540                                    uint16_t            width  /**< */,
    541                                    uint16_t            height  /**< */,
    542                                    uint32_t            flags  /**< */)
    543 {
    544     static const xcb_protocol_request_t xcb_req = {
    545         /* count */ 2,
    546         /* ext */ &xcb_xvmc_id,
    547         /* opcode */ XCB_XVMC_CREATE_CONTEXT,
    548         /* isvoid */ 0
    549     };
    550 
    551     struct iovec xcb_parts[4];
    552     xcb_xvmc_create_context_cookie_t xcb_ret;
    553     xcb_xvmc_create_context_request_t xcb_out;
    554 
    555     xcb_out.context_id = context_id;
    556     xcb_out.port_id = port_id;
    557     xcb_out.surface_id = surface_id;
    558     xcb_out.width = width;
    559     xcb_out.height = height;
    560     xcb_out.flags = flags;
    561 
    562     xcb_parts[2].iov_base = (char *) &xcb_out;
    563     xcb_parts[2].iov_len = sizeof(xcb_out);
    564     xcb_parts[3].iov_base = 0;
    565     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    566 
    567     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    568     return xcb_ret;
    569 }
    570 
    571 
    572 /*****************************************************************************
    573  **
    574  ** uint32_t * xcb_xvmc_create_context_priv_data
    575  **
    576  ** @param const xcb_xvmc_create_context_reply_t *R
    577  ** @returns uint32_t *
    578  **
    579  *****************************************************************************/
    580 
    581 uint32_t *
    582 xcb_xvmc_create_context_priv_data (const xcb_xvmc_create_context_reply_t *R  /**< */)
    583 {
    584     return (uint32_t *) (R + 1);
    585 }
    586 
    587 
    588 /*****************************************************************************
    589  **
    590  ** int xcb_xvmc_create_context_priv_data_length
    591  **
    592  ** @param const xcb_xvmc_create_context_reply_t *R
    593  ** @returns int
    594  **
    595  *****************************************************************************/
    596 
    597 int
    598 xcb_xvmc_create_context_priv_data_length (const xcb_xvmc_create_context_reply_t *R  /**< */)
    599 {
    600     return R->length;
    601 }
    602 
    603 
    604 /*****************************************************************************
    605  **
    606  ** xcb_generic_iterator_t xcb_xvmc_create_context_priv_data_end
    607  **
    608  ** @param const xcb_xvmc_create_context_reply_t *R
    609  ** @returns xcb_generic_iterator_t
    610  **
    611  *****************************************************************************/
    612 
    613 xcb_generic_iterator_t
    614 xcb_xvmc_create_context_priv_data_end (const xcb_xvmc_create_context_reply_t *R  /**< */)
    615 {
    616     xcb_generic_iterator_t i;
    617     i.data = ((uint32_t *) (R + 1)) + (R->length);
    618     i.rem = 0;
    619     i.index = (char *) i.data - (char *) R;
    620     return i;
    621 }
    622 
    623 
    624 /*****************************************************************************
    625  **
    626  ** xcb_xvmc_create_context_reply_t * xcb_xvmc_create_context_reply
    627  **
    628  ** @param xcb_connection_t                  *c
    629  ** @param xcb_xvmc_create_context_cookie_t   cookie
    630  ** @param xcb_generic_error_t              **e
    631  ** @returns xcb_xvmc_create_context_reply_t *
    632  **
    633  *****************************************************************************/
    634 
    635 xcb_xvmc_create_context_reply_t *
    636 xcb_xvmc_create_context_reply (xcb_connection_t                  *c  /**< */,
    637                                xcb_xvmc_create_context_cookie_t   cookie  /**< */,
    638                                xcb_generic_error_t              **e  /**< */)
    639 {
    640     return (xcb_xvmc_create_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    641 }
    642 
    643 
    644 /*****************************************************************************
    645  **
    646  ** xcb_void_cookie_t xcb_xvmc_destroy_context_checked
    647  **
    648  ** @param xcb_connection_t   *c
    649  ** @param xcb_xvmc_context_t  context_id
    650  ** @returns xcb_void_cookie_t
    651  **
    652  *****************************************************************************/
    653 
    654 xcb_void_cookie_t
    655 xcb_xvmc_destroy_context_checked (xcb_connection_t   *c  /**< */,
    656                                   xcb_xvmc_context_t  context_id  /**< */)
    657 {
    658     static const xcb_protocol_request_t xcb_req = {
    659         /* count */ 2,
    660         /* ext */ &xcb_xvmc_id,
    661         /* opcode */ XCB_XVMC_DESTROY_CONTEXT,
    662         /* isvoid */ 1
    663     };
    664 
    665     struct iovec xcb_parts[4];
    666     xcb_void_cookie_t xcb_ret;
    667     xcb_xvmc_destroy_context_request_t xcb_out;
    668 
    669     xcb_out.context_id = context_id;
    670 
    671     xcb_parts[2].iov_base = (char *) &xcb_out;
    672     xcb_parts[2].iov_len = sizeof(xcb_out);
    673     xcb_parts[3].iov_base = 0;
    674     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    675 
    676     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    677     return xcb_ret;
    678 }
    679 
    680 
    681 /*****************************************************************************
    682  **
    683  ** xcb_void_cookie_t xcb_xvmc_destroy_context
    684  **
    685  ** @param xcb_connection_t   *c
    686  ** @param xcb_xvmc_context_t  context_id
    687  ** @returns xcb_void_cookie_t
    688  **
    689  *****************************************************************************/
    690 
    691 xcb_void_cookie_t
    692 xcb_xvmc_destroy_context (xcb_connection_t   *c  /**< */,
    693                           xcb_xvmc_context_t  context_id  /**< */)
    694 {
    695     static const xcb_protocol_request_t xcb_req = {
    696         /* count */ 2,
    697         /* ext */ &xcb_xvmc_id,
    698         /* opcode */ XCB_XVMC_DESTROY_CONTEXT,
    699         /* isvoid */ 1
    700     };
    701 
    702     struct iovec xcb_parts[4];
    703     xcb_void_cookie_t xcb_ret;
    704     xcb_xvmc_destroy_context_request_t xcb_out;
    705 
    706     xcb_out.context_id = context_id;
    707 
    708     xcb_parts[2].iov_base = (char *) &xcb_out;
    709     xcb_parts[2].iov_len = sizeof(xcb_out);
    710     xcb_parts[3].iov_base = 0;
    711     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    712 
    713     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    714     return xcb_ret;
    715 }
    716 
    717 int
    718 xcb_xvmc_create_surface_sizeof (const void  *_buffer  /**< */)
    719 {
    720     char *xcb_tmp = (char *)_buffer;
    721     const xcb_xvmc_create_surface_reply_t *_aux = (xcb_xvmc_create_surface_reply_t *)_buffer;
    722     unsigned int xcb_buffer_len = 0;
    723     unsigned int xcb_block_len = 0;
    724     unsigned int xcb_pad = 0;
    725     unsigned int xcb_align_to;
    726 
    727 
    728     xcb_block_len += sizeof(xcb_xvmc_create_surface_reply_t);
    729     xcb_tmp += xcb_block_len;
    730     /* priv_data */
    731     xcb_block_len += _aux->length * sizeof(uint32_t);
    732     xcb_tmp += xcb_block_len;
    733     xcb_align_to = ALIGNOF(uint32_t);
    734     /* insert padding */
    735     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    736     xcb_buffer_len += xcb_block_len + xcb_pad;
    737     if (0 != xcb_pad) {
    738         xcb_tmp += xcb_pad;
    739         xcb_pad = 0;
    740     }
    741     xcb_block_len = 0;
    742 
    743     return xcb_buffer_len;
    744 }
    745 
    746 
    747 /*****************************************************************************
    748  **
    749  ** xcb_xvmc_create_surface_cookie_t xcb_xvmc_create_surface
    750  **
    751  ** @param xcb_connection_t   *c
    752  ** @param xcb_xvmc_surface_t  surface_id
    753  ** @param xcb_xvmc_context_t  context_id
    754  ** @returns xcb_xvmc_create_surface_cookie_t
    755  **
    756  *****************************************************************************/
    757 
    758 xcb_xvmc_create_surface_cookie_t
    759 xcb_xvmc_create_surface (xcb_connection_t   *c  /**< */,
    760                          xcb_xvmc_surface_t  surface_id  /**< */,
    761                          xcb_xvmc_context_t  context_id  /**< */)
    762 {
    763     static const xcb_protocol_request_t xcb_req = {
    764         /* count */ 2,
    765         /* ext */ &xcb_xvmc_id,
    766         /* opcode */ XCB_XVMC_CREATE_SURFACE,
    767         /* isvoid */ 0
    768     };
    769 
    770     struct iovec xcb_parts[4];
    771     xcb_xvmc_create_surface_cookie_t xcb_ret;
    772     xcb_xvmc_create_surface_request_t xcb_out;
    773 
    774     xcb_out.surface_id = surface_id;
    775     xcb_out.context_id = context_id;
    776 
    777     xcb_parts[2].iov_base = (char *) &xcb_out;
    778     xcb_parts[2].iov_len = sizeof(xcb_out);
    779     xcb_parts[3].iov_base = 0;
    780     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    781 
    782     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    783     return xcb_ret;
    784 }
    785 
    786 
    787 /*****************************************************************************
    788  **
    789  ** xcb_xvmc_create_surface_cookie_t xcb_xvmc_create_surface_unchecked
    790  **
    791  ** @param xcb_connection_t   *c
    792  ** @param xcb_xvmc_surface_t  surface_id
    793  ** @param xcb_xvmc_context_t  context_id
    794  ** @returns xcb_xvmc_create_surface_cookie_t
    795  **
    796  *****************************************************************************/
    797 
    798 xcb_xvmc_create_surface_cookie_t
    799 xcb_xvmc_create_surface_unchecked (xcb_connection_t   *c  /**< */,
    800                                    xcb_xvmc_surface_t  surface_id  /**< */,
    801                                    xcb_xvmc_context_t  context_id  /**< */)
    802 {
    803     static const xcb_protocol_request_t xcb_req = {
    804         /* count */ 2,
    805         /* ext */ &xcb_xvmc_id,
    806         /* opcode */ XCB_XVMC_CREATE_SURFACE,
    807         /* isvoid */ 0
    808     };
    809 
    810     struct iovec xcb_parts[4];
    811     xcb_xvmc_create_surface_cookie_t xcb_ret;
    812     xcb_xvmc_create_surface_request_t xcb_out;
    813 
    814     xcb_out.surface_id = surface_id;
    815     xcb_out.context_id = context_id;
    816 
    817     xcb_parts[2].iov_base = (char *) &xcb_out;
    818     xcb_parts[2].iov_len = sizeof(xcb_out);
    819     xcb_parts[3].iov_base = 0;
    820     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    821 
    822     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    823     return xcb_ret;
    824 }
    825 
    826 
    827 /*****************************************************************************
    828  **
    829  ** uint32_t * xcb_xvmc_create_surface_priv_data
    830  **
    831  ** @param const xcb_xvmc_create_surface_reply_t *R
    832  ** @returns uint32_t *
    833  **
    834  *****************************************************************************/
    835 
    836 uint32_t *
    837 xcb_xvmc_create_surface_priv_data (const xcb_xvmc_create_surface_reply_t *R  /**< */)
    838 {
    839     return (uint32_t *) (R + 1);
    840 }
    841 
    842 
    843 /*****************************************************************************
    844  **
    845  ** int xcb_xvmc_create_surface_priv_data_length
    846  **
    847  ** @param const xcb_xvmc_create_surface_reply_t *R
    848  ** @returns int
    849  **
    850  *****************************************************************************/
    851 
    852 int
    853 xcb_xvmc_create_surface_priv_data_length (const xcb_xvmc_create_surface_reply_t *R  /**< */)
    854 {
    855     return R->length;
    856 }
    857 
    858 
    859 /*****************************************************************************
    860  **
    861  ** xcb_generic_iterator_t xcb_xvmc_create_surface_priv_data_end
    862  **
    863  ** @param const xcb_xvmc_create_surface_reply_t *R
    864  ** @returns xcb_generic_iterator_t
    865  **
    866  *****************************************************************************/
    867 
    868 xcb_generic_iterator_t
    869 xcb_xvmc_create_surface_priv_data_end (const xcb_xvmc_create_surface_reply_t *R  /**< */)
    870 {
    871     xcb_generic_iterator_t i;
    872     i.data = ((uint32_t *) (R + 1)) + (R->length);
    873     i.rem = 0;
    874     i.index = (char *) i.data - (char *) R;
    875     return i;
    876 }
    877 
    878 
    879 /*****************************************************************************
    880  **
    881  ** xcb_xvmc_create_surface_reply_t * xcb_xvmc_create_surface_reply
    882  **
    883  ** @param xcb_connection_t                  *c
    884  ** @param xcb_xvmc_create_surface_cookie_t   cookie
    885  ** @param xcb_generic_error_t              **e
    886  ** @returns xcb_xvmc_create_surface_reply_t *
    887  **
    888  *****************************************************************************/
    889 
    890 xcb_xvmc_create_surface_reply_t *
    891 xcb_xvmc_create_surface_reply (xcb_connection_t                  *c  /**< */,
    892                                xcb_xvmc_create_surface_cookie_t   cookie  /**< */,
    893                                xcb_generic_error_t              **e  /**< */)
    894 {
    895     return (xcb_xvmc_create_surface_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    896 }
    897 
    898 
    899 /*****************************************************************************
    900  **
    901  ** xcb_void_cookie_t xcb_xvmc_destroy_surface_checked
    902  **
    903  ** @param xcb_connection_t   *c
    904  ** @param xcb_xvmc_surface_t  surface_id
    905  ** @returns xcb_void_cookie_t
    906  **
    907  *****************************************************************************/
    908 
    909 xcb_void_cookie_t
    910 xcb_xvmc_destroy_surface_checked (xcb_connection_t   *c  /**< */,
    911                                   xcb_xvmc_surface_t  surface_id  /**< */)
    912 {
    913     static const xcb_protocol_request_t xcb_req = {
    914         /* count */ 2,
    915         /* ext */ &xcb_xvmc_id,
    916         /* opcode */ XCB_XVMC_DESTROY_SURFACE,
    917         /* isvoid */ 1
    918     };
    919 
    920     struct iovec xcb_parts[4];
    921     xcb_void_cookie_t xcb_ret;
    922     xcb_xvmc_destroy_surface_request_t xcb_out;
    923 
    924     xcb_out.surface_id = surface_id;
    925 
    926     xcb_parts[2].iov_base = (char *) &xcb_out;
    927     xcb_parts[2].iov_len = sizeof(xcb_out);
    928     xcb_parts[3].iov_base = 0;
    929     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    930 
    931     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    932     return xcb_ret;
    933 }
    934 
    935 
    936 /*****************************************************************************
    937  **
    938  ** xcb_void_cookie_t xcb_xvmc_destroy_surface
    939  **
    940  ** @param xcb_connection_t   *c
    941  ** @param xcb_xvmc_surface_t  surface_id
    942  ** @returns xcb_void_cookie_t
    943  **
    944  *****************************************************************************/
    945 
    946 xcb_void_cookie_t
    947 xcb_xvmc_destroy_surface (xcb_connection_t   *c  /**< */,
    948                           xcb_xvmc_surface_t  surface_id  /**< */)
    949 {
    950     static const xcb_protocol_request_t xcb_req = {
    951         /* count */ 2,
    952         /* ext */ &xcb_xvmc_id,
    953         /* opcode */ XCB_XVMC_DESTROY_SURFACE,
    954         /* isvoid */ 1
    955     };
    956 
    957     struct iovec xcb_parts[4];
    958     xcb_void_cookie_t xcb_ret;
    959     xcb_xvmc_destroy_surface_request_t xcb_out;
    960 
    961     xcb_out.surface_id = surface_id;
    962 
    963     xcb_parts[2].iov_base = (char *) &xcb_out;
    964     xcb_parts[2].iov_len = sizeof(xcb_out);
    965     xcb_parts[3].iov_base = 0;
    966     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    967 
    968     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    969     return xcb_ret;
    970 }
    971 
    972 int
    973 xcb_xvmc_create_subpicture_sizeof (const void  *_buffer  /**< */)
    974 {
    975     char *xcb_tmp = (char *)_buffer;
    976     const xcb_xvmc_create_subpicture_reply_t *_aux = (xcb_xvmc_create_subpicture_reply_t *)_buffer;
    977     unsigned int xcb_buffer_len = 0;
    978     unsigned int xcb_block_len = 0;
    979     unsigned int xcb_pad = 0;
    980     unsigned int xcb_align_to;
    981 
    982 
    983     xcb_block_len += sizeof(xcb_xvmc_create_subpicture_reply_t);
    984     xcb_tmp += xcb_block_len;
    985     /* priv_data */
    986     xcb_block_len += _aux->length * sizeof(uint32_t);
    987     xcb_tmp += xcb_block_len;
    988     xcb_align_to = ALIGNOF(uint32_t);
    989     /* insert padding */
    990     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    991     xcb_buffer_len += xcb_block_len + xcb_pad;
    992     if (0 != xcb_pad) {
    993         xcb_tmp += xcb_pad;
    994         xcb_pad = 0;
    995     }
    996     xcb_block_len = 0;
    997 
    998     return xcb_buffer_len;
    999 }
   1000 
   1001 
   1002 /*****************************************************************************
   1003  **
   1004  ** xcb_xvmc_create_subpicture_cookie_t xcb_xvmc_create_subpicture
   1005  **
   1006  ** @param xcb_connection_t      *c
   1007  ** @param xcb_xvmc_subpicture_t  subpicture_id
   1008  ** @param xcb_xvmc_context_t     context
   1009  ** @param uint32_t               xvimage_id
   1010  ** @param uint16_t               width
   1011  ** @param uint16_t               height
   1012  ** @returns xcb_xvmc_create_subpicture_cookie_t
   1013  **
   1014  *****************************************************************************/
   1015 
   1016 xcb_xvmc_create_subpicture_cookie_t
   1017 xcb_xvmc_create_subpicture (xcb_connection_t      *c  /**< */,
   1018                             xcb_xvmc_subpicture_t  subpicture_id  /**< */,
   1019                             xcb_xvmc_context_t     context  /**< */,
   1020                             uint32_t               xvimage_id  /**< */,
   1021                             uint16_t               width  /**< */,
   1022                             uint16_t               height  /**< */)
   1023 {
   1024     static const xcb_protocol_request_t xcb_req = {
   1025         /* count */ 2,
   1026         /* ext */ &xcb_xvmc_id,
   1027         /* opcode */ XCB_XVMC_CREATE_SUBPICTURE,
   1028         /* isvoid */ 0
   1029     };
   1030 
   1031     struct iovec xcb_parts[4];
   1032     xcb_xvmc_create_subpicture_cookie_t xcb_ret;
   1033     xcb_xvmc_create_subpicture_request_t xcb_out;
   1034 
   1035     xcb_out.subpicture_id = subpicture_id;
   1036     xcb_out.context = context;
   1037     xcb_out.xvimage_id = xvimage_id;
   1038     xcb_out.width = width;
   1039     xcb_out.height = height;
   1040 
   1041     xcb_parts[2].iov_base = (char *) &xcb_out;
   1042     xcb_parts[2].iov_len = sizeof(xcb_out);
   1043     xcb_parts[3].iov_base = 0;
   1044     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1045 
   1046     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1047     return xcb_ret;
   1048 }
   1049 
   1050 
   1051 /*****************************************************************************
   1052  **
   1053  ** xcb_xvmc_create_subpicture_cookie_t xcb_xvmc_create_subpicture_unchecked
   1054  **
   1055  ** @param xcb_connection_t      *c
   1056  ** @param xcb_xvmc_subpicture_t  subpicture_id
   1057  ** @param xcb_xvmc_context_t     context
   1058  ** @param uint32_t               xvimage_id
   1059  ** @param uint16_t               width
   1060  ** @param uint16_t               height
   1061  ** @returns xcb_xvmc_create_subpicture_cookie_t
   1062  **
   1063  *****************************************************************************/
   1064 
   1065 xcb_xvmc_create_subpicture_cookie_t
   1066 xcb_xvmc_create_subpicture_unchecked (xcb_connection_t      *c  /**< */,
   1067                                       xcb_xvmc_subpicture_t  subpicture_id  /**< */,
   1068                                       xcb_xvmc_context_t     context  /**< */,
   1069                                       uint32_t               xvimage_id  /**< */,
   1070                                       uint16_t               width  /**< */,
   1071                                       uint16_t               height  /**< */)
   1072 {
   1073     static const xcb_protocol_request_t xcb_req = {
   1074         /* count */ 2,
   1075         /* ext */ &xcb_xvmc_id,
   1076         /* opcode */ XCB_XVMC_CREATE_SUBPICTURE,
   1077         /* isvoid */ 0
   1078     };
   1079 
   1080     struct iovec xcb_parts[4];
   1081     xcb_xvmc_create_subpicture_cookie_t xcb_ret;
   1082     xcb_xvmc_create_subpicture_request_t xcb_out;
   1083 
   1084     xcb_out.subpicture_id = subpicture_id;
   1085     xcb_out.context = context;
   1086     xcb_out.xvimage_id = xvimage_id;
   1087     xcb_out.width = width;
   1088     xcb_out.height = height;
   1089 
   1090     xcb_parts[2].iov_base = (char *) &xcb_out;
   1091     xcb_parts[2].iov_len = sizeof(xcb_out);
   1092     xcb_parts[3].iov_base = 0;
   1093     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1094 
   1095     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1096     return xcb_ret;
   1097 }
   1098 
   1099 
   1100 /*****************************************************************************
   1101  **
   1102  ** uint32_t * xcb_xvmc_create_subpicture_priv_data
   1103  **
   1104  ** @param const xcb_xvmc_create_subpicture_reply_t *R
   1105  ** @returns uint32_t *
   1106  **
   1107  *****************************************************************************/
   1108 
   1109 uint32_t *
   1110 xcb_xvmc_create_subpicture_priv_data (const xcb_xvmc_create_subpicture_reply_t *R  /**< */)
   1111 {
   1112     return (uint32_t *) (R + 1);
   1113 }
   1114 
   1115 
   1116 /*****************************************************************************
   1117  **
   1118  ** int xcb_xvmc_create_subpicture_priv_data_length
   1119  **
   1120  ** @param const xcb_xvmc_create_subpicture_reply_t *R
   1121  ** @returns int
   1122  **
   1123  *****************************************************************************/
   1124 
   1125 int
   1126 xcb_xvmc_create_subpicture_priv_data_length (const xcb_xvmc_create_subpicture_reply_t *R  /**< */)
   1127 {
   1128     return R->length;
   1129 }
   1130 
   1131 
   1132 /*****************************************************************************
   1133  **
   1134  ** xcb_generic_iterator_t xcb_xvmc_create_subpicture_priv_data_end
   1135  **
   1136  ** @param const xcb_xvmc_create_subpicture_reply_t *R
   1137  ** @returns xcb_generic_iterator_t
   1138  **
   1139  *****************************************************************************/
   1140 
   1141 xcb_generic_iterator_t
   1142 xcb_xvmc_create_subpicture_priv_data_end (const xcb_xvmc_create_subpicture_reply_t *R  /**< */)
   1143 {
   1144     xcb_generic_iterator_t i;
   1145     i.data = ((uint32_t *) (R + 1)) + (R->length);
   1146     i.rem = 0;
   1147     i.index = (char *) i.data - (char *) R;
   1148     return i;
   1149 }
   1150 
   1151 
   1152 /*****************************************************************************
   1153  **
   1154  ** xcb_xvmc_create_subpicture_reply_t * xcb_xvmc_create_subpicture_reply
   1155  **
   1156  ** @param xcb_connection_t                     *c
   1157  ** @param xcb_xvmc_create_subpicture_cookie_t   cookie
   1158  ** @param xcb_generic_error_t                 **e
   1159  ** @returns xcb_xvmc_create_subpicture_reply_t *
   1160  **
   1161  *****************************************************************************/
   1162 
   1163 xcb_xvmc_create_subpicture_reply_t *
   1164 xcb_xvmc_create_subpicture_reply (xcb_connection_t                     *c  /**< */,
   1165                                   xcb_xvmc_create_subpicture_cookie_t   cookie  /**< */,
   1166                                   xcb_generic_error_t                 **e  /**< */)
   1167 {
   1168     return (xcb_xvmc_create_subpicture_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   1169 }
   1170 
   1171 
   1172 /*****************************************************************************
   1173  **
   1174  ** xcb_void_cookie_t xcb_xvmc_destroy_subpicture_checked
   1175  **
   1176  ** @param xcb_connection_t      *c
   1177  ** @param xcb_xvmc_subpicture_t  subpicture_id
   1178  ** @returns xcb_void_cookie_t
   1179  **
   1180  *****************************************************************************/
   1181 
   1182 xcb_void_cookie_t
   1183 xcb_xvmc_destroy_subpicture_checked (xcb_connection_t      *c  /**< */,
   1184                                      xcb_xvmc_subpicture_t  subpicture_id  /**< */)
   1185 {
   1186     static const xcb_protocol_request_t xcb_req = {
   1187         /* count */ 2,
   1188         /* ext */ &xcb_xvmc_id,
   1189         /* opcode */ XCB_XVMC_DESTROY_SUBPICTURE,
   1190         /* isvoid */ 1
   1191     };
   1192 
   1193     struct iovec xcb_parts[4];
   1194     xcb_void_cookie_t xcb_ret;
   1195     xcb_xvmc_destroy_subpicture_request_t xcb_out;
   1196 
   1197     xcb_out.subpicture_id = subpicture_id;
   1198 
   1199     xcb_parts[2].iov_base = (char *) &xcb_out;
   1200     xcb_parts[2].iov_len = sizeof(xcb_out);
   1201     xcb_parts[3].iov_base = 0;
   1202     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1203 
   1204     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1205     return xcb_ret;
   1206 }
   1207 
   1208 
   1209 /*****************************************************************************
   1210  **
   1211  ** xcb_void_cookie_t xcb_xvmc_destroy_subpicture
   1212  **
   1213  ** @param xcb_connection_t      *c
   1214  ** @param xcb_xvmc_subpicture_t  subpicture_id
   1215  ** @returns xcb_void_cookie_t
   1216  **
   1217  *****************************************************************************/
   1218 
   1219 xcb_void_cookie_t
   1220 xcb_xvmc_destroy_subpicture (xcb_connection_t      *c  /**< */,
   1221                              xcb_xvmc_subpicture_t  subpicture_id  /**< */)
   1222 {
   1223     static const xcb_protocol_request_t xcb_req = {
   1224         /* count */ 2,
   1225         /* ext */ &xcb_xvmc_id,
   1226         /* opcode */ XCB_XVMC_DESTROY_SUBPICTURE,
   1227         /* isvoid */ 1
   1228     };
   1229 
   1230     struct iovec xcb_parts[4];
   1231     xcb_void_cookie_t xcb_ret;
   1232     xcb_xvmc_destroy_subpicture_request_t xcb_out;
   1233 
   1234     xcb_out.subpicture_id = subpicture_id;
   1235 
   1236     xcb_parts[2].iov_base = (char *) &xcb_out;
   1237     xcb_parts[2].iov_len = sizeof(xcb_out);
   1238     xcb_parts[3].iov_base = 0;
   1239     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1240 
   1241     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1242     return xcb_ret;
   1243 }
   1244 
   1245 int
   1246 xcb_xvmc_list_subpicture_types_sizeof (const void  *_buffer  /**< */)
   1247 {
   1248     char *xcb_tmp = (char *)_buffer;
   1249     const xcb_xvmc_list_subpicture_types_reply_t *_aux = (xcb_xvmc_list_subpicture_types_reply_t *)_buffer;
   1250     unsigned int xcb_buffer_len = 0;
   1251     unsigned int xcb_block_len = 0;
   1252     unsigned int xcb_pad = 0;
   1253     unsigned int xcb_align_to;
   1254 
   1255 
   1256     xcb_block_len += sizeof(xcb_xvmc_list_subpicture_types_reply_t);
   1257     xcb_tmp += xcb_block_len;
   1258     /* types */
   1259     xcb_block_len += _aux->num * sizeof(xcb_xv_image_format_info_t);
   1260     xcb_tmp += xcb_block_len;
   1261     xcb_align_to = ALIGNOF(xcb_xv_image_format_info_t);
   1262     /* insert padding */
   1263     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   1264     xcb_buffer_len += xcb_block_len + xcb_pad;
   1265     if (0 != xcb_pad) {
   1266         xcb_tmp += xcb_pad;
   1267         xcb_pad = 0;
   1268     }
   1269     xcb_block_len = 0;
   1270 
   1271     return xcb_buffer_len;
   1272 }
   1273 
   1274 
   1275 /*****************************************************************************
   1276  **
   1277  ** xcb_xvmc_list_subpicture_types_cookie_t xcb_xvmc_list_subpicture_types
   1278  **
   1279  ** @param xcb_connection_t   *c
   1280  ** @param xcb_xv_port_t       port_id
   1281  ** @param xcb_xvmc_surface_t  surface_id
   1282  ** @returns xcb_xvmc_list_subpicture_types_cookie_t
   1283  **
   1284  *****************************************************************************/
   1285 
   1286 xcb_xvmc_list_subpicture_types_cookie_t
   1287 xcb_xvmc_list_subpicture_types (xcb_connection_t   *c  /**< */,
   1288                                 xcb_xv_port_t       port_id  /**< */,
   1289                                 xcb_xvmc_surface_t  surface_id  /**< */)
   1290 {
   1291     static const xcb_protocol_request_t xcb_req = {
   1292         /* count */ 2,
   1293         /* ext */ &xcb_xvmc_id,
   1294         /* opcode */ XCB_XVMC_LIST_SUBPICTURE_TYPES,
   1295         /* isvoid */ 0
   1296     };
   1297 
   1298     struct iovec xcb_parts[4];
   1299     xcb_xvmc_list_subpicture_types_cookie_t xcb_ret;
   1300     xcb_xvmc_list_subpicture_types_request_t xcb_out;
   1301 
   1302     xcb_out.port_id = port_id;
   1303     xcb_out.surface_id = surface_id;
   1304 
   1305     xcb_parts[2].iov_base = (char *) &xcb_out;
   1306     xcb_parts[2].iov_len = sizeof(xcb_out);
   1307     xcb_parts[3].iov_base = 0;
   1308     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1309 
   1310     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1311     return xcb_ret;
   1312 }
   1313 
   1314 
   1315 /*****************************************************************************
   1316  **
   1317  ** xcb_xvmc_list_subpicture_types_cookie_t xcb_xvmc_list_subpicture_types_unchecked
   1318  **
   1319  ** @param xcb_connection_t   *c
   1320  ** @param xcb_xv_port_t       port_id
   1321  ** @param xcb_xvmc_surface_t  surface_id
   1322  ** @returns xcb_xvmc_list_subpicture_types_cookie_t
   1323  **
   1324  *****************************************************************************/
   1325 
   1326 xcb_xvmc_list_subpicture_types_cookie_t
   1327 xcb_xvmc_list_subpicture_types_unchecked (xcb_connection_t   *c  /**< */,
   1328                                           xcb_xv_port_t       port_id  /**< */,
   1329                                           xcb_xvmc_surface_t  surface_id  /**< */)
   1330 {
   1331     static const xcb_protocol_request_t xcb_req = {
   1332         /* count */ 2,
   1333         /* ext */ &xcb_xvmc_id,
   1334         /* opcode */ XCB_XVMC_LIST_SUBPICTURE_TYPES,
   1335         /* isvoid */ 0
   1336     };
   1337 
   1338     struct iovec xcb_parts[4];
   1339     xcb_xvmc_list_subpicture_types_cookie_t xcb_ret;
   1340     xcb_xvmc_list_subpicture_types_request_t xcb_out;
   1341 
   1342     xcb_out.port_id = port_id;
   1343     xcb_out.surface_id = surface_id;
   1344 
   1345     xcb_parts[2].iov_base = (char *) &xcb_out;
   1346     xcb_parts[2].iov_len = sizeof(xcb_out);
   1347     xcb_parts[3].iov_base = 0;
   1348     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1349 
   1350     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1351     return xcb_ret;
   1352 }
   1353 
   1354 
   1355 /*****************************************************************************
   1356  **
   1357  ** xcb_xv_image_format_info_t * xcb_xvmc_list_subpicture_types_types
   1358  **
   1359  ** @param const xcb_xvmc_list_subpicture_types_reply_t *R
   1360  ** @returns xcb_xv_image_format_info_t *
   1361  **
   1362  *****************************************************************************/
   1363 
   1364 xcb_xv_image_format_info_t *
   1365 xcb_xvmc_list_subpicture_types_types (const xcb_xvmc_list_subpicture_types_reply_t *R  /**< */)
   1366 {
   1367     return (xcb_xv_image_format_info_t *) (R + 1);
   1368 }
   1369 
   1370 
   1371 /*****************************************************************************
   1372  **
   1373  ** int xcb_xvmc_list_subpicture_types_types_length
   1374  **
   1375  ** @param const xcb_xvmc_list_subpicture_types_reply_t *R
   1376  ** @returns int
   1377  **
   1378  *****************************************************************************/
   1379 
   1380 int
   1381 xcb_xvmc_list_subpicture_types_types_length (const xcb_xvmc_list_subpicture_types_reply_t *R  /**< */)
   1382 {
   1383     return R->num;
   1384 }
   1385 
   1386 
   1387 /*****************************************************************************
   1388  **
   1389  ** xcb_xv_image_format_info_iterator_t xcb_xvmc_list_subpicture_types_types_iterator
   1390  **
   1391  ** @param const xcb_xvmc_list_subpicture_types_reply_t *R
   1392  ** @returns xcb_xv_image_format_info_iterator_t
   1393  **
   1394  *****************************************************************************/
   1395 
   1396 xcb_xv_image_format_info_iterator_t
   1397 xcb_xvmc_list_subpicture_types_types_iterator (const xcb_xvmc_list_subpicture_types_reply_t *R  /**< */)
   1398 {
   1399     xcb_xv_image_format_info_iterator_t i;
   1400     i.data = (xcb_xv_image_format_info_t *) (R + 1);
   1401     i.rem = R->num;
   1402     i.index = (char *) i.data - (char *) R;
   1403     return i;
   1404 }
   1405 
   1406 
   1407 /*****************************************************************************
   1408  **
   1409  ** xcb_xvmc_list_subpicture_types_reply_t * xcb_xvmc_list_subpicture_types_reply
   1410  **
   1411  ** @param xcb_connection_t                         *c
   1412  ** @param xcb_xvmc_list_subpicture_types_cookie_t   cookie
   1413  ** @param xcb_generic_error_t                     **e
   1414  ** @returns xcb_xvmc_list_subpicture_types_reply_t *
   1415  **
   1416  *****************************************************************************/
   1417 
   1418 xcb_xvmc_list_subpicture_types_reply_t *
   1419 xcb_xvmc_list_subpicture_types_reply (xcb_connection_t                         *c  /**< */,
   1420                                       xcb_xvmc_list_subpicture_types_cookie_t   cookie  /**< */,
   1421                                       xcb_generic_error_t                     **e  /**< */)
   1422 {
   1423     return (xcb_xvmc_list_subpicture_types_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   1424 }
   1425 
   1426