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 #define XCB_XVMC_MAJOR_VERSION 1
00021 #define XCB_XVMC_MINOR_VERSION 1
00022
00023 extern xcb_extension_t xcb_xvmc_id;
00024
00025 typedef uint32_t xcb_xvmc_context_t;
00026
00030 typedef struct xcb_xvmc_context_iterator_t {
00031 xcb_xvmc_context_t *data;
00032 int rem;
00033 int index;
00034 } xcb_xvmc_context_iterator_t;
00035
00036 typedef uint32_t xcb_xvmc_surface_t;
00037
00041 typedef struct xcb_xvmc_surface_iterator_t {
00042 xcb_xvmc_surface_t *data;
00043 int rem;
00044 int index;
00045 } xcb_xvmc_surface_iterator_t;
00046
00047 typedef uint32_t xcb_xvmc_subpicture_t;
00048
00052 typedef struct xcb_xvmc_subpicture_iterator_t {
00053 xcb_xvmc_subpicture_t *data;
00054 int rem;
00055 int index;
00056 } xcb_xvmc_subpicture_iterator_t;
00057
00061 typedef struct xcb_xvmc_surface_info_t {
00062 xcb_xvmc_surface_t id;
00063 uint16_t chroma_format;
00064 uint16_t pad0;
00065 uint16_t max_width;
00066 uint16_t max_height;
00067 uint16_t subpicture_max_width;
00068 uint16_t subpicture_max_height;
00069 uint32_t mc_type;
00070 uint32_t flags;
00071 } xcb_xvmc_surface_info_t;
00072
00076 typedef struct xcb_xvmc_surface_info_iterator_t {
00077 xcb_xvmc_surface_info_t *data;
00078 int rem;
00079 int index;
00080 } xcb_xvmc_surface_info_iterator_t;
00081
00085 typedef struct xcb_xvmc_query_version_cookie_t {
00086 unsigned int sequence;
00087 } xcb_xvmc_query_version_cookie_t;
00088
00090 #define XCB_XVMC_QUERY_VERSION 0
00091
00095 typedef struct xcb_xvmc_query_version_request_t {
00096 uint8_t major_opcode;
00097 uint8_t minor_opcode;
00098 uint16_t length;
00099 } xcb_xvmc_query_version_request_t;
00100
00104 typedef struct xcb_xvmc_query_version_reply_t {
00105 uint8_t response_type;
00106 uint8_t pad0;
00107 uint16_t sequence;
00108 uint32_t length;
00109 uint32_t major;
00110 uint32_t minor;
00111 } xcb_xvmc_query_version_reply_t;
00112
00116 typedef struct xcb_xvmc_list_surface_types_cookie_t {
00117 unsigned int sequence;
00118 } xcb_xvmc_list_surface_types_cookie_t;
00119
00121 #define XCB_XVMC_LIST_SURFACE_TYPES 1
00122
00126 typedef struct xcb_xvmc_list_surface_types_request_t {
00127 uint8_t major_opcode;
00128 uint8_t minor_opcode;
00129 uint16_t length;
00130 xcb_xv_port_t port_id;
00131 } xcb_xvmc_list_surface_types_request_t;
00132
00136 typedef struct xcb_xvmc_list_surface_types_reply_t {
00137 uint8_t response_type;
00138 uint8_t pad0;
00139 uint16_t sequence;
00140 uint32_t length;
00141 uint32_t num;
00142 uint8_t pad1[20];
00143 } xcb_xvmc_list_surface_types_reply_t;
00144
00148 typedef struct xcb_xvmc_create_context_cookie_t {
00149 unsigned int sequence;
00150 } xcb_xvmc_create_context_cookie_t;
00151
00153 #define XCB_XVMC_CREATE_CONTEXT 2
00154
00158 typedef struct xcb_xvmc_create_context_request_t {
00159 uint8_t major_opcode;
00160 uint8_t minor_opcode;
00161 uint16_t length;
00162 xcb_xvmc_context_t context_id;
00163 xcb_xv_port_t port_id;
00164 xcb_xvmc_surface_t surface_id;
00165 uint16_t width;
00166 uint16_t height;
00167 uint32_t flags;
00168 } xcb_xvmc_create_context_request_t;
00169
00173 typedef struct xcb_xvmc_create_context_reply_t {
00174 uint8_t response_type;
00175 uint8_t pad0;
00176 uint16_t sequence;
00177 uint32_t length;
00178 uint16_t width_actual;
00179 uint16_t height_actual;
00180 uint32_t flags_return;
00181 uint8_t pad1[20];
00182 } xcb_xvmc_create_context_reply_t;
00183
00185 #define XCB_XVMC_DESTROY_CONTEXT 3
00186
00190 typedef struct xcb_xvmc_destroy_context_request_t {
00191 uint8_t major_opcode;
00192 uint8_t minor_opcode;
00193 uint16_t length;
00194 xcb_xvmc_context_t context_id;
00195 } xcb_xvmc_destroy_context_request_t;
00196
00200 typedef struct xcb_xvmc_create_surface_cookie_t {
00201 unsigned int sequence;
00202 } xcb_xvmc_create_surface_cookie_t;
00203
00205 #define XCB_XVMC_CREATE_SURFACE 4
00206
00210 typedef struct xcb_xvmc_create_surface_request_t {
00211 uint8_t major_opcode;
00212 uint8_t minor_opcode;
00213 uint16_t length;
00214 xcb_xvmc_surface_t surface_id;
00215 xcb_xvmc_context_t context_id;
00216 } xcb_xvmc_create_surface_request_t;
00217
00221 typedef struct xcb_xvmc_create_surface_reply_t {
00222 uint8_t response_type;
00223 uint8_t pad0;
00224 uint16_t sequence;
00225 uint32_t length;
00226 uint8_t pad1[24];
00227 } xcb_xvmc_create_surface_reply_t;
00228
00230 #define XCB_XVMC_DESTROY_SURFACE 5
00231
00235 typedef struct xcb_xvmc_destroy_surface_request_t {
00236 uint8_t major_opcode;
00237 uint8_t minor_opcode;
00238 uint16_t length;
00239 xcb_xvmc_surface_t surface_id;
00240 } xcb_xvmc_destroy_surface_request_t;
00241
00245 typedef struct xcb_xvmc_create_subpicture_cookie_t {
00246 unsigned int sequence;
00247 } xcb_xvmc_create_subpicture_cookie_t;
00248
00250 #define XCB_XVMC_CREATE_SUBPICTURE 6
00251
00255 typedef struct xcb_xvmc_create_subpicture_request_t {
00256 uint8_t major_opcode;
00257 uint8_t minor_opcode;
00258 uint16_t length;
00259 xcb_xvmc_subpicture_t subpicture_id;
00260 xcb_xvmc_context_t context;
00261 uint32_t xvimage_id;
00262 uint16_t width;
00263 uint16_t height;
00264 } xcb_xvmc_create_subpicture_request_t;
00265
00269 typedef struct xcb_xvmc_create_subpicture_reply_t {
00270 uint8_t response_type;
00271 uint8_t pad0;
00272 uint16_t sequence;
00273 uint32_t length;
00274 uint16_t width_actual;
00275 uint16_t height_actual;
00276 uint16_t num_palette_entries;
00277 uint16_t entry_bytes;
00278 uint8_t component_order[4];
00279 uint8_t pad1[12];
00280 } xcb_xvmc_create_subpicture_reply_t;
00281
00283 #define XCB_XVMC_DESTROY_SUBPICTURE 7
00284
00288 typedef struct xcb_xvmc_destroy_subpicture_request_t {
00289 uint8_t major_opcode;
00290 uint8_t minor_opcode;
00291 uint16_t length;
00292 xcb_xvmc_subpicture_t subpicture_id;
00293 } xcb_xvmc_destroy_subpicture_request_t;
00294
00298 typedef struct xcb_xvmc_list_subpicture_types_cookie_t {
00299 unsigned int sequence;
00300 } xcb_xvmc_list_subpicture_types_cookie_t;
00301
00303 #define XCB_XVMC_LIST_SUBPICTURE_TYPES 8
00304
00308 typedef struct xcb_xvmc_list_subpicture_types_request_t {
00309 uint8_t major_opcode;
00310 uint8_t minor_opcode;
00311 uint16_t length;
00312 xcb_xv_port_t port_id;
00313 xcb_xvmc_surface_t surface_id;
00314 } xcb_xvmc_list_subpicture_types_request_t;
00315
00319 typedef struct xcb_xvmc_list_subpicture_types_reply_t {
00320 uint8_t response_type;
00321 uint8_t pad0;
00322 uint16_t sequence;
00323 uint32_t length;
00324 uint32_t num;
00325 uint8_t pad1[20];
00326 } xcb_xvmc_list_subpicture_types_reply_t;
00327
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346 void
00347 xcb_xvmc_context_next (xcb_xvmc_context_iterator_t *i );
00348
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368 xcb_generic_iterator_t
00369 xcb_xvmc_context_end (xcb_xvmc_context_iterator_t i );
00370
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389 void
00390 xcb_xvmc_surface_next (xcb_xvmc_surface_iterator_t *i );
00391
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411 xcb_generic_iterator_t
00412 xcb_xvmc_surface_end (xcb_xvmc_surface_iterator_t i );
00413
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432 void
00433 xcb_xvmc_subpicture_next (xcb_xvmc_subpicture_iterator_t *i );
00434
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454 xcb_generic_iterator_t
00455 xcb_xvmc_subpicture_end (xcb_xvmc_subpicture_iterator_t i );
00456
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475 void
00476 xcb_xvmc_surface_info_next (xcb_xvmc_surface_info_iterator_t *i );
00477
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497 xcb_generic_iterator_t
00498 xcb_xvmc_surface_info_end (xcb_xvmc_surface_info_iterator_t i );
00499
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518 xcb_xvmc_query_version_cookie_t
00519 xcb_xvmc_query_version (xcb_connection_t *c );
00520
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542 xcb_xvmc_query_version_cookie_t
00543 xcb_xvmc_query_version_unchecked (xcb_connection_t *c );
00544
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571 xcb_xvmc_query_version_reply_t *
00572 xcb_xvmc_query_version_reply (xcb_connection_t *c ,
00573 xcb_xvmc_query_version_cookie_t cookie ,
00574 xcb_generic_error_t **e );
00575
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595 xcb_xvmc_list_surface_types_cookie_t
00596 xcb_xvmc_list_surface_types (xcb_connection_t *c ,
00597 xcb_xv_port_t port_id );
00598
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621 xcb_xvmc_list_surface_types_cookie_t
00622 xcb_xvmc_list_surface_types_unchecked (xcb_connection_t *c ,
00623 xcb_xv_port_t port_id );
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635 xcb_xvmc_surface_info_t *
00636 xcb_xvmc_list_surface_types_surfaces (const xcb_xvmc_list_surface_types_reply_t *R );
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648 int
00649 xcb_xvmc_list_surface_types_surfaces_length (const xcb_xvmc_list_surface_types_reply_t *R );
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661 xcb_xvmc_surface_info_iterator_t
00662 xcb_xvmc_list_surface_types_surfaces_iterator (const xcb_xvmc_list_surface_types_reply_t *R );
00663
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690 xcb_xvmc_list_surface_types_reply_t *
00691 xcb_xvmc_list_surface_types_reply (xcb_connection_t *c ,
00692 xcb_xvmc_list_surface_types_cookie_t cookie ,
00693 xcb_generic_error_t **e );
00694
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719 xcb_xvmc_create_context_cookie_t
00720 xcb_xvmc_create_context (xcb_connection_t *c ,
00721 xcb_xvmc_context_t context_id ,
00722 xcb_xv_port_t port_id ,
00723 xcb_xvmc_surface_t surface_id ,
00724 uint16_t width ,
00725 uint16_t height ,
00726 uint32_t flags );
00727
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755 xcb_xvmc_create_context_cookie_t
00756 xcb_xvmc_create_context_unchecked (xcb_connection_t *c ,
00757 xcb_xvmc_context_t context_id ,
00758 xcb_xv_port_t port_id ,
00759 xcb_xvmc_surface_t surface_id ,
00760 uint16_t width ,
00761 uint16_t height ,
00762 uint32_t flags );
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774 uint32_t *
00775 xcb_xvmc_create_context_priv_data (const xcb_xvmc_create_context_reply_t *R );
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787 int
00788 xcb_xvmc_create_context_priv_data_length (const xcb_xvmc_create_context_reply_t *R );
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800 xcb_generic_iterator_t
00801 xcb_xvmc_create_context_priv_data_end (const xcb_xvmc_create_context_reply_t *R );
00802
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829 xcb_xvmc_create_context_reply_t *
00830 xcb_xvmc_create_context_reply (xcb_connection_t *c ,
00831 xcb_xvmc_create_context_cookie_t cookie ,
00832 xcb_generic_error_t **e );
00833
00846
00847
00848
00849
00850
00851
00852
00853
00854
00855
00856 xcb_void_cookie_t
00857 xcb_xvmc_destroy_context_checked (xcb_connection_t *c ,
00858 xcb_xvmc_context_t context_id );
00859
00869
00870
00871
00872
00873
00874
00875
00876
00877
00878
00879 xcb_void_cookie_t
00880 xcb_xvmc_destroy_context (xcb_connection_t *c ,
00881 xcb_xvmc_context_t context_id );
00882
00892
00893
00894
00895
00896
00897
00898
00899
00900
00901
00902
00903 xcb_xvmc_create_surface_cookie_t
00904 xcb_xvmc_create_surface (xcb_connection_t *c ,
00905 xcb_xvmc_surface_t surface_id ,
00906 xcb_xvmc_context_t context_id );
00907
00920
00921
00922
00923
00924
00925
00926
00927
00928
00929
00930
00931 xcb_xvmc_create_surface_cookie_t
00932 xcb_xvmc_create_surface_unchecked (xcb_connection_t *c ,
00933 xcb_xvmc_surface_t surface_id ,
00934 xcb_xvmc_context_t context_id );
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946 uint32_t *
00947 xcb_xvmc_create_surface_priv_data (const xcb_xvmc_create_surface_reply_t *R );
00948
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959 int
00960 xcb_xvmc_create_surface_priv_data_length (const xcb_xvmc_create_surface_reply_t *R );
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970
00971
00972 xcb_generic_iterator_t
00973 xcb_xvmc_create_surface_priv_data_end (const xcb_xvmc_create_surface_reply_t *R );
00974
00990
00991
00992
00993
00994
00995
00996
00997
00998
00999
01000
01001 xcb_xvmc_create_surface_reply_t *
01002 xcb_xvmc_create_surface_reply (xcb_connection_t *c ,
01003 xcb_xvmc_create_surface_cookie_t cookie ,
01004 xcb_generic_error_t **e );
01005
01018
01019
01020
01021
01022
01023
01024
01025
01026
01027
01028 xcb_void_cookie_t
01029 xcb_xvmc_destroy_surface_checked (xcb_connection_t *c ,
01030 xcb_xvmc_surface_t surface_id );
01031
01041
01042
01043
01044
01045
01046
01047
01048
01049
01050
01051 xcb_void_cookie_t
01052 xcb_xvmc_destroy_surface (xcb_connection_t *c ,
01053 xcb_xvmc_surface_t surface_id );
01054
01064
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078 xcb_xvmc_create_subpicture_cookie_t
01079 xcb_xvmc_create_subpicture (xcb_connection_t *c ,
01080 xcb_xvmc_subpicture_t subpicture_id ,
01081 xcb_xvmc_context_t context ,
01082 uint32_t xvimage_id ,
01083 uint16_t width ,
01084 uint16_t height );
01085
01098
01099
01100
01101
01102
01103
01104
01105
01106
01107
01108
01109
01110
01111
01112 xcb_xvmc_create_subpicture_cookie_t
01113 xcb_xvmc_create_subpicture_unchecked (xcb_connection_t *c ,
01114 xcb_xvmc_subpicture_t subpicture_id ,
01115 xcb_xvmc_context_t context ,
01116 uint32_t xvimage_id ,
01117 uint16_t width ,
01118 uint16_t height );
01119
01120
01121
01122
01123
01124
01125
01126
01127
01128
01129
01130 uint32_t *
01131 xcb_xvmc_create_subpicture_priv_data (const xcb_xvmc_create_subpicture_reply_t *R );
01132
01133
01134
01135
01136
01137
01138
01139
01140
01141
01142
01143 int
01144 xcb_xvmc_create_subpicture_priv_data_length (const xcb_xvmc_create_subpicture_reply_t *R );
01145
01146
01147
01148
01149
01150
01151
01152
01153
01154
01155
01156 xcb_generic_iterator_t
01157 xcb_xvmc_create_subpicture_priv_data_end (const xcb_xvmc_create_subpicture_reply_t *R );
01158
01174
01175
01176
01177
01178
01179
01180
01181
01182
01183
01184
01185 xcb_xvmc_create_subpicture_reply_t *
01186 xcb_xvmc_create_subpicture_reply (xcb_connection_t *c ,
01187 xcb_xvmc_create_subpicture_cookie_t cookie ,
01188 xcb_generic_error_t **e );
01189
01202
01203
01204
01205
01206
01207
01208
01209
01210
01211
01212 xcb_void_cookie_t
01213 xcb_xvmc_destroy_subpicture_checked (xcb_connection_t *c ,
01214 xcb_xvmc_subpicture_t subpicture_id );
01215
01225
01226
01227
01228
01229
01230
01231
01232
01233
01234
01235 xcb_void_cookie_t
01236 xcb_xvmc_destroy_subpicture (xcb_connection_t *c ,
01237 xcb_xvmc_subpicture_t subpicture_id );
01238
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259 xcb_xvmc_list_subpicture_types_cookie_t
01260 xcb_xvmc_list_subpicture_types (xcb_connection_t *c ,
01261 xcb_xv_port_t port_id ,
01262 xcb_xvmc_surface_t surface_id );
01263
01276
01277
01278
01279
01280
01281
01282
01283
01284
01285
01286
01287 xcb_xvmc_list_subpicture_types_cookie_t
01288 xcb_xvmc_list_subpicture_types_unchecked (xcb_connection_t *c ,
01289 xcb_xv_port_t port_id ,
01290 xcb_xvmc_surface_t surface_id );
01291
01292
01293
01294
01295
01296
01297
01298
01299
01300
01301
01302 xcb_xv_image_format_info_t *
01303 xcb_xvmc_list_subpicture_types_types (const xcb_xvmc_list_subpicture_types_reply_t *R );
01304
01305
01306
01307
01308
01309
01310
01311
01312
01313
01314
01315 int
01316 xcb_xvmc_list_subpicture_types_types_length (const xcb_xvmc_list_subpicture_types_reply_t *R );
01317
01318
01319
01320
01321
01322
01323
01324
01325
01326
01327
01328 xcb_xv_image_format_info_iterator_t
01329 xcb_xvmc_list_subpicture_types_types_iterator (const xcb_xvmc_list_subpicture_types_reply_t *R );
01330
01346
01347
01348
01349
01350
01351
01352
01353
01354
01355
01356
01357 xcb_xvmc_list_subpicture_types_reply_t *
01358 xcb_xvmc_list_subpicture_types_reply (xcb_connection_t *c ,
01359 xcb_xvmc_list_subpicture_types_cookie_t cookie ,
01360 xcb_generic_error_t **e );
01361
01362
01363 #endif
01364