1#ifndef _XVMCLIB_H_
2#define _XVMCLIB_H_
3
4#include <X11/Xfuncproto.h>
5#include <X11/extensions/Xvlib.h>
6#include <X11/extensions/XvMC.h>
7
8_XFUNCPROTOBEGIN
9Bool XvMCQueryExtension(Display *display, int *eventBase, int *errBase);
10Status XvMCQueryVersion(Display *display, int *major_versionp,
11                        int *minor_versionp);
12Status XvMCGetDRInfo(Display *dpy, XvPortID port,
13                     char **name, char **busID,
14                     int *major, int *minor,
15                     int *patchLevel,
16                     int *isLocal);
17
18XvMCSurfaceInfo *XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num);
19
20Status XvMCCreateContext(Display *display,
21                         XvPortID port,
22                         int surface_type_id,
23                         int width,
24                         int height,
25                         int flags,
26                         XvMCContext *context);
27
28Status XvMCDestroyContext(Display *display, XvMCContext *context);
29
30Status
31XvMCCreateSurface(Display *display,
32                  XvMCContext *context,
33                  XvMCSurface *surface);
34
35Status XvMCDestroySurface(Display *display, XvMCSurface *surface);
36
37XvImageFormatValues *XvMCListSubpictureTypes(Display *display,
38                                             XvPortID port,
39                                             int surface_type_id,
40                                             int *count_return);
41
42Status
43XvMCPutSurface(Display *display,
44               XvMCSurface *surface,
45               Drawable draw,
46               short srcx,
47               short srcy,
48               unsigned short srcw,
49               unsigned short srch,
50               short destx,
51               short desty,
52               unsigned short destw,
53               unsigned short desth,
54               int flags);
55
56Status XvMCHideSurface(Display *display, XvMCSurface *surface);
57
58Status
59XvMCCreateSubpicture(Display *display,
60                     XvMCContext *context,
61                     XvMCSubpicture *subpicture,
62                     unsigned short width,
63                     unsigned short height,
64                     int xvimage_id);
65
66Status
67XvMCClearSubpicture(Display *display,
68                    XvMCSubpicture *subpicture,
69                    short x,
70                    short y,
71                    unsigned short width,
72                    unsigned short height,
73                    unsigned int color);
74
75Status
76XvMCCompositeSubpicture(Display *display,
77                        XvMCSubpicture *subpicture,
78                        XvImage *image,
79                        short srcx,
80                        short srcy,
81                        unsigned short width,
82                        unsigned short height,
83                        short dstx,
84                        short dsty);
85
86Status XvMCDestroySubpicture(Display *display, XvMCSubpicture *subpicture);
87
88Status
89XvMCSetSubpicturePalette(Display *display,
90                         XvMCSubpicture *subpicture,
91                         unsigned char *palette);
92
93Status
94XvMCBlendSubpicture(Display *display,
95                    XvMCSurface *target_surface,
96                    XvMCSubpicture *subpicture,
97                    short subx,
98                    short suby,
99                    unsigned short subw,
100                    unsigned short subh,
101                    short surfx,
102                    short surfy,
103                    unsigned short surfw,
104                    unsigned short surfh);
105
106Status
107XvMCBlendSubpicture2(Display *display,
108                     XvMCSurface *source_surface,
109                     XvMCSurface *target_surface,
110                     XvMCSubpicture *subpicture,
111                     short subx,
112                     short suby,
113                     unsigned short subw,
114                     unsigned short subh,
115                     short surfx,
116                     short surfy,
117                     unsigned short surfw,
118                     unsigned short surfh);
119
120Status XvMCSyncSurface(Display *display, XvMCSurface *surface);
121Status XvMCFlushSurface(Display *display, XvMCSurface *surface);
122Status XvMCGetSurfaceStatus(Display *display, XvMCSurface *surface, int *stat);
123
124Status XvMCRenderSurface(Display *display,
125                         XvMCContext *context,
126                         unsigned int picture_structure,
127                         XvMCSurface *target_surface,
128                         XvMCSurface *past_surface,
129                         XvMCSurface *future_surface,
130                         unsigned int flags,
131                         unsigned int num_macroblocks,
132                         unsigned int first_macroblock,
133                         XvMCMacroBlockArray *macroblock_array,
134                         XvMCBlockArray *blocks);
135
136Status XvMCSyncSubpicture(Display *display, XvMCSubpicture *subpicture);
137Status XvMCFlushSubpicture(Display *display, XvMCSubpicture *subpicture);
138Status
139XvMCGetSubpictureStatus(Display *display, XvMCSubpicture *subpic, int *stat);
140
141Status XvMCCreateBlocks(Display *display,
142                        XvMCContext *context,
143                        unsigned int num_blocks,
144                        XvMCBlockArray *block);
145
146Status XvMCDestroyBlocks(Display *display, XvMCBlockArray *block);
147
148Status XvMCCreateMacroBlocks(Display *display,
149                             XvMCContext *context,
150                             unsigned int num_blocks,
151                             XvMCMacroBlockArray *blocks);
152
153Status XvMCDestroyMacroBlocks(Display *display,
154                              XvMCMacroBlockArray *block);
155
156XvAttribute *XvMCQueryAttributes(Display *display,
157                                 XvMCContext *context,
158                                 int *number);
159
160Status
161XvMCSetAttribute(Display *display,
162                 XvMCContext *context,
163                 Atom attribute,
164                 int value);
165
166Status
167XvMCGetAttribute(Display *display,
168                 XvMCContext *context,
169                 Atom attribute,
170                 int *value);
171
172_XFUNCPROTOEND
173#endif
174