diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2005-02-20 09:36:00 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2005-02-20 09:36:00 +0000 |
commit | 5d93f582cc0aafbc66134d46e79d73ab941f6c7e (patch) | |
tree | 257ff2992b8b73b89630b6422ec6618078f08b00 | |
parent | 565585429192250c2c709337af73a38820895a8a (diff) | |
download | xine-lib-5d93f582cc0aafbc66134d46e79d73ab941f6c7e.tar.gz xine-lib-5d93f582cc0aafbc66134d46e79d73ab941f6c7e.tar.bz2 |
**BUGFIX**
Updated documentation about M$VC (building external ffmpeg).
Added patch necessary for using ffmpeg by M$VC compiler.
Updated M$VC build of xine's ff plugin - removed ugly ifdef, used external ffmpeg as whole.
CVS patchset: 7419
CVS date: 2005/02/20 09:36:00
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | doc/README.WIN32 | 11 | ||||
-rw-r--r-- | src/libffmpeg/xine_decoder.h | 12 | ||||
-rw-r--r-- | win32/Makefile.am | 1 | ||||
-rw-r--r-- | win32/scripts/ffmpeg_win32.patch | 80 | ||||
-rw-r--r-- | win32/xineplug_decode_ff.dsp | 12 |
6 files changed, 102 insertions, 15 deletions
@@ -28,6 +28,7 @@ xine-lib (1.0.1) * updated vidix to 0.9.9 * plugin description accessor functions (may load plugins) * fixed translations, they wasn't used in some cases + * MSVC Win32 port update xine-lib (1.0) * unbreak DXR3 plugin diff --git a/doc/README.WIN32 b/doc/README.WIN32 index 725462fb7..8abc80530 100644 --- a/doc/README.WIN32 +++ b/doc/README.WIN32 @@ -113,7 +113,13 @@ How to build xine in M$ Visual C: Under MinGW you can compile ffmpeg for xine by this way: # - # for cross-compiling add "--cross-prefix=i386-mingw32-" + # run the script/patch necessary for MSVC a for xine + # + cd ffmpeg + sh ../xine-lib/win32/scripts/ffmpeg_win32.patch + + # + # for cross-compiling add "--cross-prefix=i386-mingw32-" and "--disable-mmx" # ./configure \ --enable-gpl \ @@ -127,6 +133,9 @@ How to build xine in M$ Visual C: # for cross-compiling finalize linking by running this command in # libavcodec/ directory # + # it's done automatically if you have 'LIB.EXE' linked to 'lib' in your + # $PATH and set wine + # wine LIB.EXE /machine:i386 /def:avcodec.def # diff --git a/src/libffmpeg/xine_decoder.h b/src/libffmpeg/xine_decoder.h index 9005b602e..1c98f7ff1 100644 --- a/src/libffmpeg/xine_decoder.h +++ b/src/libffmpeg/xine_decoder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2004 the xine project + * Copyright (C) 2001-2005 the xine project * * This file is part of xine, a free video player. * @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.h,v 1.4 2004/09/26 22:54:52 valtri Exp $ + * $Id: xine_decoder.h,v 1.5 2005/02/20 09:36:02 valtri Exp $ * */ @@ -34,14 +34,6 @@ # include "libavcodec/avcodec.h" #endif -#ifdef _MSC_VER -# undef malloc -# undef free -# undef realloc -# undef printf -# undef fprintf -#endif - typedef struct ff_codec_s { uint32_t type; enum CodecID id; diff --git a/win32/Makefile.am b/win32/Makefile.am index a8184a787..b19a9d270 100644 --- a/win32/Makefile.am +++ b/win32/Makefile.am @@ -4,6 +4,7 @@ SUBDIRS = contrib include EXTRA_DIST = \ scripts/move_xine_fonts.bat \ + scripts/ffmpeg_win32.patch \ README \ libdvdnav.def \ libxine.def \ diff --git a/win32/scripts/ffmpeg_win32.patch b/win32/scripts/ffmpeg_win32.patch new file mode 100644 index 000000000..b2f653153 --- /dev/null +++ b/win32/scripts/ffmpeg_win32.patch @@ -0,0 +1,80 @@ +#! /bin/sh + +# +# Fix cross build with SDL. +# Install also dvdata.h. +# Patching script for M$VC clients. +# + +patch -p0 < $0 +cp libavcodec/avcodec.h libavcodec/avcodec.h.dllimports; sed libavcodec/avcodec.h.dllimports -e 's/extern AVCodec/_DL_IMPORT extern AVCodec/' > libavcodec/avcodec.h + +exit 0 +Index: configure +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v +retrieving revision 1.159 +diff -u -p -u -p -r1.159 configure +--- configure 21 Jan 2005 22:16:04 -0000 1.159 ++++ configure 19 Feb 2005 16:15:29 -0000 +@@ -942,9 +942,10 @@ EOF + + sdl_too_old=no + sdl=no +-if (sdl-config --version) >/dev/null 2>&1 ; then +-if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` > /dev/null 2>&1 ; then +-_sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` ++SDL_CONFIG="${cross_prefix}sdl-config" ++if ("${SDL_CONFIG}" --version) >/dev/null 2>&1 ; then ++if $cc -o $TMPE `"${SDL_CONFIG}" --cflags` $TMPC `"${SDL_CONFIG}" --libs` > /dev/null 2>&1 ; then ++_sdlversion=`"${SDL_CONFIG}" --version | sed 's/[^0-9]//g'` + if test "$_sdlversion" -lt 121 ; then + sdl_too_old=yes + else +@@ -1225,8 +1226,8 @@ if test "$pthreads" = "yes" ; then + fi + if test "$sdl" = "yes" ; then + echo "CONFIG_SDL=yes" >> config.mak +- echo "SDL_LIBS=`sdl-config --libs`" >> config.mak +- echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak ++ echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak ++ echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak + fi + if test "$texi2html" = "yes"; then + echo "BUILD_DOC=yes" >> config.mak +Index: libavcodec/Makefile +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v +retrieving revision 1.167 +diff -u -p -u -p -r1.167 Makefile +--- libavcodec/Makefile 22 Jan 2005 17:52:00 -0000 1.167 ++++ libavcodec/Makefile 19 Feb 2005 16:15:29 -0000 +@@ -313,6 +313,7 @@ install-headers: + install -m 644 $(SRC_PATH)/libavcodec/avcodec.h \ + $(SRC_PATH)/libavcodec/common.h \ + $(SRC_PATH)/libavcodec/rational.h \ ++ $(SRC_PATH)/libavcodec/dvdata.h \ + "$(prefix)/include/ffmpeg" + + # +Index: libavcodec/common.h +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/common.h,v +retrieving revision 1.145 +diff -u -p -u -p -r1.145 common.h +--- libavcodec/common.h 12 Jan 2005 01:44:01 -0000 1.145 ++++ libavcodec/common.h 19 Feb 2005 16:15:29 -0000 +@@ -64,6 +64,13 @@ extern const struct AVOption avoptions_w + + #endif /* HAVE_AV_CONFIG_H */ + ++/* for MSVC clients */ ++#if !defined(HAVE_AV_CONFIG_H) && defined(_MSC_VER) ++# define _DL_IMPORT __declspec(dllimport) ++#else ++# define _DL_IMPORT ++#endif ++ + /* Suppress restrict if it was not defined in config.h. */ + #ifndef restrict + # define restrict diff --git a/win32/xineplug_decode_ff.dsp b/win32/xineplug_decode_ff.dsp index 34873bb97..b9fdfef85 100644 --- a/win32/xineplug_decode_ff.dsp +++ b/win32/xineplug_decode_ff.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Target_Dir ""
LIB32=link.exe
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XINEPLUG_DECODE_FF_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../lib" /I "../include" /I "include" /I "include/msvc" /I "contrib/pthreads" /I "../src/xine-engine" /I "../src" /I "../src/xine-utils" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XINEPLUG_DECODE_FF_EXPORTS" /D "XINE_COMPILE" /D "SIMPLE_IDCT" /D "HAVE_AV_CONFIG_H" /D "RUNTIME_CPUDETECT" /D "USE_FASTMEMCPY" /D "CONFIG_RISKY" /D "CONFIG_DECODERS" /D "XINE_MPEG_ENCODER" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../lib" /I "../include" /I "include" /I "include/msvc" /I "contrib/pthreads" /I "../src/xine-engine" /I "../src" /I "../src/xine-utils" /I "../../ffmpeg/include/ffmpeg" /I "../../ffmpeg/include/postproc" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HAVE_CONFIG_H" /D "HAVE_FFMPEG" /D "XINEPLUG_DECODE_FF_EXPORTS" /D "XINE_COMPILE" /D "SIMPLE_IDCT" /D "RUNTIME_CPUDETECT" /D "USE_FASTMEMCPY" /D "CONFIG_RISKY" /D "CONFIG_DECODERS" /D "XINE_MPEG_ENCODER" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 avcodec.lib /nologo /dll /machine:I386 /out:"Release/bin/plugins/xineplug_decode_ff.dll" /libpath:"Release"
+# ADD LINK32 avcodec.lib /nologo /dll /machine:I386 /out:"Release/bin/plugins/xineplug_decode_ff.dll" /libpath:"Release" /libpath:"../../ffmpeg/"
!ELSEIF "$(CFG)" == "xineplug_decode_ff - Win32 Debug"
@@ -71,7 +71,7 @@ LINK32=link.exe # PROP Target_Dir ""
LIB32=link.exe
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XINEPLUG_DECODE_FF_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../lib" /I "../include" /I "include" /I "include/msvc" /I "contrib/pthreads" /I "../src/xine-engine" /I "../src" /I "../src/xine-utils" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XINEPLUG_DECODE_FF_EXPORTS" /D "XINE_COMPILE" /D "SIMPLE_IDCT" /D "HAVE_AV_CONFIG_H" /D "RUNTIME_CPUDETECT" /D "USE_FASTMEMCPY" /D "CONFIG_RISKY" /D "CONFIG_DECODERS" /D "XINE_MPEG_ENCODER" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../lib" /I "../include" /I "include" /I "include/msvc" /I "contrib/pthreads" /I "../src/xine-engine" /I "../src" /I "../src/xine-utils" /I "../../ffmpeg/include/ffmpeg" /I "../../ffmpeg/include/postproc" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HAVE_CONFIG_H" /D "HAVE_FFMPEG" /D "XINEPLUG_DECODE_FF_EXPORTS" /D "XINE_COMPILE" /D "SIMPLE_IDCT" /D "RUNTIME_CPUDETECT" /D "USE_FASTMEMCPY" /D "CONFIG_RISKY" /D "CONFIG_DECODERS" /D "XINE_MPEG_ENCODER" /FD /GZ /c
# SUBTRACT CPP /X /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
@@ -82,7 +82,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 avcodec.lib /nologo /dll /debug /machine:I386 /out:"Debug/bin/plugins/xineplug_decode_ff.dll" /pdbtype:sept /libpath:"Debug"
+# ADD LINK32 avcodec.lib /nologo /dll /debug /machine:I386 /out:"Debug/bin/plugins/xineplug_decode_ff.dll" /pdbtype:sept /libpath:"Debug" /libpath:"../../ffmpeg/"
!ENDIF
@@ -99,6 +99,10 @@ SOURCE=..\src\libffmpeg\audio_decoder.c # End Source File
# Begin Source File
+SOURCE=..\src\libffmpeg\mpeg_parser.c
+# End Source File
+# Begin Source File
+
SOURCE=..\src\libffmpeg\video_decoder.c
# End Source File
# Begin Source File
|