[Mplayer-cvslog] CVS: main Makefile,1.62,1.63 configure,1.139,1.140 dec_audio.c,1.28,1.29 dec_video.c,1.24,1.25
Jürgen Keil
jkeil at mplayer.dev.hu
Tue Aug 14 20:29:03 CEST 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv27006
Modified Files:
Makefile configure dec_audio.c dec_video.c
Log Message:
Use USE_WIN32DLL define instead of ARCH_X86 to decide whether or not to compile
Win32 DLL code into mplayer. Default for USE_WIN32DLL is enabled on x86
machines, disabled otherwise.
Use of Win32 DLLs can be disabled on x86 using the --disable-win32 configure
option.
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- Makefile 12 Aug 2001 17:27:23 -0000 1.62
+++ Makefile 14 Aug 2001 18:28:56 -0000 1.63
@@ -24,15 +24,12 @@
PARTS = mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 drivers drivers/syncfb
-ifeq ($(TARGET_ARCH_X86),yes)
+ifneq ($(W32_LIB),)
PARTS += loader loader/DirectShow
SRCS += dll_init.c
-LOADER_DEP = loader/libloader.a $(DS_DEP)
-LIB_LOADER = -Lloader -lloader $(DS_LIB)
-else
-LOADER_DEP =
-LIB_LOADER =
endif
+LOADER_DEP = $(W32_DEP) $(DS_DEP)
+LIB_LOADER = $(W32_LIB) $(DS_LIB)
.SUFFIXES: .c .o
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -r1.139 -r1.140
--- configure 14 Aug 2001 14:34:27 -0000 1.139
+++ configure 14 Aug 2001 18:28:56 -0000 1.140
@@ -163,6 +163,7 @@
--disable-select disable audio select() support ( for example required this
option ALSA or Vortex2 driver )
+ --disable-win32 disable Win32 DLL support
--disable-dshow disable DirectShow support (if you don't have
C++ compiler&libs, or you've found dshow codecs
slower than old VfW ones)
@@ -456,8 +457,8 @@
[ "$system_name" = Linux ] && _fbdev=yes
_lirc=no
_css=no
-_dshow=yes
-[ "$host_arch" != i386 ] && _dshow=no
+_win32dll=yes _dshow=yes
+[ "$host_arch" != i386 ] && _dshow=no _win32dll=no
_fastmemcpy=yes
_streaming=no
_libavcodec=no
@@ -510,7 +511,7 @@
_win32libdirnotify=no
-if [ "$host_arch" = i386 ]; then
+if [ $_win32dll = yes ]; then
if [ -d /usr/lib/win32 ]; then
_win32libdir=/usr/lib/win32
elif [ -d /usr/local/lib/win32 ]; then
@@ -1169,6 +1170,10 @@
--disable-select)
_select='#undef HAVE_AUDIO_SELECT'
;;
+ --disable-win32)
+ _win32dll=no
+ _dshow=no # no dshow without win32dlls
+ ;;
--disable-dshow)
_dshow=no
;;
@@ -1408,6 +1413,7 @@
echo "Checking for Sun Audio ... $_sun_audio"
echo "Checking for DeCSS support ... $_css"
echo "Checking for PNG support ... $_png"
+echo "Checking for Win32 DLL support ... $_win32dll"
echo "Checking for DirectShow ... $_dshow"
echo "Checking for libavcodec ... $_libavcodec"
echo "Checking for divx4linux ... $_divx4linux"
@@ -1454,16 +1460,25 @@
_cssinc=''
fi
-if [ $_dshow = yes ]; then
- _dshowlib='-Lloader/DirectShow -lDS_Filter -lstdc++'
- _dshowdep='loader/DirectShow/libDS_Filter.a'
- _dshow='#define USE_DIRECTSHOW'
-else
- _dshowlib=''
- _dshowdep=''
- _dshow='#undef USE_DIRECTSHOW'
+
+
+if [ $_win32dll = yes ]; then
+ _win32dll='#define USE_WIN32DLL 1'
+ _win32lib='-Lloader -lloader'
+ _win32dep='loader/libloader.a'
+ if [ $_dshow = yes ]; then
+ _dshow='#define USE_DIRECTSHOW'
+ _dshowlib='-Lloader/DirectShow -lDS_Filter -lstdc++'
+ _dshowdep='loader/DirectShow/libDS_Filter.a'
+ else
+ _dshow='#undef USE_DIRECTSHOW' _dshowlib='' _dshowdep=''
+ fi
+else
+ _win32dll='#undef USE_WIN32DLL' _win32lib='' _win32dep=''
+ _dshow='#undef USE_DIRECTSHOW' _dshowlib='' _dshowdep=''
fi
+
if [ $_libavcodec = yes ]; then
_lavclib='-Llibavcodec -lavcodec'
_lavcdep='libavcodec/libavcodec.a'
@@ -1844,6 +1859,8 @@
CSS_LIB = $_csslib
CSS_INC = $_cssinc
SDL_INC = $_sdlcflags
+W32_DEP = $_win32dep
+W32_LIB = $_win32lib
DS_DEP = $_dshowdep
DS_LIB = $_dshowlib
AV_DEP = $_lavcdep
@@ -1948,6 +1965,9 @@
/* Define this to enable MPEG 1/2 image postprocessing (requires FAST cpu!) */
#define MPEG12_POSTPROC
+
+/* Win32 DLL support */
+$_win32dll
/* DirectShow support */
$_dshow
Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_audio.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- dec_audio.c 11 Aug 2001 20:37:33 -0000 1.28
+++ dec_audio.c 14 Aug 2001 18:28:56 -0000 1.29
@@ -78,8 +78,8 @@
switch(driver){
case AFM_ACM:
-#ifndef ARCH_X86
- printf("Win32/ACM audio codec unavailable on non-x86 CPU -> force nosound :(\n");
+#ifndef USE_WIN32DLL
+ printf("Win32/ACM audio codec disabled, or unavailable on non-x86 CPU -> force nosound :(\n");
driver=0;
#else
// Win32 ACM audio codec:
@@ -157,7 +157,7 @@
sh_audio->a_buffer_len=0;
switch(driver){
-#ifdef ARCH_X86
+#ifdef USE_WIN32DLL
case AFM_ACM: {
int ret=acm_decode_audio(sh_audio,sh_audio->a_buffer,4096,sh_audio->a_buffer_size);
if(ret<0){
@@ -332,7 +332,7 @@
}
//printf("{3:%d}",avi_header.idx_pos);fflush(stdout);
break;
-#ifdef ARCH_X86
+#ifdef USE_WIN32DLL
case AFM_ACM:
// len=sh_audio->audio_out_minsize; // optimal decoded fragment size
// if(len<minlen) len=minlen; else
Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- dec_video.c 12 Aug 2001 15:46:09 -0000 1.24
+++ dec_video.c 14 Aug 2001 18:28:56 -0000 1.25
@@ -104,7 +104,6 @@
void set_video_quality(sh_video_t *sh_video,int quality){
switch(sh_video->codec->driver){
-#ifdef ARCH_X86
#ifdef USE_DIRECTSHOW
case VFM_DSHOW: {
if(quality<0 || quality>4) quality=4;
@@ -112,7 +111,6 @@
}
break;
#endif
-#endif
#ifdef MPEG12_POSTPROC
case VFM_MPEG: {
if(quality<0 || quality>6) quality=6;
@@ -147,7 +145,7 @@
sh_video->our_out_buffer=NULL;
switch(sh_video->codec->driver){
-#ifdef ARCH_X86
+#ifdef USE_WIN32DLL
case VFM_VFW: {
if(!init_video_codec(sh_video,0)) {
// GUI_MSG( mplUnknowError )
@@ -213,13 +211,13 @@
break;
#endif
}
-#else /* !ARCH_X86 */
+#else /* !USE_WIN32DLL */
case VFM_VFW:
case VFM_DSHOW:
case VFM_VFWEX:
- fprintf(stderr,"MPlayer does not support win32 codecs on non-x86 platforms!\n");
+ fprintf(stderr,"Support for win32 codecs disabled, or unavailable on non-x86 platforms!\n");
return 0;
-#endif /* !ARCH_X86 */
+#endif /* !USE_WIN32DLL */
case VFM_ODIVX: { // OpenDivX
if(verbose) printf("OpenDivX video codec\n");
{ DEC_PARAM dec_param;
@@ -465,7 +463,7 @@
break;
}
#endif
-#ifdef ARCH_X86
+#ifdef USE_WIN32DLL
case VFM_VFWEX:
case VFM_VFW:
{
More information about the MPlayer-cvslog
mailing list