mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
treewide: drop remains XvMC extension
XvMC X11 extension alredy has been removed, but for ABI compatibility, we did leave the DDX side intact. Now it's time to remove that, too. This is explicitly breaking ABI: drivers that still did support XvMC need to be recompiled. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
2
.github/workflows/build-xserver.yml
vendored
2
.github/workflows/build-xserver.yml
vendored
@@ -130,7 +130,7 @@ jobs:
|
||||
xserver-build-mingw32-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MESON_ARGS: -Dprefix=/home/runner/x11 --cross-file=.github/scripts/mingw32/cross-i686-w64-mingw32.txt -Dglx=false -Dlisten_tcp=true -Dxvmc=true -Dxv=true -Dxvfb=true -Dxnest=true -Dxephyr=true -Dxfbdev=false
|
||||
MESON_ARGS: -Dprefix=/home/runner/x11 --cross-file=.github/scripts/mingw32/cross-i686-w64-mingw32.txt -Dglx=false -Dlisten_tcp=true -Dxv=true -Dxvfb=true -Dxnest=true -Dxephyr=true -Dxfbdev=false
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -108,7 +108,7 @@ stages:
|
||||
FDO_DISTRIBUTION_TAG: '$XORG_FREEBSD_TAG'
|
||||
FDO_DISTRIBUTION_VERSION: '$XORG_FREEBSD_VERSION'
|
||||
FDO_DISTRIBUTION_EXEC: ''
|
||||
FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake libtool xorg-macros xorgproto bash meson ninja pixman libXau libXdmcp libXfont2 libxkbfile libxcvt libpciaccess font-util libepoll-shim libxvmc xcb-util xcb-util-wm'
|
||||
FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake libtool xorg-macros xorgproto bash meson ninja pixman libXau libXdmcp libXfont2 libxkbfile libxcvt libpciaccess font-util libepoll-shim xcb-util xcb-util-wm'
|
||||
FDO_IMAGE_SIZE: '30G'
|
||||
|
||||
debian-bullseye:
|
||||
@@ -152,7 +152,7 @@ freebsd-image:
|
||||
- $MESON_BUILDDIR/meson-logs/
|
||||
- $MESON_BUILDDIR/test/piglit-results/
|
||||
variables:
|
||||
MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true -Dxcsecurity=true -Dxv=true -Dxvmc=true
|
||||
MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true -Dxcsecurity=true -Dxv=true
|
||||
CCACHE_COMPILERCHECK: content
|
||||
CCACHE_DIR: /cache/xserver/cache
|
||||
LC_ALL: C.UTF-8
|
||||
@@ -192,14 +192,14 @@ mingw-cross-build:
|
||||
script:
|
||||
- .gitlab-ci/meson-build.sh --run-install
|
||||
variables:
|
||||
MESON_ARGS: --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dlisten_tcp=true -Dxvmc=true -Dxv=true
|
||||
MESON_ARGS: --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dlisten_tcp=true -Dxv=true
|
||||
|
||||
freebsd:
|
||||
stage: build-and-test
|
||||
extends:
|
||||
- .xorg-image@freebsd
|
||||
variables:
|
||||
MESON_ARGS: -Dglx=false -Dglamor=false -Dudev=false -Dudev_kms=false -Dxvmc=true -Dxv=true
|
||||
MESON_ARGS: -Dglx=false -Dglamor=false -Dudev=false -Dudev_kms=false -Dxv=true
|
||||
script:
|
||||
# running of of disk space without this
|
||||
# needed until https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/67 is fixed
|
||||
@@ -209,7 +209,7 @@ freebsd:
|
||||
- set +e
|
||||
- scp -r $PWD "vm:"
|
||||
# need to install extra packages, as long as image cant be rebuilt
|
||||
- /app/vmctl exec "pkg update && pkg add libxvmc xcb-util xcb-util-wm"
|
||||
- /app/vmctl exec "pkg update && pkg add xcb-util xcb-util-wm"
|
||||
# need to install newer xorgproto
|
||||
- /app/vmctl exec "cd $CI_PROJECT_NAME/dep.xorgproto && ./autogen.sh --prefix=/usr && make && make install"
|
||||
- /app/vmctl exec "cd $CI_PROJECT_NAME && PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\" MESON_ARGS=\"$MESON_ARGS\" MESON_BUILDDIR=\"$MESON_BUILDDIR\" .gitlab-ci/meson-build.sh --skip-test" && touch .success
|
||||
|
||||
@@ -103,7 +103,6 @@ apt-get install -y \
|
||||
libxt-dev \
|
||||
libxtst-dev \
|
||||
libxv-dev \
|
||||
libxvmc-dev \
|
||||
libxxf86vm-dev \
|
||||
libz-mingw-w64-dev \
|
||||
linux-libc-dev/bullseye-backports \
|
||||
|
||||
@@ -51,8 +51,8 @@ if build_xselinux
|
||||
endif
|
||||
|
||||
if build_xv
|
||||
srcs_xext += ['xvmain.c', 'xvdisp.c', 'xvmc.c']
|
||||
hdrs_xext += ['xvdix.h', 'xvmcext.h']
|
||||
srcs_xext += ['xvmain.c', 'xvdisp.c' ]
|
||||
hdrs_xext += ['xvdix.h' ]
|
||||
endif
|
||||
|
||||
libxserver_xext = static_library('xserver_xext',
|
||||
|
||||
85
Xext/xvmc.c
85
Xext/xvmc.c
@@ -1,85 +0,0 @@
|
||||
|
||||
#include <dix-config.h>
|
||||
|
||||
#include "dix/request_priv.h"
|
||||
#include "dix/screen_hooks_priv.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
|
||||
#include "xvmcext.h"
|
||||
|
||||
#define DR_CLIENT_DRIVER_NAME_SIZE 48
|
||||
#define DR_BUSID_SIZE 48
|
||||
|
||||
static DevPrivateKeyRec XvMCScreenKeyRec;
|
||||
|
||||
#define XvMCScreenKey (&XvMCScreenKeyRec)
|
||||
|
||||
typedef struct {
|
||||
int num_adaptors;
|
||||
XvMCAdaptorPtr adaptors;
|
||||
char clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE];
|
||||
char busID[DR_BUSID_SIZE];
|
||||
int major;
|
||||
int minor;
|
||||
int patchLevel;
|
||||
} XvMCScreenRec, *XvMCScreenPtr;
|
||||
|
||||
#define XVMC_GET_PRIVATE(pScreen) \
|
||||
(XvMCScreenPtr)(dixLookupPrivate(&(pScreen)->devPrivates, XvMCScreenKey))
|
||||
|
||||
void
|
||||
XvMCExtensionInit(void)
|
||||
{
|
||||
/* keep the resource types intact within this ABI cylce, since some
|
||||
drivers might still need them */
|
||||
if (!dixPrivateKeyRegistered(XvMCScreenKey))
|
||||
return;
|
||||
}
|
||||
|
||||
static void XvMCScreenClose(CallbackListPtr *pcbl, ScreenPtr pScreen, void *unused)
|
||||
{
|
||||
XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
|
||||
free(pScreenPriv);
|
||||
dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, NULL);
|
||||
dixScreenUnhookClose(pScreen, XvMCScreenClose);
|
||||
}
|
||||
|
||||
int
|
||||
XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt)
|
||||
{
|
||||
XvMCScreenPtr pScreenPriv;
|
||||
|
||||
if (!dixRegisterPrivateKey(&XvMCScreenKeyRec, PRIVATE_SCREEN, 0))
|
||||
return BadAlloc;
|
||||
|
||||
if (!(pScreenPriv = calloc(1, sizeof(XvMCScreenRec))))
|
||||
return BadAlloc;
|
||||
|
||||
dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv);
|
||||
|
||||
dixScreenHookClose(pScreen, XvMCScreenClose);
|
||||
|
||||
pScreenPriv->num_adaptors = num;
|
||||
pScreenPriv->adaptors = pAdapt;
|
||||
pScreenPriv->clientDriverName[0] = 0;
|
||||
pScreenPriv->busID[0] = 0;
|
||||
pScreenPriv->major = 0;
|
||||
pScreenPriv->minor = 0;
|
||||
pScreenPriv->patchLevel = 0;
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
int
|
||||
xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name,
|
||||
const char *busID, int major, int minor, int patchLevel)
|
||||
{
|
||||
XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
|
||||
|
||||
strlcpy(pScreenPriv->clientDriverName, name, DR_CLIENT_DRIVER_NAME_SIZE);
|
||||
strlcpy(pScreenPriv->busID, busID, DR_BUSID_SIZE);
|
||||
pScreenPriv->major = major;
|
||||
pScreenPriv->minor = minor;
|
||||
pScreenPriv->patchLevel = patchLevel;
|
||||
return Success;
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
|
||||
#ifndef _XVMC_H
|
||||
#define _XVMC_H
|
||||
#include <X11/extensions/Xv.h>
|
||||
#include "xvdix.h"
|
||||
|
||||
typedef struct {
|
||||
int num_xvimages;
|
||||
int *xvimage_ids;
|
||||
} XvMCImageIDList;
|
||||
|
||||
typedef struct {
|
||||
int surface_type_id;
|
||||
int chroma_format;
|
||||
int color_description;
|
||||
unsigned short max_width;
|
||||
unsigned short max_height;
|
||||
unsigned short subpicture_max_width;
|
||||
unsigned short subpicture_max_height;
|
||||
int mc_type;
|
||||
int flags;
|
||||
XvMCImageIDList *compatible_subpictures;
|
||||
} XvMCSurfaceInfoRec, *XvMCSurfaceInfoPtr;
|
||||
|
||||
typedef struct {
|
||||
XID context_id;
|
||||
ScreenPtr pScreen;
|
||||
int adapt_num;
|
||||
int surface_type_id;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
CARD32 flags;
|
||||
int refcnt;
|
||||
void *port_priv;
|
||||
void *driver_priv;
|
||||
} XvMCContextRec, *XvMCContextPtr;
|
||||
|
||||
typedef struct {
|
||||
XID surface_id;
|
||||
int surface_type_id;
|
||||
XvMCContextPtr context;
|
||||
void *driver_priv;
|
||||
} XvMCSurfaceRec, *XvMCSurfacePtr;
|
||||
|
||||
typedef struct {
|
||||
XID subpicture_id;
|
||||
int xvimage_id;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
int num_palette_entries;
|
||||
int entry_bytes;
|
||||
char component_order[4];
|
||||
XvMCContextPtr context;
|
||||
void *driver_priv;
|
||||
} XvMCSubpictureRec, *XvMCSubpicturePtr;
|
||||
|
||||
typedef int (*XvMCCreateContextProcPtr) (XvPortPtr port,
|
||||
XvMCContextPtr context,
|
||||
int *num_priv, CARD32 **priv);
|
||||
|
||||
typedef void (*XvMCDestroyContextProcPtr) (XvMCContextPtr context);
|
||||
|
||||
typedef int (*XvMCCreateSurfaceProcPtr) (XvMCSurfacePtr surface,
|
||||
int *num_priv, CARD32 **priv);
|
||||
|
||||
typedef void (*XvMCDestroySurfaceProcPtr) (XvMCSurfacePtr surface);
|
||||
|
||||
typedef int (*XvMCCreateSubpictureProcPtr) (XvMCSubpicturePtr subpicture,
|
||||
int *num_priv, CARD32 **priv);
|
||||
|
||||
typedef void (*XvMCDestroySubpictureProcPtr) (XvMCSubpicturePtr subpicture);
|
||||
|
||||
typedef struct {
|
||||
XvAdaptorPtr xv_adaptor;
|
||||
int num_surfaces;
|
||||
XvMCSurfaceInfoPtr *surfaces;
|
||||
int num_subpictures;
|
||||
XvImagePtr *subpictures;
|
||||
XvMCCreateContextProcPtr CreateContext;
|
||||
XvMCDestroyContextProcPtr DestroyContext;
|
||||
XvMCCreateSurfaceProcPtr CreateSurface;
|
||||
XvMCDestroySurfaceProcPtr DestroySurface;
|
||||
XvMCCreateSubpictureProcPtr CreateSubpicture;
|
||||
XvMCDestroySubpictureProcPtr DestroySubpicture;
|
||||
} XvMCAdaptorRec, *XvMCAdaptorPtr;
|
||||
|
||||
extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen,
|
||||
int num, XvMCAdaptorPtr adapt);
|
||||
|
||||
extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name,
|
||||
const char *busID, int major, int minor,
|
||||
int patchLevel);
|
||||
|
||||
#endif /* _XVMC_H */
|
||||
@@ -60,8 +60,8 @@ if build_dga
|
||||
endif
|
||||
|
||||
if build_xv
|
||||
srcs_xorg_common += ['xf86xv.c', 'xf86xvmc.c']
|
||||
xorg_sdk_headers += ['xf86xv.h', 'xf86xvmc.h']
|
||||
srcs_xorg_common += ['xf86xv.c']
|
||||
xorg_sdk_headers += ['xf86xv.h']
|
||||
endif
|
||||
|
||||
if build_udev
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2003 by The XFree86 Project, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the copyright holder(s)
|
||||
* and author(s) shall not be used in advertising or otherwise to promote
|
||||
* the sale, use or other dealings in this Software without prior written
|
||||
* authorization from the copyright holder(s) and author(s).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_XORG_CONFIG_H
|
||||
#include <xorg-config.h>
|
||||
#endif
|
||||
|
||||
#include "misc.h"
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
|
||||
#include "dix/screen_hooks_priv.h"
|
||||
#include "include/extinit.h"
|
||||
|
||||
#include "scrnintstr.h"
|
||||
#include "resource.h"
|
||||
#include "dixstruct.h"
|
||||
|
||||
#include "xf86xvpriv.h"
|
||||
#include "xf86xvmc.h"
|
||||
|
||||
typedef struct {
|
||||
int num_adaptors;
|
||||
XF86MCAdaptorPtr *adaptors;
|
||||
XvMCAdaptorPtr dixinfo;
|
||||
} xf86XvMCScreenRec, *xf86XvMCScreenPtr;
|
||||
|
||||
static DevPrivateKeyRec XF86XvMCScreenKeyRec;
|
||||
|
||||
#define XF86XvMCScreenKey (&XF86XvMCScreenKeyRec)
|
||||
|
||||
#define XF86XVMC_GET_PRIVATE(pScreen) (xf86XvMCScreenPtr) \
|
||||
dixLookupPrivate(&(pScreen)->devPrivates, XF86XvMCScreenKey)
|
||||
|
||||
static int
|
||||
xf86XvMCCreateContext(XvPortPtr pPort,
|
||||
XvMCContextPtr pContext, int *num_priv, CARD32 **priv)
|
||||
{
|
||||
xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen);
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen);
|
||||
|
||||
pContext->port_priv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr);
|
||||
|
||||
return (*pScreenPriv->adaptors[pContext->adapt_num]->CreateContext) (pScrn,
|
||||
pContext,
|
||||
num_priv,
|
||||
priv);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86XvMCDestroyContext(XvMCContextPtr pContext)
|
||||
{
|
||||
xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen);
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen);
|
||||
|
||||
(*pScreenPriv->adaptors[pContext->adapt_num]->DestroyContext) (pScrn,
|
||||
pContext);
|
||||
}
|
||||
|
||||
static int
|
||||
xf86XvMCCreateSurface(XvMCSurfacePtr pSurface, int *num_priv, CARD32 **priv)
|
||||
{
|
||||
XvMCContextPtr pContext = pSurface->context;
|
||||
xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen);
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen);
|
||||
|
||||
return (*pScreenPriv->adaptors[pContext->adapt_num]->CreateSurface) (pScrn,
|
||||
pSurface,
|
||||
num_priv,
|
||||
priv);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86XvMCDestroySurface(XvMCSurfacePtr pSurface)
|
||||
{
|
||||
XvMCContextPtr pContext = pSurface->context;
|
||||
xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen);
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen);
|
||||
|
||||
(*pScreenPriv->adaptors[pContext->adapt_num]->DestroySurface) (pScrn,
|
||||
pSurface);
|
||||
}
|
||||
|
||||
static int
|
||||
xf86XvMCCreateSubpicture(XvMCSubpicturePtr pSubpicture,
|
||||
int *num_priv, CARD32 **priv)
|
||||
{
|
||||
XvMCContextPtr pContext = pSubpicture->context;
|
||||
xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen);
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen);
|
||||
|
||||
return (*pScreenPriv->adaptors[pContext->adapt_num]->
|
||||
CreateSubpicture) (pScrn, pSubpicture, num_priv, priv);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86XvMCDestroySubpicture(XvMCSubpicturePtr pSubpicture)
|
||||
{
|
||||
XvMCContextPtr pContext = pSubpicture->context;
|
||||
xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen);
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen);
|
||||
|
||||
(*pScreenPriv->adaptors[pContext->adapt_num]->DestroySubpicture) (pScrn,
|
||||
pSubpicture);
|
||||
}
|
||||
|
||||
static void xf86XvMCCloseScreen(CallbackListPtr *pcbl,
|
||||
ScreenPtr pScreen, void *unused)
|
||||
{
|
||||
dixScreenUnhookClose(pScreen, xf86XvMCCloseScreen);
|
||||
|
||||
xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pScreen);
|
||||
if (!pScreenPriv)
|
||||
return;
|
||||
|
||||
free(pScreenPriv->dixinfo);
|
||||
free(pScreenPriv);
|
||||
dixSetPrivate(&pScreen->devPrivates, XF86XvMCScreenKey, NULL);
|
||||
}
|
||||
|
||||
Bool
|
||||
xf86XvMCScreenInit(ScreenPtr pScreen,
|
||||
int num_adaptors, XF86MCAdaptorPtr * adaptors)
|
||||
{
|
||||
XvMCAdaptorPtr pAdapt;
|
||||
xf86XvMCScreenPtr pScreenPriv;
|
||||
XvScreenPtr pxvs = dixLookupPrivate(&pScreen->devPrivates, XvGetScreenKey());
|
||||
int i, j;
|
||||
|
||||
if (noXvExtension)
|
||||
return FALSE;
|
||||
|
||||
if (!(pAdapt = calloc(num_adaptors, sizeof(XvMCAdaptorRec))))
|
||||
return FALSE;
|
||||
|
||||
if (!dixRegisterPrivateKey(&XF86XvMCScreenKeyRec, PRIVATE_SCREEN, 0)) {
|
||||
free(pAdapt);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!(pScreenPriv = calloc(1, sizeof(xf86XvMCScreenRec)))) {
|
||||
free(pAdapt);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
dixSetPrivate(&pScreen->devPrivates, XF86XvMCScreenKey, pScreenPriv);
|
||||
dixScreenHookClose(pScreen, xf86XvMCCloseScreen);
|
||||
|
||||
pScreenPriv->num_adaptors = num_adaptors;
|
||||
pScreenPriv->adaptors = adaptors;
|
||||
pScreenPriv->dixinfo = pAdapt;
|
||||
|
||||
for (i = 0; i < num_adaptors; i++) {
|
||||
pAdapt[i].xv_adaptor = NULL;
|
||||
for (j = 0; j < pxvs->nAdaptors; j++) {
|
||||
if (!strcmp((*adaptors)->name, pxvs->pAdaptors[j].name)) {
|
||||
pAdapt[i].xv_adaptor = &(pxvs->pAdaptors[j]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!pAdapt[i].xv_adaptor) {
|
||||
/* no adaptor by that name */
|
||||
pScreenPriv->dixinfo = FALSE;
|
||||
free(pAdapt);
|
||||
return FALSE;
|
||||
}
|
||||
pAdapt[i].num_surfaces = (*adaptors)->num_surfaces;
|
||||
pAdapt[i].surfaces = (XvMCSurfaceInfoPtr *) ((*adaptors)->surfaces);
|
||||
pAdapt[i].num_subpictures = (*adaptors)->num_subpictures;
|
||||
pAdapt[i].subpictures = (XvImagePtr *) ((*adaptors)->subpictures);
|
||||
pAdapt[i].CreateContext = xf86XvMCCreateContext;
|
||||
pAdapt[i].DestroyContext = xf86XvMCDestroyContext;
|
||||
pAdapt[i].CreateSurface = xf86XvMCCreateSurface;
|
||||
pAdapt[i].DestroySurface = xf86XvMCDestroySurface;
|
||||
pAdapt[i].CreateSubpicture = xf86XvMCCreateSubpicture;
|
||||
pAdapt[i].DestroySubpicture = xf86XvMCDestroySubpicture;
|
||||
adaptors++;
|
||||
}
|
||||
|
||||
if (Success != XvMCScreenInit(pScreen, num_adaptors, pAdapt))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
XF86MCAdaptorPtr
|
||||
xf86XvMCCreateAdaptorRec(void)
|
||||
{
|
||||
return calloc(1, sizeof(XF86MCAdaptorRec));
|
||||
}
|
||||
|
||||
void
|
||||
xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor)
|
||||
{
|
||||
free(adaptor);
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 by The XFree86 Project, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the copyright holder(s)
|
||||
* and author(s) shall not be used in advertising or otherwise to promote
|
||||
* the sale, use or other dealings in this Software without prior written
|
||||
* authorization from the copyright holder(s) and author(s).
|
||||
*/
|
||||
|
||||
#ifndef _XF86XVMC_H
|
||||
#define _XF86XVMC_H
|
||||
|
||||
#include "xvmcext.h"
|
||||
#include "xf86xv.h"
|
||||
|
||||
typedef struct {
|
||||
int num_xvimages;
|
||||
int *xvimage_ids; /* reference the subpictures in the XF86MCAdaptorRec */
|
||||
} XF86MCImageIDList;
|
||||
|
||||
typedef struct {
|
||||
int surface_type_id; /* Driver generated. Must be unique on the port */
|
||||
int chroma_format;
|
||||
int color_description; /* no longer used */
|
||||
unsigned short max_width;
|
||||
unsigned short max_height;
|
||||
unsigned short subpicture_max_width;
|
||||
unsigned short subpicture_max_height;
|
||||
int mc_type;
|
||||
int flags;
|
||||
XF86MCImageIDList *compatible_subpictures; /* can be null, if none */
|
||||
} XF86MCSurfaceInfoRec, *XF86MCSurfaceInfoPtr;
|
||||
|
||||
/*
|
||||
xf86XvMCCreateContextProc
|
||||
|
||||
DIX will fill everything out in the context except the driver_priv.
|
||||
The port_priv holds the private data specified for the port when
|
||||
Xv was initialized by the driver.
|
||||
The driver may store whatever it wants in driver_priv and edit
|
||||
the width, height and flags. If the driver wants to return something
|
||||
to the client it can allocate space in priv and specify the number
|
||||
of 32 bit words in num_priv. This must be dynamically allocated
|
||||
space because DIX will free it after it passes it to the client.
|
||||
*/
|
||||
|
||||
typedef int (*xf86XvMCCreateContextProcPtr) (ScrnInfoPtr pScrn,
|
||||
XvMCContextPtr context,
|
||||
int *num_priv, CARD32 **priv);
|
||||
|
||||
typedef void (*xf86XvMCDestroyContextProcPtr) (ScrnInfoPtr pScrn,
|
||||
XvMCContextPtr context);
|
||||
|
||||
/*
|
||||
xf86XvMCCreateSurfaceProc
|
||||
|
||||
DIX will fill everything out in the surface except the driver_priv.
|
||||
The driver may store whatever it wants in driver_priv. The driver
|
||||
may pass data back to the client in the same manner as the
|
||||
xf86XvMCCreateContextProc.
|
||||
*/
|
||||
|
||||
typedef int (*xf86XvMCCreateSurfaceProcPtr) (ScrnInfoPtr pScrn,
|
||||
XvMCSurfacePtr surface,
|
||||
int *num_priv, CARD32 **priv);
|
||||
|
||||
typedef void (*xf86XvMCDestroySurfaceProcPtr) (ScrnInfoPtr pScrn,
|
||||
XvMCSurfacePtr surface);
|
||||
|
||||
/*
|
||||
xf86XvMCCreateSubpictureProc
|
||||
|
||||
DIX will fill everything out in the subpicture except the driver_priv,
|
||||
num_palette_entries, entry_bytes and component_order. The driver may
|
||||
store whatever it wants in driver_priv and edit the width and height.
|
||||
If it is a paletted subpicture the driver needs to fill out the
|
||||
num_palette_entries, entry_bytes and component_order. These are
|
||||
not communicated to the client until the time the surface is
|
||||
created.
|
||||
|
||||
The driver may pass data back to the client in the same manner as the
|
||||
xf86XvMCCreateContextProc.
|
||||
*/
|
||||
|
||||
typedef int (*xf86XvMCCreateSubpictureProcPtr) (ScrnInfoPtr pScrn,
|
||||
XvMCSubpicturePtr subpicture,
|
||||
int *num_priv, CARD32 **priv);
|
||||
|
||||
typedef void (*xf86XvMCDestroySubpictureProcPtr) (ScrnInfoPtr pScrn,
|
||||
XvMCSubpicturePtr subpicture);
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
int num_surfaces;
|
||||
XF86MCSurfaceInfoPtr *surfaces;
|
||||
int num_subpictures;
|
||||
XF86ImagePtr *subpictures;
|
||||
xf86XvMCCreateContextProcPtr CreateContext;
|
||||
xf86XvMCDestroyContextProcPtr DestroyContext;
|
||||
xf86XvMCCreateSurfaceProcPtr CreateSurface;
|
||||
xf86XvMCDestroySurfaceProcPtr DestroySurface;
|
||||
xf86XvMCCreateSubpictureProcPtr CreateSubpicture;
|
||||
xf86XvMCDestroySubpictureProcPtr DestroySubpicture;
|
||||
} XF86MCAdaptorRec, *XF86MCAdaptorPtr;
|
||||
|
||||
/*
|
||||
xf86XvMCScreenInit
|
||||
|
||||
Unlike Xv, the adaptor data is not copied from this structure.
|
||||
This structure's data is used so it must stick around for the
|
||||
life of the server. Note that it's an array of pointers not
|
||||
an array of structures.
|
||||
*/
|
||||
|
||||
extern _X_EXPORT Bool xf86XvMCScreenInit(ScreenPtr pScreen,
|
||||
int num_adaptors,
|
||||
XF86MCAdaptorPtr * adaptors);
|
||||
|
||||
extern _X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec(void);
|
||||
extern _X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor);
|
||||
|
||||
#endif /* _XF86XVMC_H */
|
||||
@@ -51,7 +51,6 @@ cat > sdksyms.c << EOF
|
||||
/* Xext/Makefile.am -- half is module, half is builtin */
|
||||
#ifdef XV
|
||||
#include "xvdix.h"
|
||||
#include "xvmcext.h"
|
||||
#endif
|
||||
#ifdef CONFIG_MITSHM
|
||||
#include "shmint.h"
|
||||
@@ -130,7 +129,6 @@ cat > sdksyms.c << EOF
|
||||
#include "xisb.h"
|
||||
#ifdef XV
|
||||
# include "xf86xv.h"
|
||||
# include "xf86xvmc.h"
|
||||
#endif
|
||||
#include "xorgVersion.h"
|
||||
#if defined(__sparc__) || defined(__sparc)
|
||||
|
||||
@@ -258,7 +258,6 @@ conf_data.set('XSYNC', '1')
|
||||
conf_data.set('XTEST', '1')
|
||||
conf_data.set('XV', build_xv ? '1' : false)
|
||||
conf_data.set('XvExtension', build_xv ? '1' : false)
|
||||
conf_data.set('XvMCExtension', build_xvmc ? '1' : false)
|
||||
|
||||
# needed by several extensions
|
||||
build_registry_resource = (build_xselinux or build_res or build_namespace)
|
||||
|
||||
@@ -133,9 +133,6 @@
|
||||
/* Build Xv Extension */
|
||||
#mesondefine XvExtension
|
||||
|
||||
/* Build XvMC Extension */
|
||||
#mesondefine XvMCExtension
|
||||
|
||||
/* Support XSync extension */
|
||||
#mesondefine XSYNC
|
||||
|
||||
|
||||
@@ -512,10 +512,6 @@ build_xsecurity = get_option('xcsecurity')
|
||||
build_namespace = get_option('namespace')
|
||||
|
||||
build_xv = get_option('xv')
|
||||
build_xvmc = get_option('xvmc')
|
||||
if not build_xv
|
||||
build_xvmc = false
|
||||
endif
|
||||
|
||||
build_dga = false
|
||||
xf86dgaproto_dep = dependency('', required: false)
|
||||
|
||||
@@ -105,8 +105,6 @@ option('xcsecurity', type: 'boolean', value: false,
|
||||
description: 'Security extension')
|
||||
option('xv', type: 'boolean', value: true,
|
||||
description: 'Xv extension')
|
||||
option('xvmc', type: 'boolean', value: true,
|
||||
description: 'XvMC extension')
|
||||
option('dga', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
|
||||
description: 'DGA extension')
|
||||
option('linux_apm', type: 'boolean', value: true,
|
||||
|
||||
@@ -54,7 +54,6 @@ void XkbExtensionInit(void);
|
||||
void SELinuxExtensionInit(void);
|
||||
void XTestExtensionInit(void);
|
||||
void XvExtensionInit(void);
|
||||
void XvMCExtensionInit(void);
|
||||
void dri3_extension_init(void);
|
||||
void PseudoramiXExtensionInit(void);
|
||||
void present_extension_init(void);
|
||||
|
||||
Reference in New Issue
Block a user