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