Added possibility to use XVideo.

This commit is contained in:
Lionel Ulmer 2000-09-06 19:46:59 +00:00 committed by Alexandre Julliard
parent eef99e0c93
commit 3d2f32dcfb
9 changed files with 655 additions and 169 deletions

424
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -227,6 +227,20 @@ then
],
AC_MSG_WARN([XFree86 VMODE extension not found!!])
)
dnl *** Check for XVideo extension supporting XvImages
AC_CHECK_HEADERS(X11/extensions/Xvlib.h,
[ dnl *** If X11/extensions/Xvlib.h exists...
AC_CHECK_LIB(Xv, XvShmCreateImage,
[ AC_DEFINE(HAVE_XVIDEO)
X_PRE_LIBS="$X_PRE_LIBS -lXv"
],,
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS
)
],
AC_MSG_WARN([XVideo extension not found !!])
)
]
) dnl *** End of X11/Xlib.h check

View File

@ -113,3 +113,6 @@
/* Define if the OpenGL headers define extension typedefs */
#undef HAVE_GLEXT_PROTOTYPES
/* Define if the X libraries support XVideo */
#undef HAVE_XVIDEO

View File

@ -149,6 +149,9 @@
/* Define if the OpenGL headers define extension typedefs */
#undef HAVE_GLEXT_PROTOTYPES
/* Define if the X libraries support XVideo */
#undef HAVE_XVIDEO
/* The number of bytes in a long long. */
#undef SIZEOF_LONG_LONG
@ -260,6 +263,9 @@
/* Define if you have the <X11/extensions/XShm.h> header file. */
#undef HAVE_X11_EXTENSIONS_XSHM_H
/* Define if you have the <X11/extensions/Xvlib.h> header file. */
#undef HAVE_X11_EXTENSIONS_XVLIB_H
/* Define if you have the <X11/extensions/shape.h> header file. */
#undef HAVE_X11_EXTENSIONS_SHAPE_H

47
include/ts_xvideo.h Normal file
View File

@ -0,0 +1,47 @@
/*
* Thread safe wrappers around xvideo calls.
* Always include this file instead of <X11/xvideo.h>.
* This file was generated automatically by tools/make_X11wrappers
*
* Copyright 1998 Kristian Nielsen
*/
#ifndef __WINE_TS_XVIDEO_H
#define __WINE_TS_XVIDEO_H
#include "config.h"
#ifdef HAVE_XVIDEO
#include <X11/Xlib.h>
#include <X11/extensions/Xv.h>
#include <X11/extensions/XShm.h>
#include <X11/extensions/Xvlib.h>
extern int TSXvQueryExtension(Display*, unsigned int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*);
extern int TSXvQueryAdaptors(Display*, Window, unsigned int*, XvAdaptorInfo**);
extern int TSXvQueryEncodings(Display*, XvPortID, unsigned int*, XvEncodingInfo**);
extern int TSXvPutVideo(Display*, XvPortID, Drawable, GC, int, int, unsigned int, unsigned int, int, int, unsigned int, unsigned int);
extern int TSXvPutStill(Display*, XvPortID, Drawable, GC, int, int, unsigned int, unsigned int, int, int, unsigned int, unsigned int);
extern int TSXvGetVideo(Display*, XvPortID, Drawable, GC, int, int, unsigned int, unsigned int, int, int, unsigned int, unsigned int);
extern int TSXvGetStill(Display*, XvPortID, Drawable, GC, int, int, unsigned int, unsigned int, int, int, unsigned int, unsigned int);
extern int TSXvStopVideo(Display*, XvPortID, Drawable);
extern int TSXvGrabPort(Display*, XvPortID, Time);
extern int TSXvUngrabPort(Display*, XvPortID, Time);
extern int TSXvSelectVideoNotify(Display*, Drawable, Bool);
extern int TSXvSelectPortNotify(Display*, XvPortID, Bool);
extern int TSXvSetPortAttribute(Display*, XvPortID, Atom, int);
extern int TSXvGetPortAttribute(Display*, XvPortID, Atom, int*);
extern int TSXvQueryBestSize(Display*, XvPortID, Bool, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int*, unsigned int*);
extern XvAttribute* TSXvQueryPortAttributes(Display*, XvPortID, int*);
extern void TSXvFreeAdaptorInfo(XvAdaptorInfo*);
extern void TSXvFreeEncodingInfo(XvEncodingInfo*);
extern XvImageFormatValues * TSXvListImageFormats(Display*, XvPortID, int*);
extern XvImage * TSXvCreateImage(Display*, XvPortID, int, char*, int, int);
extern int TSXvPutImage(Display*, XvPortID, Drawable, GC, XvImage*, int, int, unsigned int, unsigned int, int, int, unsigned int, unsigned int);
extern int TSXvShmPutImage(Display*, XvPortID, Drawable, GC, XvImage*, int, int, unsigned int, unsigned int, int, int, unsigned int, unsigned int, Bool);
extern XvImage * TSXvShmCreateImage(Display*, XvPortID, int, char*, int, int, XShmSegmentInfo*);
#endif /* defined(HAVE_XVIDEO) */
#endif /* __WINE_TS_XVIDEO_H */

