added conditional vidix drivers compilation

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22991 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ben 2007-04-14 10:39:17 +00:00
parent 720fa4936a
commit cc5038c8d9
3 changed files with 150 additions and 4 deletions

109
configure vendored
View File

@ -334,6 +334,9 @@ Codecs:
Video output:
--disable-vidix-internal disable internal VIDIX [for x86 *nix]
--disable-vidix-external disable external VIDIX [for x86 *nix]
--with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
Available: all,cyberblade,mach64,mga,mga_crtc2,
nvidia,pm3,radeon,rage128,savage,sis,unichrome
--enable-gl enable OpenGL video output [autodetect]
--enable-dga[=n] enable DGA [n in {1, 2} ] support [autodetect]
--enable-vesa enable VESA video output [autodetect]
@ -588,6 +591,7 @@ _winsock2=auto
_smbsupport=auto
_vidix_internal=auto
_vidix_external=auto
_vidix_drivers="all"
_joystick=no
_xvid=auto
_x264=auto
@ -955,6 +959,9 @@ for ac_option do
--disable-vidix-internal) _vidix_internal=no ;;
--enable-vidix-external) _vidix_external=yes ;;
--disable-vidix-external) _vidix_external=no ;;
--with-vidix-drivers=*)
_vidix_drivers=`echo $ac_option | cut -d '=' -f 2`
;;
--enable-joystick) _joystick=yes ;;
--disable-joystick) _joystick=no ;;
--enable-xvid) _xvid=yes ;;
@ -7320,6 +7327,86 @@ else
_def_vidix='#undef CONFIG_VIDIX'
fi
if test "$_vidix" = yes ; then
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e cyberblade`; then
_def_vidix_drv_cyberblade='#define CONFIG_VIDIX_DRV_CYBERBLADE 1'
_vidix_drv_cyberblade=yes
else
_def_vidix_drv_cyberblade='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
_vidix_drv_cyberblade=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e mach64`; then
_def_vidix_drv_mach64='#define CONFIG_VIDIX_DRV_MACH64 1'
_vidix_drv_mach64=yes
else
_def_vidix_drv_mach64='#undef CONFIG_VIDIX_DRV_MACH64'
_vidix_drv_mach64=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e mga`; then
_def_vidix_drv_mga='#define CONFIG_VIDIX_DRV_MGA 1'
_vidix_drv_mga=yes
else
_def_vidix_drv_mga='#undef CONFIG_VIDIX_DRV_MGA'
_vidix_drv_mga=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e mga_crtc2`; then
_def_vidix_drv_mga_crtc2='#define CONFIG_VIDIX_DRV_MGA_CRTC2 1'
_vidix_drv_mga_crtc2=yes
else
_def_vidix_drv_mga_crtc2='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
_vidix_drv_mga_crtc2=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e nvidia`; then
_def_vidix_drv_nvidia='#define CONFIG_VIDIX_DRV_NVIDIA 1'
_vidix_drv_nvidia=yes
else
_def_vidix_drv_nvidia='#undef CONFIG_VIDIX_DRV_NVIDIA'
_vidix_drv_nvidia=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e pm3`; then
_def_vidix_drv_pm3='#define CONFIG_VIDIX_DRV_PM3 1'
_vidix_drv_pm3=yes
else
_def_vidix_drv_pm3='#undef CONFIG_VIDIX_DRV_PM3'
_vidix_drv_pm3=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e radeon`; then
_def_vidix_drv_radeon='#define CONFIG_VIDIX_DRV_RADEON 1'
_vidix_drv_radeon=yes
else
_def_vidix_drv_radeon='#undef CONFIG_VIDIX_DRV_RADEON'
_vidix_drv_radeon=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e rage128`; then
_def_vidix_drv_rage128='#define CONFIG_VIDIX_DRV_RAGE128 1'
_vidix_drv_rage128=yes
else
_def_vidix_drv_rage128='#undef CONFIG_VIDIX_DRV_RAGE128'
_vidix_drv_rage128=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e savage`; then
_def_vidix_drv_savage='#define CONFIG_VIDIX_DRV_SAVAGE 1'
_vidix_drv_savage=yes
else
_def_vidix_drv_savage='#undef CONFIG_VIDIX_DRV_SAVAGE'
_vidix_drv_savage=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e sis`; then
_def_vidix_drv_sis='#define CONFIG_VIDIX_DRV_SIS 1'
_vidix_drv_sis=yes
else
_def_vidix_drv_sis='#undef CONFIG_VIDIX_DRV_SIS'
_vidix_drv_sis=no
fi
if test "$_vidix_drivers" = all || test `echo "$_vidix_drivers" | grep -e unichrome`; then
_def_vidix_drv_unichrome='#define CONFIG_VIDIX_DRV_UNICHROME 1'
_vidix_drv_unichrome=yes
else
_def_vidix_drv_unichrome='#undef CONFIG_VIDIX_DRV_UNICHROME'
_vidix_drv_unichrome=no
fi
fi
if test "$_vidix_internal" = yes ; then
_def_vidix_pfx="#define MP_VIDIX_PFX \"$_libdir\" \"/mplayer/vidix/\" "
elif test "$_vidix_external" = yes ; then
@ -7693,6 +7780,17 @@ CONFIG_ENCODERS=$_mencoder
CONFIG_MUXERS=$_mencoder
RADIO=$_radio
RADIO_CAPTURE=$_radio_capture
CONFIG_VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
CONFIG_VIDIX_MACH64=$_vidix_drv_mach64
CONFIG_VIDIX_MGA=$_vidix_drv_mga
CONFIG_VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
CONFIG_VIDIX_NVIDIA=$_vidix_drv_nvidia
CONFIG_VIDIX_PM3=$_vidix_drv_pm3
CONFIG_VIDIX_RADEON=$_vidix_drv_radeon
CONFIG_VIDIX_RAGE128=$_vidix_drv_rage128
CONFIG_VIDIX_SAVAGE=$_vidix_drv_savage
CONFIG_VIDIX_SIS=$_vidix_drv_sis
CONFIG_VIDIX_UNICHROME=$_vidix_drv_unichrome
# --- Some stuff for autoconfigure ----
$_target_arch
@ -8367,6 +8465,17 @@ $_def_cddb
/* enables / disables VIDIX usage */
$_def_vidix
$_def_vidix_drv_cyberblade
$_def_vidix_drv_mach64
$_def_vidix_drv_mga
$_def_vidix_drv_mga_crtc2
$_def_vidix_drv_nvidia
$_def_vidix_drv_pm3
$_def_vidix_drv_radeon
$_def_vidix_drv_rage128
$_def_vidix_drv_savage
$_def_vidix_drv_sis
$_def_vidix_drv_unichrome
$_def_vidix_pfx
/* enables / disables new input joystick support */

