1
/*****************************************************************************
2
* XvMC Wrapper including the Nonstandard VLD extension.
4
* Copyright (c) 2004 The Unichrome project. All rights reserved.
7
* Permission is hereby granted, free of charge, to any person obtaining a
8
* copy of this software and associated documentation files (the "Software"),
9
* to deal in the Software without restriction, including without limitation
10
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
* and/or sell copies of the Software, and to permit persons to whom the
12
* Software is furnished to do so, subject to the following conditions:
14
* The above copyright notice and this permission notice shall be included in
15
* all copies or substantial portions of the Software.
17
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
* AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
* DEALINGS IN THE SOFTWARE.
25
* Author: Thomas Hellström (2004)
29
* BUGS: The wrapper really should maintain one symbol table per port. This
30
* could possibly be impemented, To do that, the port-independent symbols need to be lifted out,
31
* and one would have to create a number of mapping tables:
33
* port -> symbol table
38
* and reference the right table when needed.
39
* This needs to be done only if there is a player that wants to access two displays with different
40
* hardware simultaneously. Not likely as of today.
47
#include <X11/extensions/XvMC.h>
48
#include <X11/extensions/vldXvMC.h>
56
typedef Bool (*XvMCQueryExtensionP) (Display *, int *, int *);
57
typedef Status (*XvMCQueryVersionP) (Display *, int *,int *);
58
typedef XvMCSurfaceInfo * (*XvMCListSurfaceTypesP)(Display *, XvPortID, int *);
59
typedef Status (* XvMCCreateContextP) (Display *,XvPortID,int ,int ,int ,int ,XvMCContext * );
60
typedef Status (*XvMCDestroyContextP) (Display *, XvMCContext * );
61
typedef Status (*XvMCCreateSurfaceP)(Display *,XvMCContext *,XvMCSurface *);
62
typedef Status (*XvMCDestroySurfaceP)(Display *, XvMCSurface *);
63
typedef XvImageFormatValues * (*XvMCListSubpictureTypesP) (Display *,XvPortID ,int ,int *);
64
typedef Status (*XvMCPutSurfaceP)(Display *,XvMCSurface *,Drawable ,short , short , unsigned short ,
65
unsigned short ,short ,short ,unsigned short ,unsigned short ,int );
66
typedef Status (*XvMCHideSurfaceP)(Display *, XvMCSurface *);
67
typedef Status (*XvMCCreateSubpictureP) (Display *, XvMCContext *, XvMCSubpicture *,
68
unsigned short, unsigned short,int);
69
typedef Status (*XvMCClearSubpictureP) (Display *,XvMCSubpicture *,short,short,unsigned short,unsigned short,
71
typedef Status (*XvMCCompositeSubpictureP) (Display *, XvMCSubpicture *,XvImage *,short,short,
72
unsigned short, unsigned short,short,short);
73
typedef Status (*XvMCDestroySubpictureP) (Display *, XvMCSubpicture *);
74
typedef Status (*XvMCSetSubpicturePaletteP) (Display *, XvMCSubpicture *, unsigned char *);
75
typedef Status (*XvMCBlendSubpictureP) (Display *d,XvMCSurface *,XvMCSubpicture *,short,
76
short,unsigned short,unsigned short,short,short,
77
unsigned short,unsigned short);
78
typedef Status (*XvMCBlendSubpicture2P) (Display *,XvMCSurface *,XvMCSurface *,
79
XvMCSubpicture *,short,short,unsigned short,
80
unsigned short,short,short,unsigned short,
82
typedef Status (*XvMCSyncSurfaceP) (Display *, XvMCSurface *);
83
typedef Status (*XvMCFlushSurfaceP) (Display *, XvMCSurface *);
84
typedef Status (*XvMCGetSurfaceStatusP) (Display *, XvMCSurface *, int *);
85
typedef Status (*XvMCRenderSurfaceP) (Display *,XvMCContext *,unsigned int,XvMCSurface *,
86
XvMCSurface *,XvMCSurface *,unsigned int,unsigned int,
87
unsigned int,XvMCMacroBlockArray *,XvMCBlockArray *);
88
typedef Status (*XvMCSyncSubpictureP) (Display *, XvMCSubpicture *);
89
typedef Status (*XvMCFlushSubpictureP) (Display *, XvMCSubpicture *);
90
typedef Status (*XvMCGetSubpictureStatusP) (Display *, XvMCSubpicture *, int *);
91
typedef Status (*XvMCCreateBlocksP) (Display *, XvMCContext *,unsigned int,XvMCBlockArray *);
92
typedef Status (*XvMCDestroyBlocksP) (Display *,XvMCBlockArray *);
93
typedef Status (*XvMCCreateMacroBlocksP) (Display *,XvMCContext *,unsigned int,
94
XvMCMacroBlockArray *);
95
typedef Status (*XvMCDestroyMacroBlocksP) (Display *,XvMCMacroBlockArray *);
96
typedef XvAttribute *(*XvMCQueryAttributesP) (Display *,XvMCContext *,int *);
97
typedef Status (*XvMCSetAttributeP) (Display *,XvMCContext *, Atom, int);
98
typedef Status (*XvMCGetAttributeP) (Display *,XvMCContext *, Atom, int *);
101
* Nonstandard VLD acceleration level:
104
typedef Status (*XvMCBeginSurfaceP) (Display *,XvMCContext *,XvMCSurface *,
105
XvMCSurface *,XvMCSurface *f,const XvMCMpegControl *);
106
typedef Status (*XvMCLoadQMatrixP) (Display *, XvMCContext *,const XvMCQMatrix *);
107
typedef Status (*XvMCPutSliceP)(Display *,XvMCContext *, char *,int);
108
typedef Status (*XvMCPutSlice2P)(Display *,XvMCContext *, char *,int, unsigned);
109
typedef Status (*XvMCGetDRInfoP)(Display *, XvPortID, char **, char **, int *, int *,
114
XvMCQueryExtensionP XvMCQueryExtension;
115
XvMCQueryVersionP XvMCQueryVersion;
116
XvMCListSurfaceTypesP XvMCListSurfaceTypes;
117
XvMCCreateContextP XvMCCreateContext;
118
XvMCDestroyContextP XvMCDestroyContext;
119
XvMCCreateSurfaceP XvMCCreateSurface;
120
XvMCDestroySurfaceP XvMCDestroySurface;
121
XvMCListSubpictureTypesP XvMCListSubpictureTypes;
122
XvMCPutSurfaceP XvMCPutSurface;
123
XvMCHideSurfaceP XvMCHideSurface;
124
XvMCCreateSubpictureP XvMCCreateSubpicture;
125
XvMCClearSubpictureP XvMCClearSubpicture;
126
XvMCCompositeSubpictureP XvMCCompositeSubpicture;
127
XvMCDestroySubpictureP XvMCDestroySubpicture;
128
XvMCSetSubpicturePaletteP XvMCSetSubpicturePalette;
129
XvMCBlendSubpictureP XvMCBlendSubpicture;
130
XvMCBlendSubpicture2P XvMCBlendSubpicture2;
131
XvMCSyncSurfaceP XvMCSyncSurface;
132
XvMCFlushSurfaceP XvMCFlushSurface;
133
XvMCGetSurfaceStatusP XvMCGetSurfaceStatus;
134
XvMCRenderSurfaceP XvMCRenderSurface;
135
XvMCSyncSubpictureP XvMCSyncSubpicture;
136
XvMCFlushSubpictureP XvMCFlushSubpicture;
137
XvMCGetSubpictureStatusP XvMCGetSubpictureStatus;
138
XvMCCreateBlocksP XvMCCreateBlocks;
139
XvMCDestroyBlocksP XvMCDestroyBlocks;
140
XvMCCreateMacroBlocksP XvMCCreateMacroBlocks;
141
XvMCDestroyMacroBlocksP XvMCDestroyMacroBlocks;
142
XvMCQueryAttributesP XvMCQueryAttributes;
143
XvMCSetAttributeP XvMCSetAttribute;
144
XvMCGetAttributeP XvMCGetAttribute;
147
* Nonstandard VLD acceleration level:
150
XvMCBeginSurfaceP XvMCBeginSurface;
151
XvMCLoadQMatrixP XvMCLoadQMatrix;
152
XvMCPutSliceP XvMCPutSlice;
153
XvMCPutSlice2P XvMCPutSlice2;
156
* Driver name function.
159
XvMCGetDRInfoP XvMCGetDRInfo;
166
static XvMCWrapper xW;
167
static int wrapperInit = 0;
168
static int wrapperPreInit = 0;
169
static void *xvhandle;
170
static void *handle2;
174
#define STRS(ARG) STR(ARG)
175
#define STR(ARG) #ARG
177
#define XW_RSYM(base,handle,handle2,pointer, retval) \
179
register char *err; \
180
base.pointer = (pointer##P) dlsym((handle),#pointer); \
181
if ((err = dlerror()) != NULL) { \
183
fprintf(stderr,"%s\n",err); return retval; \
185
base.pointer = (pointer##P) dlsym((handle2),#pointer); \
186
if ((err = dlerror()) != NULL) { \
187
fprintf(stderr,"%s\n",err); return retval; \
192
#define XW_RSYM2(base,handle,handle2,pointer) \
193
base.pointer = (pointer##P) dlsym((handle),#pointer); \
194
if (dlerror() != NULL) { \
195
base.pointer = (pointer##P) dlsym((handle2),#pointer); \
196
if (dlerror() != NULL) return; \
201
* Try to dlopen a shared library, versionless first.
205
static void *dlopenversion(const char *lib, const char *version, int flag)
213
curLen = strlen(lib) + (verLen = strlen(version)) + 1;
214
curName = (char *) malloc(curLen * sizeof(char));
215
strncpy( curName, lib, curLen);
217
if (NULL != (tail = strstr(version+1,"."))) {
218
strncat( curName, version, tail - version);
220
strncat( curName, version, verLen);
223
ret = dlopen(curName, flag);
228
static int preInitW(Display *dpy)
232
* Resolve functions that are not hw driver specific.
238
xW.preInitialised = 0;
240
xvhandle = dlopenversion("libXv.so", XV_SOVERSION, RTLD_LAZY | RTLD_GLOBAL);
242
fprintf(stderr,"XvMCWrapper: Warning! Could not open shared "
243
"library \"libXv.so" XV_SOVERSION "\"\nThis may cause relocation "
244
"errors later.\nError was: \"%s\".\n",dlerror());
246
handle2 = dlopenversion("libXvMC.so", XVMC_SOVERSION, RTLD_LAZY | RTLD_GLOBAL);
248
fprintf(stderr,"XvMCWrapper: Could not load XvMC "
249
"library \"libXvMC.so" XVMC_SOVERSION "\". Failing\n");
250
fprintf(stderr,"%s\n",dlerror());
253
XW_RSYM(xW, handle2, handleZ, XvMCQueryExtension, 1);
254
XW_RSYM(xW, handle2, handleZ, XvMCQueryVersion, 1);
255
xW.preInitialised = 1;
259
static void initW(Display *dpy, XvPortID port)
261
char nameBuffer[BUFLEN];
264
char *clientName = NULL;
268
int major,minor,patchLevel,isLocal;
275
if (preInitW( dpy )) return;
278
* Will the DDX tell us the client driver name?
281
xW.XvMCGetDRInfo = (XvMCGetDRInfoP)
282
dlsym(handle2,"XvMCGetDRInfo");
284
if ((err = dlerror()) == NULL) {
285
if (0 == xW.XvMCGetDRInfo( dpy, port, &clientName, &busID, &major,
286
&minor,&patchLevel, &isLocal)) {
287
nameLen = strlen(clientName);
290
fprintf(stderr,"XvMCWrapper: X server is not local. Cannot run XvMC.\n");
299
if (clientName && (nameLen < BUFLEN-7) && (nameLen > 0)) {
301
strncpy(nameBuffer,"lib",BUFLEN-1);
302
strncpy(nameBuffer+3, clientName, BUFLEN-4);
303
strncpy(nameBuffer + nameLen, ".so", BUFLEN-nameLen-1);
304
nameBuffer[BUFLEN-1] = 0;
306
handle = dlopenversion(nameBuffer, XVMC_SOVERSION,RTLD_LAZY);
309
* No. Try to obtain it from the config file.
312
if (clientName) XFree(clientName);
314
configFile = fopen(STRS(XVMC_CONFIGDIR) "/XvMCConfig","r");
319
if (0 == configFile) {
320
fprintf(stderr,"XvMCWrapper: Could not open config file \"%s\".\n",
321
STRS(XVMC_CONFIGDIR) "/XvMCConfig");
322
perror("XvMCWrapper");
326
if (0 == fgets(nameBuffer, BUFLEN, configFile)) {
328
fprintf(stderr,"XvMCWrapper: Could not read XvMC library name.\n");
329
perror("XvMCWrapper");
334
if ((tmp = strlen(nameBuffer)) == 0) {
335
fprintf(stderr,"XvMCWrapper: Zero length XvMC library name.\n");
336
fprintf(stderr,"%s\n",dlerror());
341
* Skip trailing newlines and garbage.
344
while (iscntrl(nameBuffer[tmp-1])) {
345
nameBuffer[tmp-1] = 0;
347
fprintf(stderr,"XvMCWrapper: Zero length XvMC library name.\n");
351
handle = dlopen(nameBuffer,RTLD_LAZY);
354
fprintf(stderr,"XvMCWrapper: Could not load hardware specific XvMC "
355
"library \"%s\".\n",nameBuffer);
356
fprintf(stderr,"%s\n",dlerror());
360
XW_RSYM(xW, handle, handle2, XvMCListSurfaceTypes,);
361
XW_RSYM(xW, handle, handle2, XvMCCreateContext,);
362
XW_RSYM(xW, handle, handle2, XvMCDestroyContext,);
363
XW_RSYM(xW, handle, handle2, XvMCCreateSurface,);
364
XW_RSYM(xW, handle, handle2, XvMCDestroySurface,);
365
XW_RSYM(xW, handle, handle2, XvMCListSubpictureTypes,);
366
XW_RSYM(xW, handle, handle2, XvMCHideSurface,);
367
XW_RSYM(xW, handle, handle2, XvMCCreateSubpicture,);
368
XW_RSYM(xW, handle, handle2, XvMCClearSubpicture,);
369
XW_RSYM(xW, handle, handle2, XvMCCompositeSubpicture,);
370
XW_RSYM(xW, handle, handle2, XvMCDestroySubpicture,);
371
XW_RSYM(xW, handle, handle2, XvMCSetSubpicturePalette,);
372
XW_RSYM(xW, handle, handle2, XvMCBlendSubpicture,);
373
XW_RSYM(xW, handle, handle2, XvMCBlendSubpicture2,);
374
XW_RSYM(xW, handle, handle2, XvMCPutSurface,);
375
XW_RSYM(xW, handle, handle2, XvMCSyncSurface,);
376
XW_RSYM(xW, handle, handle2, XvMCFlushSurface,);
377
XW_RSYM(xW, handle, handle2, XvMCGetSurfaceStatus,);
378
XW_RSYM(xW, handle, handle2, XvMCRenderSurface,);
379
XW_RSYM(xW, handle, handle2, XvMCSyncSubpicture,);
380
XW_RSYM(xW, handle, handle2, XvMCFlushSubpicture,);
381
XW_RSYM(xW, handle, handle2, XvMCGetSubpictureStatus,);
382
XW_RSYM(xW, handle, handle2, XvMCCreateBlocks,);
383
XW_RSYM(xW, handle, handle2, XvMCDestroyBlocks,);
384
XW_RSYM(xW, handle, handle2, XvMCCreateMacroBlocks,);
385
XW_RSYM(xW, handle, handle2, XvMCDestroyMacroBlocks,);
386
XW_RSYM(xW, handle, handle2, XvMCQueryAttributes,);
387
XW_RSYM(xW, handle, handle2, XvMCSetAttribute,);
388
XW_RSYM(xW, handle, handle2, XvMCGetAttribute,);
390
XW_RSYM2(xW, handle, handle2, XvMCBeginSurface);
391
XW_RSYM(xW, handle, handle2, XvMCLoadQMatrix,);
392
XW_RSYM(xW, handle, handle2, XvMCPutSlice,);
393
XW_RSYM(xW, handle, handle2, XvMCPutSlice2,);
398
Bool XvMCQueryExtension (Display *display, int *eventBase, int *errBase)
400
if (!wrapperPreInit) preInitW( display );
401
if (!xW.preInitialised) return 0;
402
return (*xW.XvMCQueryExtension)(display, eventBase, errBase);
405
Status XvMCQueryVersion (Display *display, int *major_versionp,
408
if (!wrapperPreInit) preInitW( display );
409
if (!xW.preInitialised) return 0;
410
return (*xW.XvMCQueryVersion)(display, major_versionp, minor_versionp);
414
XvMCSurfaceInfo * XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num)
416
if (!wrapperInit) initW( dpy, port);
417
if (!xW.initialised) return NULL;
418
return (*xW.XvMCListSurfaceTypes)(dpy, port, num);
421
Status XvMCCreateContext (
428
XvMCContext * context
431
if (!wrapperInit) initW(display, port);
432
if (!xW.initialised) return BadValue;
433
return (*xW.XvMCCreateContext)(display, port, surface_type_id,
434
width, height, flags, context);
437
Status XvMCDestroyContext (Display *display, XvMCContext * context)
439
if (!xW.initialised) return BadValue;
440
return (*xW.XvMCDestroyContext)(display, context);
446
XvMCContext * context,
447
XvMCSurface * surface
450
if (!xW.initialised) return BadValue;
451
return (*xW.XvMCCreateSurface)(display, context, surface);
454
Status XvMCDestroySurface(Display *display, XvMCSurface *surface)
456
if (!xW.initialised) return BadValue;
457
return (*xW.XvMCDestroySurface)(display, surface);
461
XvImageFormatValues * XvMCListSubpictureTypes (
468
if (!xW.initialised) return NULL;
469
return (*xW.XvMCListSubpictureTypes)(display, port, surface_type_id,
477
XvMCSurface *surface,
485
unsigned short destw,
486
unsigned short desth,
490
if (!xW.initialised) return BadValue;
491
return (*xW.XvMCPutSurface)(display, surface, draw, srcx, srcy, srcw, srch,
492
destx, desty, destw, desth, flags);
495
Status XvMCHideSurface(Display *display, XvMCSurface *surface)
497
if (!xW.initialised) return BadValue;
498
return (*xW.XvMCHideSurface)(display, surface);
503
XvMCCreateSubpicture (
505
XvMCContext *context,
506
XvMCSubpicture *subpicture,
507
unsigned short width,
508
unsigned short height,
512
if (!xW.initialised) return BadValue;
513
return (*xW.XvMCCreateSubpicture)(display, context, subpicture, width, height,
519
XvMCClearSubpicture (
521
XvMCSubpicture *subpicture,
524
unsigned short width,
525
unsigned short height,
529
if (!xW.initialised) return BadValue;
530
return (*xW.XvMCClearSubpicture)(display, subpicture, x, y, width, height, color);
535
XvMCCompositeSubpicture (
537
XvMCSubpicture *subpicture,
541
unsigned short width,
542
unsigned short height,
547
if (!xW.initialised) return BadValue;
548
return (*xW.XvMCCompositeSubpicture)(display, subpicture, image, srcx, srcy,
549
width, height, dstx, dsty);
553
XvMCDestroySubpicture (Display *display, XvMCSubpicture *subpicture)
555
if (!xW.initialised) return BadValue;
556
return (*xW.XvMCDestroySubpicture)(display, subpicture);
560
XvMCSetSubpicturePalette (
562
XvMCSubpicture *subpicture,
563
unsigned char *palette
566
if (!xW.initialised) return BadValue;
567
return (*xW.XvMCSetSubpicturePalette)(display, subpicture, palette);
572
XvMCBlendSubpicture (
574
XvMCSurface *target_surface,
575
XvMCSubpicture *subpicture,
582
unsigned short surfw,
586
if (!xW.initialised) return BadValue;
587
return (*xW.XvMCBlendSubpicture)(display, target_surface, subpicture,
588
subx, suby, subw, subh, surfx, surfy,
593
XvMCBlendSubpicture2 (
595
XvMCSurface *source_surface,
596
XvMCSurface *target_surface,
597
XvMCSubpicture *subpicture,
604
unsigned short surfw,
608
if (!xW.initialised) return BadValue;
609
return (*xW.XvMCBlendSubpicture2)(display, source_surface, target_surface, subpicture,
610
subx, suby, subw, subh, surfx, surfy, surfw, surfh);
614
Status XvMCSyncSurface (Display *display, XvMCSurface *surface)
616
if (!xW.initialised) return BadValue;
617
return (*xW.XvMCSyncSurface)(display, surface);
620
Status XvMCFlushSurface (Display *display, XvMCSurface *surface)
622
if (!xW.initialised) return BadValue;
623
return (*xW.XvMCFlushSurface)(display, surface);
626
Status XvMCGetSurfaceStatus (Display *display, XvMCSurface *surface, int *stat)
628
if (!xW.initialised) return BadValue;
629
return (*xW.XvMCGetSurfaceStatus)(display, surface, stat);
632
Status XvMCRenderSurface (
634
XvMCContext *context,
635
unsigned int picture_structure,
636
XvMCSurface *target_surface,
637
XvMCSurface *past_surface,
638
XvMCSurface *future_surface,
640
unsigned int num_macroblocks,
641
unsigned int first_macroblock,
642
XvMCMacroBlockArray *macroblock_array,
643
XvMCBlockArray *blocks
646
if (!xW.initialised) return BadValue;
647
return (*xW.XvMCRenderSurface)(display, context, picture_structure, target_surface,
648
past_surface, future_surface, flags, num_macroblocks,
649
first_macroblock, macroblock_array, blocks);
652
Status XvMCSyncSubpicture (Display *display, XvMCSubpicture *subpicture)
654
if (!xW.initialised) return BadValue;
655
return (*xW.XvMCSyncSubpicture)(display, subpicture);
658
Status XvMCFlushSubpicture (Display *display, XvMCSubpicture *subpicture)
660
if (!xW.initialised) return BadValue;
661
return (*xW.XvMCFlushSubpicture)(display, subpicture);
664
XvMCGetSubpictureStatus (Display *display, XvMCSubpicture *subpic, int *stat)
666
if (!xW.initialised) return BadValue;
667
return (*xW.XvMCGetSubpictureStatus)(display, subpic, stat);
670
Status XvMCCreateBlocks (
672
XvMCContext *context,
673
unsigned int num_blocks,
674
XvMCBlockArray *block
677
if (!xW.initialised) return BadValue;
678
return (*xW.XvMCCreateBlocks)(display, context, num_blocks, block);
682
Status XvMCDestroyBlocks (Display *display,XvMCBlockArray *block)
684
if (!xW.initialised) return BadValue;
685
return (*xW.XvMCDestroyBlocks)(display, block);
688
Status XvMCCreateMacroBlocks (
690
XvMCContext *context,
691
unsigned int num_blocks,
692
XvMCMacroBlockArray *blocks
695
if (!xW.initialised) return BadValue;
696
return (*xW.XvMCCreateMacroBlocks)(display, context, num_blocks, blocks);
700
Status XvMCDestroyMacroBlocks (
702
XvMCMacroBlockArray *block
705
if (!xW.initialised) return BadValue;
706
return (*xW.XvMCDestroyMacroBlocks)(display, block);
711
XvMCQueryAttributes (
713
XvMCContext *context,
717
if (!xW.initialised) return NULL;
718
return (*xW.XvMCQueryAttributes)(display, context, number);
725
XvMCContext *context,
730
if (!xW.initialised) return BadValue;
731
return (*xW.XvMCSetAttribute)(display, context, attribute, value);
738
XvMCContext *context,
743
if (!xW.initialised) return BadValue;
744
return (*xW.XvMCGetAttribute)(display, context, attribute, value);
748
Status XvMCBeginSurface(Display *display,
749
XvMCContext *context,
750
XvMCSurface *target_surface,
751
XvMCSurface *past_surface,
752
XvMCSurface *future_surface,
753
const XvMCMpegControl *control)
755
if (!xW.vldextension) return BadValue;
756
return (*xW.XvMCBeginSurface)(display, context, target_surface, past_surface, future_surface,
760
Status XvMCLoadQMatrix(Display *display, XvMCContext *context,
761
const XvMCQMatrix *qmx)
763
if (!xW.vldextension) return BadValue;
764
return (*xW.XvMCLoadQMatrix)(display, context, qmx);
767
Status XvMCPutSlice(Display *display,XvMCContext *context,
768
char *slice, int nBytes)
770
if (!xW.vldextension) return BadValue;
771
return (*xW.XvMCPutSlice)(display, context, slice, nBytes);
774
Status XvMCPutSlice2(Display *display,XvMCContext *context,
775
char *slice, int nBytes, int sliceCode)
777
if (!xW.vldextension) return BadValue;
778
return (*xW.XvMCPutSlice2)(display, context, slice, nBytes, sliceCode);