View File

@ -17,7 +17,7 @@
$X11_include_dir = "/usr/X11/include";
$outdir = "tsx11";
$wantfile = "$outdir/X11_calls";
@dolist = ("Xlib", "Xresource", "Xutil", "xpm", "XShm", "xf86dga", "xf86dga2", "xf86vmode", "shape");
@dolist = ("Xlib", "Xresource", "Xutil", "xpm", "XShm", "xf86dga", "xf86dga2", "xf86vmode", "shape", "xvideo");
# First read list of wanted function names.
@ -86,7 +86,13 @@ foreach $name (@dolist) {
$post_file = "#endif /* defined(HAVE_LIBXSHAPE) */\n";
$inc_name = "shape";
}
if($name eq "xvideo") {
$x11_incl = "#include <X11/Xlib.h>\n#include <X11/extensions/Xv.h>\n#include <X11/extensions/XShm.h>\n";
$extensions_dir = "extensions/";
$pre_file = "#ifdef HAVE_XVIDEO\n";
$post_file = "#endif /* defined(HAVE_XVIDEO) */\n";
$inc_name = "Xvlib";
}
print OUTH <<END;
@ -227,6 +233,30 @@ END
output_fn_short("Bool", "XDGASetClientVersion", "Display*");
output_fn_short("void", "XDGAChangePixmapMode", "Display*" ,"int", "int*", "int*", "int");
output_fn_short("void", "XDGAKeyEventToXKeyEvent", "XDGAKeyEvent*" ,"XKeyEvent*");
} elsif ($name eq "xvideo") {
output_fn_short("int", "XvQueryExtension", "Display*", "unsigned int*", "unsigned int*", "unsigned int*", "unsigned int*", "unsigned int*");
output_fn_short("int", "XvQueryAdaptors", "Display*", "Window", "unsigned int*", "XvAdaptorInfo**");
output_fn_short("int", "XvQueryEncodings", "Display*", "XvPortID", "unsigned int*", "XvEncodingInfo**");
output_fn_short("int", "XvPutVideo", "Display*", "XvPortID", "Drawable", "GC", "int", "int", "unsigned int", "unsigned int", "int", "int", "unsigned int", "unsigned int");
output_fn_short("int", "XvPutStill", "Display*", "XvPortID", "Drawable", "GC", "int", "int", "unsigned int", "unsigned int", "int", "int", "unsigned int", "unsigned int");
output_fn_short("int", "XvGetVideo", "Display*", "XvPortID", "Drawable", "GC", "int", "int", "unsigned int", "unsigned int", "int", "int", "unsigned int", "unsigned int");
output_fn_short("int", "XvGetStill", "Display*", "XvPortID", "Drawable", "GC", "int", "int", "unsigned int", "unsigned int", "int", "int", "unsigned int", "unsigned int");
output_fn_short("int", "XvStopVideo", "Display*", "XvPortID", "Drawable");
output_fn_short("int", "XvGrabPort", "Display*", "XvPortID", "Time");
output_fn_short("int", "XvUngrabPort", "Display*", "XvPortID", "Time");
output_fn_short("int", "XvSelectVideoNotify", "Display*", "Drawable", "Bool");
output_fn_short("int", "XvSelectPortNotify", "Display*", "XvPortID", "Bool");
output_fn_short("int", "XvSetPortAttribute", "Display*", "XvPortID", "Atom", "int");
output_fn_short("int", "XvGetPortAttribute", "Display*", "XvPortID", "Atom", "int*");
output_fn_short("int", "XvQueryBestSize", "Display*", "XvPortID", "Bool", "unsigned int", "unsigned int", "unsigned int", "unsigned int", "unsigned int*", "unsigned int*");
output_fn_short("XvAttribute*", "XvQueryPortAttributes", "Display*", "XvPortID", "int*");
output_fn_short("void", "XvFreeAdaptorInfo", "XvAdaptorInfo*");
output_fn_short("void", "XvFreeEncodingInfo", "XvEncodingInfo*");
output_fn_short("XvImageFormatValues *", "XvListImageFormats", "Display*", "XvPortID", "int*");
output_fn_short("XvImage *", "XvCreateImage", "Display*", "XvPortID", "int", "char*", "int", "int");
output_fn_short("int", "XvPutImage", "Display*", "XvPortID", "Drawable", "GC", "XvImage*", "int", "int", "unsigned int", "unsigned int", "int", "int", "unsigned int", "unsigned int");
output_fn_short("int", "XvShmPutImage", "Display*", "XvPortID", "Drawable", "GC", "XvImage*", "int", "int", "unsigned int", "unsigned int", "int", "int", "unsigned int", "unsigned int", "Bool");
output_fn_short("XvImage *", "XvShmCreateImage", "Display*", "XvPortID", "int", "char*", "int", "int", "XShmSegmentInfo*");
} elsif($name eq "xf86vmode") {
output_fn("XF86VidModeQueryVersion",Bool,
"Display*,int*,int*",

View File

@ -12,6 +12,7 @@ C_SRCS = \
ts_xshm.c \
ts_xlib.c \
ts_xresource.c \
ts_xvideo.c \
ts_xutil.c \
ts_shape.c \
ts_xpm.c

View File

@ -227,3 +227,26 @@ XDGASync
XDGASetClientVersion
XDGAChangePixmapMode
XDGAKeyEventToXKeyEvent
XvQueryExtension
XvQueryAdaptors
XvQueryEncodings
XvPutVideo
XvPutStill
XvGetVideo
XvGetStill
XvStopVideo
XvGrabPort
XvUngrabPort
XvSelectVideoNotify
XvSelectPortNotify
XvSetPortAttribute
XvGetPortAttribute
XvQueryBestSize
XvQueryPortAttributes
XvFreeAdaptorInfo
XvFreeEncodingInfo
XvListImageFormats
XvCreateImage
XvPutImage
XvShmPutImage
XvShmCreateImage

272
tsx11/ts_xvideo.c Normal file
View File

@ -0,0 +1,272 @@
/*
* Thread safe wrappers around xvideo calls.
* This file was generated automatically by tools/make_X11wrappers
* DO NOT EDIT!
*/
#include "config.h"
#ifdef HAVE_XVIDEO
#include <X11/Xlib.h>
#include <X11/extensions/Xv.h>
#include <X11/extensions/XShm.h>
#include <X11/extensions/Xvlib.h>
#include "debugtools.h"
#include "ts_xvideo.h"
#include "x11drv.h"
DEFAULT_DEBUG_CHANNEL(x11)
int TSXvQueryExtension(Display* a0, unsigned int* a1, unsigned int* a2, unsigned int* a3, unsigned int* a4, unsigned int* a5)
{
int r;
TRACE("Call XvQueryExtension\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvQueryExtension( a0, a1, a2, a3, a4, a5);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvQueryExtension\n");
return r;
}
int TSXvQueryAdaptors(Display* a0, Window a1, unsigned int* a2, XvAdaptorInfo** a3)
{
int r;
TRACE("Call XvQueryAdaptors\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvQueryAdaptors( a0, a1, a2, a3);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvQueryAdaptors\n");
return r;
}
int TSXvQueryEncodings(Display* a0, XvPortID a1, unsigned int* a2, XvEncodingInfo** a3)
{
int r;
TRACE("Call XvQueryEncodings\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvQueryEncodings( a0, a1, a2, a3);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvQueryEncodings\n");
return r;
}
int TSXvPutVideo(Display* a0, XvPortID a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9, unsigned int a10, unsigned int a11)
{
int r;
TRACE("Call XvPutVideo\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvPutVideo( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvPutVideo\n");
return r;
}
int TSXvPutStill(Display* a0, XvPortID a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9, unsigned int a10, unsigned int a11)
{
int r;
TRACE("Call XvPutStill\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvPutStill( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvPutStill\n");
return r;
}
int TSXvGetVideo(Display* a0, XvPortID a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9, unsigned int a10, unsigned int a11)
{
int r;
TRACE("Call XvGetVideo\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvGetVideo( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvGetVideo\n");
return r;
}
int TSXvGetStill(Display* a0, XvPortID a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9, unsigned int a10, unsigned int a11)
{
int r;
TRACE("Call XvGetStill\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvGetStill( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvGetStill\n");
return r;
}
int TSXvStopVideo(Display* a0, XvPortID a1, Drawable a2)
{
int r;
TRACE("Call XvStopVideo\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvStopVideo( a0, a1, a2);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvStopVideo\n");
return r;
}
int TSXvGrabPort(Display* a0, XvPortID a1, Time a2)
{
int r;
TRACE("Call XvGrabPort\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvGrabPort( a0, a1, a2);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvGrabPort\n");
return r;
}
int TSXvUngrabPort(Display* a0, XvPortID a1, Time a2)
{
int r;
TRACE("Call XvUngrabPort\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvUngrabPort( a0, a1, a2);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvUngrabPort\n");
return r;
}
int TSXvSelectVideoNotify(Display* a0, Drawable a1, Bool a2)
{
int r;
TRACE("Call XvSelectVideoNotify\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvSelectVideoNotify( a0, a1, a2);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvSelectVideoNotify\n");
return r;
}
int TSXvSelectPortNotify(Display* a0, XvPortID a1, Bool a2)
{
int r;
TRACE("Call XvSelectPortNotify\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvSelectPortNotify( a0, a1, a2);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvSelectPortNotify\n");
return r;
}
int TSXvSetPortAttribute(Display* a0, XvPortID a1, Atom a2, int a3)
{
int r;
TRACE("Call XvSetPortAttribute\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvSetPortAttribute( a0, a1, a2, a3);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvSetPortAttribute\n");
return r;
}
int TSXvGetPortAttribute(Display* a0, XvPortID a1, Atom a2, int* a3)
{
int r;
TRACE("Call XvGetPortAttribute\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvGetPortAttribute( a0, a1, a2, a3);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvGetPortAttribute\n");
return r;
}
int TSXvQueryBestSize(Display* a0, XvPortID a1, Bool a2, unsigned int a3, unsigned int a4, unsigned int a5, unsigned int a6, unsigned int* a7, unsigned int* a8)
{
int r;
TRACE("Call XvQueryBestSize\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvQueryBestSize( a0, a1, a2, a3, a4, a5, a6, a7, a8);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvQueryBestSize\n");
return r;
}
XvAttribute* TSXvQueryPortAttributes(Display* a0, XvPortID a1, int* a2)
{
XvAttribute* r;
TRACE("Call XvQueryPortAttributes\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvQueryPortAttributes( a0, a1, a2);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvQueryPortAttributes\n");
return r;
}
void TSXvFreeAdaptorInfo(XvAdaptorInfo* a0)
{
TRACE("Call XvFreeAdaptorInfo\n");
EnterCriticalSection( &X11DRV_CritSection );
XvFreeAdaptorInfo( a0);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvFreeAdaptorInfo\n");
}
void TSXvFreeEncodingInfo(XvEncodingInfo* a0)
{
TRACE("Call XvFreeEncodingInfo\n");
EnterCriticalSection( &X11DRV_CritSection );
XvFreeEncodingInfo( a0);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvFreeEncodingInfo\n");
}
XvImageFormatValues * TSXvListImageFormats(Display* a0, XvPortID a1, int* a2)
{
XvImageFormatValues * r;
TRACE("Call XvListImageFormats\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvListImageFormats( a0, a1, a2);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvListImageFormats\n");
return r;
}
XvImage * TSXvCreateImage(Display* a0, XvPortID a1, int a2, char* a3, int a4, int a5)
{
XvImage * r;
TRACE("Call XvCreateImage\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvCreateImage( a0, a1, a2, a3, a4, a5);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvCreateImage\n");
return r;
}
int TSXvPutImage(Display* a0, XvPortID a1, Drawable a2, GC a3, XvImage* a4, int a5, int a6, unsigned int a7, unsigned int a8, int a9, int a10, unsigned int a11, unsigned int a12)
{
int r;
TRACE("Call XvPutImage\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvPutImage( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvPutImage\n");
return r;
}
int TSXvShmPutImage(Display* a0, XvPortID a1, Drawable a2, GC a3, XvImage* a4, int a5, int a6, unsigned int a7, unsigned int a8, int a9, int a10, unsigned int a11, unsigned int a12, Bool a13)
{
int r;
TRACE("Call XvShmPutImage\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvShmPutImage( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvShmPutImage\n");
return r;
}
XvImage * TSXvShmCreateImage(Display* a0, XvPortID a1, int a2, char* a3, int a4, int a5, XShmSegmentInfo* a6)
{
XvImage * r;
TRACE("Call XvShmCreateImage\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XvShmCreateImage( a0, a1, a2, a3, a4, a5, a6);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XvShmCreateImage\n");
return r;
}
#endif /* defined(HAVE_XVIDEO) */