View File

@ -3,15 +3,29 @@ include ../config.mak
LIBNAME_MPLAYER = libvidix.a
SRCS_MPLAYER = vidixlib.c \
drivers.c \
dha.c \
mtrr.c \
pci.c \
pci_names.c \
pci_dev_ids.c \
$(wildcard *.c)
pci_dev_ids.c
OBJS_MPLAYER = mga_crtc2_vid.o \
rage128_vid.o \
SRCS_MPLAYER-$(CONFIG_VIDIX_CYBERBLADE) += cyberblade_vid.c
SRCS_MPLAYER-$(CONFIG_VIDIX_MACH64) += mach64_vid.c
SRCS_MPLAYER-$(CONFIG_VIDIX_MGA) += mga_vid.c
SRCS_MPLAYER-$(CONFIG_VIDIX_NVIDIA) += nvidia_vid.c
SRCS_MPLAYER-$(CONFIG_VIDIX_PM3) += pm3_vid.c
SRCS_MPLAYER-$(CONFIG_VIDIX_RADEON) += radeon_vid.c
SRCS_MPLAYER-$(CONFIG_VIDIX_SAVAGE) += savage_vid.c
SRCS_MPLAYER-$(CONFIG_VIDIX_SIS) += sis_vid.c sis_bridge.c
SRCS_MPLAYER-$(CONFIG_VIDIX_UNICHROME) += unichrome_vid.c
ifeq ($(CONFIG_VIDIX_MGA_CRTC2), yes)
OBJS_MPLAYER += mga_crtc2_vid.o
endif
ifeq ($(CONFIG_VIDIX_RAGE128),yes)
OBJS_MPLAYER += rage128_vid.o
endif
# If you want libdha to use svgalib_helper for hardware access,
# uncomment this statement, and change the -I to the correct directory

View File

@ -26,6 +26,7 @@
#include "config.h"
#include "libavutil/common.h"
#include "mpbswap.h"
#include "config.h"
VDXDriver *first_driver = NULL;
@ -54,17 +55,39 @@ static void vidix_register_driver (VDXDriver *drv)
void vidix_register_all_drivers (void)
{
#ifdef CONFIG_VIDIX_DRV_CYBERBLADE
vidix_register_driver (&cyberblade_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_MACH64
vidix_register_driver (&mach64_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_MGA
vidix_register_driver (&mga_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_MGA_CRTC2
vidix_register_driver (&mga_crtc2_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_NVIDIA
vidix_register_driver (&nvidia_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_PM3
vidix_register_driver (&pm3_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_RADEON
vidix_register_driver (&radeon_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_RAGE128
vidix_register_driver (&rage128_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_SAVAGE
vidix_register_driver (&savage_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_SIS
vidix_register_driver (&sis_drv);
#endif
#ifdef CONFIG_VIDIX_DRV_UNICHROME
vidix_register_driver (&unichrome_drv);
#endif
}
static int vidix_probe_driver (VDXContext *ctx, VDXDriver *drv,