| 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 | Bool XvMCQueryExtension(Display *display, int *eventBase, int *errBase); |
| 10 | Status XvMCQueryVersion(Display *display, int *major_versionp, |
| 11 | int *minor_versionp); |
| 12 | Status XvMCGetDRInfo(Display *dpy, XvPortID port, |
| 13 | char **name, char **busID, |
| 14 | int *major, int *minor, |
| 15 | int *patchLevel, |
| 16 | int *isLocal); |
| 17 | |
| 18 | XvMCSurfaceInfo *XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num); |
| 19 | |
| 20 | Status XvMCCreateContext(Display *display, |
| 21 | XvPortID port, |
| 22 | int surface_type_id, |
| 23 | int width, |
| 24 | int height, |
| 25 | int flags, |
| 26 | XvMCContext *context); |
| 27 | |
| 28 | Status XvMCDestroyContext(Display *display, XvMCContext *context); |
| 29 | |
| 30 | Status |
| 31 | XvMCCreateSurface(Display *display, |
| 32 | XvMCContext *context, |
| 33 | XvMCSurface *surface); |
| 34 | |
| 35 | Status XvMCDestroySurface(Display *display, XvMCSurface *surface); |
| 36 | |
| 37 | XvImageFormatValues *XvMCListSubpictureTypes(Display *display, |
| 38 | XvPortID port, |
| 39 | int surface_type_id, |
| 40 | int *count_return); |
| 41 | |
| 42 | Status |
| 43 | XvMCPutSurface(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 | |
| 56 | Status XvMCHideSurface(Display *display, XvMCSurface *surface); |
| 57 | |
| 58 | Status |
| 59 | XvMCCreateSubpicture(Display *display, |
| 60 | XvMCContext *context, |
| 61 | XvMCSubpicture *subpicture, |
| 62 | unsigned short width, |
| 63 | unsigned short height, |
| 64 | int xvimage_id); |
| 65 | |
| 66 | Status |
| 67 | XvMCClearSubpicture(Display *display, |
| 68 | XvMCSubpicture *subpicture, |
| 69 | short x, |
| 70 | short y, |
| 71 | unsigned short width, |
| 72 | unsigned short height, |
| 73 | unsigned int color); |
| 74 | |
| 75 | Status |
| 76 | XvMCCompositeSubpicture(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 | |
| 86 | Status XvMCDestroySubpicture(Display *display, XvMCSubpicture *subpicture); |
| 87 | |
| 88 | Status |
| 89 | XvMCSetSubpicturePalette(Display *display, |
| 90 | XvMCSubpicture *subpicture, |
| 91 | unsigned char *palette); |
| 92 | |
| 93 | Status |
| 94 | XvMCBlendSubpicture(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 | |
| 106 | Status |
| 107 | XvMCBlendSubpicture2(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 | |
| 120 | Status XvMCSyncSurface(Display *display, XvMCSurface *surface); |
| 121 | Status XvMCFlushSurface(Display *display, XvMCSurface *surface); |
| 122 | Status XvMCGetSurfaceStatus(Display *display, XvMCSurface *surface, int *stat); |
| 123 | |
| 124 | Status 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 | |
| 136 | Status XvMCSyncSubpicture(Display *display, XvMCSubpicture *subpicture); |
| 137 | Status XvMCFlushSubpicture(Display *display, XvMCSubpicture *subpicture); |
| 138 | Status |
| 139 | XvMCGetSubpictureStatus(Display *display, XvMCSubpicture *subpic, int *stat); |
| 140 | |
| 141 | Status XvMCCreateBlocks(Display *display, |
| 142 | XvMCContext *context, |
| 143 | unsigned int num_blocks, |
| 144 | XvMCBlockArray *block); |
| 145 | |
| 146 | Status XvMCDestroyBlocks(Display *display, XvMCBlockArray *block); |
| 147 | |
| 148 | Status XvMCCreateMacroBlocks(Display *display, |
| 149 | XvMCContext *context, |
| 150 | unsigned int num_blocks, |
| 151 | XvMCMacroBlockArray *blocks); |
| 152 | |
| 153 | Status XvMCDestroyMacroBlocks(Display *display, |
| 154 | XvMCMacroBlockArray *block); |
| 155 | |
| 156 | XvAttribute *XvMCQueryAttributes(Display *display, |
| 157 | XvMCContext *context, |
| 158 | int *number); |
| 159 | |
| 160 | Status |
| 161 | XvMCSetAttribute(Display *display, |
| 162 | XvMCContext *context, |
| 163 | Atom attribute, |
| 164 | int value); |
| 165 | |
| 166 | Status |
| 167 | XvMCGetAttribute(Display *display, |
| 168 | XvMCContext *context, |
| 169 | Atom attribute, |
| 170 | int *value); |
| 171 | |
| 172 | _XFUNCPROTOEND |
| 173 | #endif |