Commit 7a11b817 authored by Tomas Carnecky's avatar Tomas Carnecky Committed by Keith Packard

Move Xv and XvMC from extmod to built-in

Always build these extensions into the core server, rather than letting
them languish in extmod.
Signed-off-by: default avatarTomas Carnecky <tom@dbservice.com>
Reviewed-by: default avatarDaniel Stone <daniel@fooishbar.org>
Reviewed-by: default avatarJamey Sharp <jamey@minilop.net>
Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 7d859bd8
......@@ -46,7 +46,7 @@ endif
# XVideo extension
XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h
if XV
MODULE_SRCS += $(XV_SRCS)
BUILTIN_SRCS += $(XV_SRCS)
endif
# XResource extension: lets clients get data about per-client resource usage
......
......@@ -55,7 +55,6 @@ SOFTWARE.
#include "scrnintstr.h"
#include <X11/extensions/Xvproto.h>
#ifndef XorgLoader
extern _X_EXPORT unsigned long XvExtensionGeneration;
extern _X_EXPORT unsigned long XvScreenGeneration;
extern _X_EXPORT unsigned long XvResourceGeneration;
......@@ -70,7 +69,10 @@ extern _X_EXPORT RESTYPE XvRTGrab;
extern _X_EXPORT RESTYPE XvRTVideoNotify;
extern _X_EXPORT RESTYPE XvRTVideoNotifyList;
extern _X_EXPORT RESTYPE XvRTPortNotify;
#endif
extern DevPrivateKey (*XvGetScreenKeyProc)(void);
extern unsigned long (*XvGetRTPortProc)(void);
extern int (*XvScreenInitProc)(ScreenPtr);
typedef struct {
int numerator;
......@@ -231,7 +233,6 @@ typedef struct {
#define _XvBadPort (XvBadPort+XvErrorBase)
#define _XvBadEncoding (XvBadEncoding+XvErrorBase)
#ifndef XorgLoader
extern _X_EXPORT int ProcXvDispatch(ClientPtr);
extern _X_EXPORT int SProcXvDispatch(ClientPtr);
......@@ -267,6 +268,4 @@ extern _X_EXPORT int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr);
extern _X_EXPORT int XvdiMatchPort(XvPortPtr, DrawablePtr);
extern _X_EXPORT int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *);
extern _X_EXPORT int XvdiUngrabPort(ClientPtr, XvPortPtr, Time);
#endif /* XorgLoader */
#endif /* XVDIX_H */
......@@ -194,6 +194,18 @@ XvExtensionInit(void)
}
}
DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL;
unsigned long (*XvGetRTPortProc)(void) = NULL;
int (*XvScreenInitProc)(ScreenPtr) = NULL;
void
XvRegister(void)
{
XvScreenInitProc = XvScreenInit;
XvGetScreenKeyProc = XvGetScreenKey;
XvGetRTPortProc = XvGetRTPort;
}
static Bool
CreateResourceTypes(void)
{
......
......@@ -46,6 +46,8 @@ static RESTYPE XvMCRTContext;
static RESTYPE XvMCRTSurface;
static RESTYPE XvMCRTSubpicture;
int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr) = NULL;
typedef struct {
int num_adaptors;
XvMCAdaptorPtr adaptors;
......@@ -762,6 +764,12 @@ XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt)
return Success;
}
void
XvMCRegister(void)
{
XvMCScreenInitProc = XvMCScreenInit;
}
XvImagePtr
XvMCFindXvImage(XvPortPtr pPort, CARD32 id)
{
......
......@@ -84,7 +84,8 @@ typedef struct {
XvMCDestroySubpictureProcPtr DestroySubpicture;
} XvMCAdaptorRec, *XvMCAdaptorPtr;
#ifndef XorgLoader
extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr);
extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen,
int num, XvMCAdaptorPtr adapt);
......@@ -93,6 +94,5 @@ extern _X_EXPORT XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name,
char *busID, int major, int minor,
int patchLevel);
#endif
#endif /* _XVMC_H */
......@@ -107,10 +107,6 @@ static DevPrivateKey KdXvScreenKey;
static unsigned long KdXVGeneration = 0;
static unsigned long PortResource = 0;
DevPrivateKey (*XvGetScreenKeyProc) (void) = XvGetScreenKey;
unsigned long (*XvGetRTPortProc) (void) = XvGetRTPort;
int (*XvScreenInitProc) (ScreenPtr) = XvScreenInit;
#define GET_XV_SCREEN(pScreen) ((XvScreenPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, KdXvScreenKey))
......
......@@ -117,10 +117,6 @@ DevPrivateKey XF86XvScreenKey;
static unsigned long PortResource = 0;
DevPrivateKey (*XvGetScreenKeyProc) (void) = NULL;
unsigned long (*XvGetRTPortProc) (void) = NULL;
int (*XvScreenInitProc) (ScreenPtr) = NULL;
#define GET_XV_SCREEN(pScreen) \
((XvScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XF86XvScreenKey))
......
......@@ -263,8 +263,4 @@ extern _X_EXPORT void
xf86XVCopyPacked(const void *src,
void *dst, int srcPitch, int dstPitch, int h, int w);
extern _X_EXPORT DevPrivateKey (*XvGetScreenKeyProc) (void);
extern _X_EXPORT unsigned long (*XvGetRTPortProc) (void);
extern _X_EXPORT int (*XvScreenInitProc) (ScreenPtr);
#endif /* _XF86XV_H_ */
......@@ -43,8 +43,6 @@
#include "xf86xvpriv.h"
#include "xf86xvmc.h"
XvMCScreenInitProcPtr XvMCScreenInitProc = NULL;
typedef struct {
CloseScreenProcPtr CloseScreen;
int num_adaptors;
......
......@@ -7,10 +7,6 @@ if DGA
DGA_SRCS = xf86dga2.c dgaproc.h
endif
if XV
XV_SRCS = xvmod.c xvmodproc.h
endif
if XF86VIDMODE
XF86VMODE_SRCS = xf86vmode.c
endif
......@@ -24,6 +20,5 @@ INCLUDES = @XORG_INCS@ \
libextmod_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
libextmod_la_SOURCES = modinit.c \
$(DGA_SRCS) \
$(XF86VMODE_SRCS) \
$(XV_SRCS)
$(XF86VMODE_SRCS)
libextmod_la_LIBADD = $(top_builddir)/Xext/libXextmodule.la
......@@ -63,20 +63,6 @@ static ExtensionModule extensionModules[] = {
XFree86DGARegister,
NULL},
#endif
#ifdef XV
{
XvExtensionInit,
XvName,
&noXvExtension,
XvRegister,
NULL},
{
XvMCExtensionInit,
XvMCName,
&noXvExtension,
NULL,
NULL},
#endif
};
static XF86ModuleVersionInfo VersRec = {
......
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <X11/X.h>
#include "misc.h"
#include "scrnintstr.h"
#include "gc.h"
#include <X11/extensions/Xv.h>
#include <X11/extensions/Xvproto.h>
#include "xvdix.h"
#include "xvmodproc.h"
void
XvRegister(void)
{
XvScreenInitProc = XvScreenInit;
XvGetScreenKeyProc = XvGetScreenKey;
XvGetRTPortProc = XvGetRTPort;
XvMCScreenInitProc = XvMCScreenInit;
}
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef XVMODPROC_H
#define XVMODPROC_H
#include "xvmcext.h"
extern DevPrivateKey (*XvGetScreenKeyProc) (void);
extern unsigned long (*XvGetRTPortProc) (void);
extern int (*XvScreenInitProc) (ScreenPtr);
extern int (*XvMCScreenInitProc) (ScreenPtr, int, XvMCAdaptorPtr);
extern void XvRegister(void);
#endif /* XVMODPROC_H */
......@@ -46,10 +46,8 @@ cat > sdksyms.c << EOF
#include "misyncstr.h"
/* Xext/Makefile.am -- half is module, half is builtin */
/*
#include "xvdix.h"
#include "xvmcext.h"
*/
#include "geext.h"
#include "geint.h"
#ifdef MITSHM
......
......@@ -175,13 +175,14 @@ extern Bool noPseudoramiXExtension;
extern void PseudoramiXExtensionInit(void);
#endif
#if defined(XV) && !defined(XorgLoader)
#if defined(XV)
#include <X11/extensions/Xv.h>
#include <X11/extensions/XvMC.h>
extern Bool noXvExtension;
extern void XvExtensionInit(void);
extern void XvMCExtensionInit(void);
extern void XvRegister(void);
extern void XvMCRegister(void);
#endif
#endif
......@@ -412,6 +412,10 @@ static ExtensionModule staticExtensions[] = {
#ifdef RES
{ResExtensionInit, XRES_NAME, &noResExtension, NULL},
#endif
#ifdef XV
{XvExtensionInit, XvName, &noXvExtension, XvRegister},
{XvMCExtensionInit, XvMCName, &noXvExtension, XvMCRegister},
#endif
};
/*ARGSUSED*/ void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment