00001
00002
00003
00004
00005
00012 #ifndef __XVMC_H
00013 #define __XVMC_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017 #include "shm.h"
00018 #include "xv.h"
00019
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023
00024 #define XCB_XVMC_MAJOR_VERSION 1
00025 #define XCB_XVMC_MINOR_VERSION 1
00026
00027 extern xcb_extension_t xcb_xvmc_id;
00028
00029 typedef uint32_t xcb_xvmc_context_t;
00030
00034 typedef struct xcb_xvmc_context_iterator_t {
00035 xcb_xvmc_context_t *data;
00036 int rem;
00037 int index;
00038 } xcb_xvmc_context_iterator_t;
00039
00040 typedef uint32_t xcb_xvmc_surface_t;
00041
00045 typedef struct xcb_xvmc_surface_iterator_t {
00046 xcb_xvmc_surface_t *data;
00047 int rem;
00048 int index;
00049 } xcb_xvmc_surface_iterator_t;
00050
00051 typedef uint32_t xcb_xvmc_subpicture_t;
00052
00056 typedef struct xcb_xvmc_subpicture_iterator_t {
00057 xcb_xvmc_subpicture_t *data;
00058 int rem;
00059 int index;
00060 } xcb_xvmc_subpicture_iterator_t;
00061
00065 typedef struct xcb_xvmc_surface_info_t {
00066 xcb_xvmc_surface_t id;
00067 uint16_t chroma_format;
00068 uint16_t pad0;
00069 uint16_t max_width;
00070 uint16_t max_height;
00071 uint16_t subpicture_max_width;
00072 uint16_t subpicture_max_height;
00073 uint32_t mc_type;
00074 uint32_t flags;
00075 } xcb_xvmc_surface_info_t;
00076
00080 typedef struct xcb_xvmc_surface_info_iterator_t {
00081 xcb_xvmc_surface_info_t *data;
00082 int rem;
00083 int index;
00084 } xcb_xvmc_surface_info_iterator_t;
00085
00089 typedef struct xcb_xvmc_query_version_cookie_t {
00090 unsigned int sequence;
00091 } xcb_xvmc_query_version_cookie_t;
00092
00094 #define XCB_XVMC_QUERY_VERSION 0
00095
00099 typedef struct xcb_xvmc_query_version_request_t {
00100 uint8_t major_opcode;
00101 uint8_t minor_opcode;
00102 uint16_t length;
00103 } xcb_xvmc_query_version_request_t;
00104
00108 typedef struct xcb_xvmc_query_version_reply_t {
00109 uint8_t response_type;
00110 uint8_t pad0;
00111 uint16_t sequence;
00112 uint32_t length;
00113 uint32_t major;
00114 uint32_t minor;
00115 } xcb_xvmc_query_version_reply_t;
00116
00120 typedef struct xcb_xvmc_list_surface_types_cookie_t {
00121 unsigned int sequence;
00122 } xcb_xvmc_list_surface_types_cookie_t;
00123
00125 #define XCB_XVMC_LIST_SURFACE_TYPES 1
00126
00130 typedef struct xcb_xvmc_list_surface_types_request_t {
00131 uint8_t major_opcode;
00132 uint8_t minor_opcode;
00133 uint16_t length;
00134 xcb_xv_port_t port_id;
00135 } xcb_xvmc_list_surface_types_request_t;
00136
00140 typedef struct xcb_xvmc_list_surface_types_reply_t {
00141 uint8_t response_type;
00142 uint8_t pad0;
00143 uint16_t sequence;
00144 uint32_t length;
00145 uint32_t num;
00146 uint8_t pad1[20];
00147 } xcb_xvmc_list_surface_types_reply_t;
00148
00152 typedef struct xcb_xvmc_create_context_cookie_t {
00153 unsigned int sequence;
00154 } xcb_xvmc_create_context_cookie_t;
00155
00157 #define XCB_XVMC_CREATE_CONTEXT 2
00158
00162 typedef struct xcb_xvmc_create_context_request_t {
00163 uint8_t major_opcode;
00164 uint8_t minor_opcode;
00165 uint16_t length;
00166 xcb_xvmc_context_t context_id;
00167 xcb_xv_port_t port_id;
00168 xcb_xvmc_surface_t surface_id;
00169 uint16_t width;
00170 uint16_t height;
00171 uint32_t flags;
00172 } xcb_xvmc_create_context_request_t;
00173
00177 typedef struct xcb_xvmc_create_context_reply_t {
00178 uint8_t response_type;
00179 uint8_t pad0;
00180 uint16_t sequence;
00181 uint32_t length;
00182 uint16_t width_actual;
00183 uint16_t height_actual;
00184 uint32_t flags_return;
00185 uint8_t pad1[20];
00186 } xcb_xvmc_create_context_reply_t;
00187
00189 #define XCB_XVMC_DESTROY_CONTEXT 3
00190
00194 typedef struct xcb_xvmc_destroy_context_request_t {
00195 uint8_t major_opcode;
00196 uint8_t minor_opcode;
00197 uint16_t length;
00198 xcb_xvmc_context_t context_id;
00199 } xcb_xvmc_destroy_context_request_t;
00200
00204 typedef struct xcb_xvmc_create_surface_cookie_t {
00205 unsigned int sequence;
00206 } xcb_xvmc_create_surface_cookie_t;
00207
00209 #define XCB_XVMC_CREATE_SURFACE 4
00210
00214 typedef struct xcb_xvmc_create_surface_request_t {
00215 uint8_t major_opcode;
00216 uint8_t minor_opcode;
00217 uint16_t length;
00218 xcb_xvmc_surface_t surface_id;
00219 xcb_xvmc_context_t context_id;
00220 } xcb_xvmc_create_surface_request_t;
00221
00225 typedef struct xcb_xvmc_create_surface_reply_t {
00226 uint8_t response_type;
00227 uint8_t pad0;
00228 uint16_t sequence;
00229 uint32_t length;
00230 uint8_t pad1[24];
00231 } xcb_xvmc_create_surface_reply_t;
00232
00234 #define XCB_XVMC_DESTROY_SURFACE 5
00235
00239 typedef struct xcb_xvmc_destroy_surface_request_t {
00240 uint8_t major_opcode;
00241 uint8_t minor_opcode;
00242 uint16_t length;
00243 xcb_xvmc_surface_t surface_id;
00244 } xcb_xvmc_destroy_surface_request_t;
00245
00249 typedef struct xcb_xvmc_create_subpicture_cookie_t {
00250 unsigned int sequence;
00251 } xcb_xvmc_create_subpicture_cookie_t;
00252
00254 #define XCB_XVMC_CREATE_SUBPICTURE 6
00255
00259 typedef struct xcb_xvmc_create_subpicture_request_t {
00260 uint8_t major_opcode;
00261 uint8_t minor_opcode;
00262 uint16_t length;
00263 xcb_xvmc_subpicture_t subpicture_id;
00264 xcb_xvmc_context_t context;
00265 uint32_t xvimage_id;
00266 uint16_t width;
00267 uint16_t height;
00268 } xcb_xvmc_create_subpicture_request_t;
00269
00273 typedef struct xcb_xvmc_create_subpicture_reply_t {
00274 uint8_t response_type;
00275 uint8_t pad0;
00276 uint16_t sequence;
00277 uint32_t length;
00278 uint16_t width_actual;
00279 uint16_t height_actual;
00280 uint16_t num_palette_entries;
00281 uint16_t entry_bytes;
00282 uint8_t component_order[4];
00283 uint8_t pad1[12];
00284 } xcb_xvmc_create_subpicture_reply_t;
00285
00287 #define XCB_XVMC_DESTROY_SUBPICTURE 7
00288
00292 typedef struct xcb_xvmc_destroy_subpicture_request_t {
00293 uint8_t major_opcode;
00294 uint8_t minor_opcode;
00295 uint16_t length;
00296 xcb_xvmc_subpicture_t subpicture_id;
00297 } xcb_xvmc_destroy_subpicture_request_t;
00298
00302 typedef struct xcb_xvmc_list_subpicture_types_cookie_t {
00303 unsigned int sequence;
00304 } xcb_xvmc_list_subpicture_types_cookie_t;
00305
00307 #define XCB_XVMC_LIST_SUBPICTURE_TYPES 8
00308
00312 typedef struct xcb_xvmc_list_subpicture_types_request_t {
00313 uint8_t major_opcode;
00314 uint8_t minor_opcode;
00315 uint16_t length;
00316 xcb_xv_port_t port_id;
00317 xcb_xvmc_surface_t surface_id;
00318 } xcb_xvmc_list_subpicture_types_request_t;
00319
00323 typedef struct xcb_xvmc_list_subpicture_types_reply_t {
00324 uint8_t response_type;
00325 uint8_t pad0;
00326 uint16_t sequence;
00327 uint32_t length;
00328 uint32_t num;
00329 uint8_t pad1[20];
00330 } xcb_xvmc_list_subpicture_types_reply_t;
00331
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350 void
00351 xcb_xvmc_context_next (xcb_xvmc_context_iterator_t *i );
00352
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372 xcb_generic_iterator_t
00373 xcb_xvmc_context_end (xcb_xvmc_context_iterator_t i );
00374
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393 void
00394 xcb_xvmc_surface_next (xcb_xvmc_surface_iterator_t *i );
00395
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415 xcb_generic_iterator_t
00416 xcb_xvmc_surface_end (xcb_xvmc_surface_iterator_t i );
00417
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436 void
00437 xcb_xvmc_subpicture_next (xcb_xvmc_subpicture_iterator_t *i );
00438
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458 xcb_generic_iterator_t
00459 xcb_xvmc_subpicture_end (xcb_xvmc_subpicture_iterator_t i );
00460
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479 void
00480 xcb_xvmc_surface_info_next (xcb_xvmc_surface_info_iterator_t *i );
00481
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501 xcb_generic_iterator_t
00502 xcb_xvmc_surface_info_end (xcb_xvmc_surface_info_iterator_t i );
00503
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522 xcb_xvmc_query_version_cookie_t
00523 xcb_xvmc_query_version (xcb_connection_t *c );
00524
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546 xcb_xvmc_query_version_cookie_t
00547 xcb_xvmc_query_version_unchecked (xcb_connection_t *c );
00548
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575 xcb_xvmc_query_version_reply_t *
00576 xcb_xvmc_query_version_reply (xcb_connection_t *c ,
00577 xcb_xvmc_query_version_cookie_t cookie ,
00578 xcb_generic_error_t **e );
00579
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599 xcb_xvmc_list_surface_types_cookie_t
00600 xcb_xvmc_list_surface_types (xcb_connection_t *c ,
00601 xcb_xv_port_t port_id );
00602
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625 xcb_xvmc_list_surface_types_cookie_t
00626 xcb_xvmc_list_surface_types_unchecked (xcb_connection_t *c ,
00627 xcb_xv_port_t port_id );
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639 xcb_xvmc_surface_info_t *
00640 xcb_xvmc_list_surface_types_surfaces (const xcb_xvmc_list_surface_types_reply_t *R );
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652 int
00653 xcb_xvmc_list_surface_types_surfaces_length (const xcb_xvmc_list_surface_types_reply_t *R );
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665 xcb_xvmc_surface_info_iterator_t
00666 xcb_xvmc_list_surface_types_surfaces_iterator (const xcb_xvmc_list_surface_types_reply_t *R );
00667
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694 xcb_xvmc_list_surface_types_reply_t *
00695 xcb_xvmc_list_surface_types_reply (xcb_connection_t *c ,
00696 xcb_xvmc_list_surface_types_cookie_t cookie ,
00697 xcb_generic_error_t **e );
00698
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723 xcb_xvmc_create_context_cookie_t
00724 xcb_xvmc_create_context (xcb_connection_t *c ,
00725 xcb_xvmc_context_t context_id ,
00726 xcb_xv_port_t port_id ,
00727 xcb_xvmc_surface_t surface_id ,
00728 uint16_t width ,
00729 uint16_t height ,
00730 uint32_t flags );
00731
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759 xcb_xvmc_create_context_cookie_t
00760 xcb_xvmc_create_context_unchecked (xcb_connection_t *c ,
00761 xcb_xvmc_context_t context_id ,
00762 xcb_xv_port_t port_id ,
00763 xcb_xvmc_surface_t surface_id ,
00764 uint16_t width ,
00765 uint16_t height ,
00766 uint32_t flags );
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778 uint32_t *
00779 xcb_xvmc_create_context_priv_data (const xcb_xvmc_create_context_reply_t *R );
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791 int
00792 xcb_xvmc_create_context_priv_data_length (const xcb_xvmc_create_context_reply_t *R );
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804 xcb_generic_iterator_t
00805 xcb_xvmc_create_context_priv_data_end (const xcb_xvmc_create_context_reply_t *R );
00806
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833 xcb_xvmc_create_context_reply_t *
00834 xcb_xvmc_create_context_reply (xcb_connection_t *c ,
00835 xcb_xvmc_create_context_cookie_t cookie ,
00836 xcb_generic_error_t **e );
00837
00850
00851
00852
00853
00854
00855
00856
00857
00858
00859
00860 xcb_void_cookie_t
00861 xcb_xvmc_destroy_context_checked (xcb_connection_t *c ,
00862 xcb_xvmc_context_t context_id );
00863
00873
00874
00875
00876
00877
00878
00879
00880
00881
00882
00883 xcb_void_cookie_t
00884 xcb_xvmc_destroy_context (xcb_connection_t *c ,
00885 xcb_xvmc_context_t context_id );
00886
00896
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907 xcb_xvmc_create_surface_cookie_t
00908 xcb_xvmc_create_surface (xcb_connection_t *c ,
00909 xcb_xvmc_surface_t surface_id ,
00910 xcb_xvmc_context_t context_id );
00911
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933
00934
00935 xcb_xvmc_create_surface_cookie_t
00936 xcb_xvmc_create_surface_unchecked (xcb_connection_t *c ,
00937 xcb_xvmc_surface_t surface_id ,
00938 xcb_xvmc_context_t context_id );
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949
00950 uint32_t *
00951 xcb_xvmc_create_surface_priv_data (const xcb_xvmc_create_surface_reply_t *R );
00952
00953
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963 int
00964 xcb_xvmc_create_surface_priv_data_length (const xcb_xvmc_create_surface_reply_t *R );
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976 xcb_generic_iterator_t
00977 xcb_xvmc_create_surface_priv_data_end (const xcb_xvmc_create_surface_reply_t *R );
00978
00994
00995
00996
00997
00998
00999
01000
01001
01002
01003
01004
01005 xcb_xvmc_create_surface_reply_t *
01006 xcb_xvmc_create_surface_reply (xcb_connection_t *c ,
01007 xcb_xvmc_create_surface_cookie_t cookie ,
01008 xcb_generic_error_t **e );
01009
01022
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032 xcb_void_cookie_t
01033 xcb_xvmc_destroy_surface_checked (xcb_connection_t *c ,
01034 xcb_xvmc_surface_t surface_id );
01035
01045
01046
01047
01048
01049
01050
01051
01052
01053
01054
01055 xcb_void_cookie_t
01056 xcb_xvmc_destroy_surface (xcb_connection_t *c ,
01057 xcb_xvmc_surface_t surface_id );
01058
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079
01080
01081
01082 xcb_xvmc_create_subpicture_cookie_t
01083 xcb_xvmc_create_subpicture (xcb_connection_t *c ,
01084 xcb_xvmc_subpicture_t subpicture_id ,
01085 xcb_xvmc_context_t context ,
01086 uint32_t xvimage_id ,
01087 uint16_t width ,
01088 uint16_t height );
01089
01102
01103
01104
01105
01106
01107
01108
01109
01110
01111
01112
01113
01114
01115
01116 xcb_xvmc_create_subpicture_cookie_t
01117 xcb_xvmc_create_subpicture_unchecked (xcb_connection_t *c ,
01118 xcb_xvmc_subpicture_t subpicture_id ,
01119 xcb_xvmc_context_t context ,
01120 uint32_t xvimage_id ,
01121 uint16_t width ,
01122 uint16_t height );
01123
01124
01125
01126
01127
01128
01129
01130
01131
01132
01133
01134 uint32_t *
01135 xcb_xvmc_create_subpicture_priv_data (const xcb_xvmc_create_subpicture_reply_t *R );
01136
01137
01138
01139
01140
01141
01142
01143
01144
01145
01146
01147 int
01148 xcb_xvmc_create_subpicture_priv_data_length (const xcb_xvmc_create_subpicture_reply_t *R );
01149
01150
01151
01152
01153
01154
01155
01156
01157
01158
01159
01160 xcb_generic_iterator_t
01161 xcb_xvmc_create_subpicture_priv_data_end (const xcb_xvmc_create_subpicture_reply_t *R );
01162
01178
01179
01180
01181
01182
01183
01184
01185
01186
01187
01188
01189 xcb_xvmc_create_subpicture_reply_t *
01190 xcb_xvmc_create_subpicture_reply (xcb_connection_t *c ,
01191 xcb_xvmc_create_subpicture_cookie_t cookie ,
01192 xcb_generic_error_t **e );
01193
01206
01207
01208
01209
01210
01211
01212
01213
01214
01215
01216 xcb_void_cookie_t
01217 xcb_xvmc_destroy_subpicture_checked (xcb_connection_t *c ,
01218 xcb_xvmc_subpicture_t subpicture_id );
01219
01229
01230
01231
01232
01233
01234
01235
01236
01237
01238
01239 xcb_void_cookie_t
01240 xcb_xvmc_destroy_subpicture (xcb_connection_t *c ,
01241 xcb_xvmc_subpicture_t subpicture_id );
01242
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261
01262
01263 xcb_xvmc_list_subpicture_types_cookie_t
01264 xcb_xvmc_list_subpicture_types (xcb_connection_t *c ,
01265 xcb_xv_port_t port_id ,
01266 xcb_xvmc_surface_t surface_id );
01267
01280
01281
01282
01283
01284
01285
01286
01287
01288
01289
01290
01291 xcb_xvmc_list_subpicture_types_cookie_t
01292 xcb_xvmc_list_subpicture_types_unchecked (xcb_connection_t *c ,
01293 xcb_xv_port_t port_id ,
01294 xcb_xvmc_surface_t surface_id );
01295
01296
01297
01298
01299
01300
01301
01302
01303
01304
01305
01306 xcb_xv_image_format_info_t *
01307 xcb_xvmc_list_subpicture_types_types (const xcb_xvmc_list_subpicture_types_reply_t *R );
01308
01309
01310
01311
01312
01313
01314
01315
01316
01317
01318
01319 int
01320 xcb_xvmc_list_subpicture_types_types_length (const xcb_xvmc_list_subpicture_types_reply_t *R );
01321
01322
01323
01324
01325
01326
01327
01328
01329
01330
01331
01332 xcb_xv_image_format_info_iterator_t
01333 xcb_xvmc_list_subpicture_types_types_iterator (const xcb_xvmc_list_subpicture_types_reply_t *R );
01334
01350
01351
01352
01353
01354
01355
01356
01357
01358
01359
01360
01361 xcb_xvmc_list_subpicture_types_reply_t *
01362 xcb_xvmc_list_subpicture_types_reply (xcb_connection_t *c ,
01363 xcb_xvmc_list_subpicture_types_cookie_t cookie ,
01364 xcb_generic_error_t **e );
01365
01366
01367 #ifdef __cplusplus
01368 }
01369 #endif
01370
01371 #endif
01372