ALT Linux repos
S: | 1.5-alt1.38416.2 |
D: | 1.0-alt35.27330.1 |
5.0: | 1.0-alt35.27654.3 |
4.1: | 1.0-alt35.26470.1 |
4.0: | 1.0-alt35.23722.M40.1 |
Group :: Video
RPM: mplayer
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: mplayer-svn-r27330-ext_ffmpeg.patch
Download
Download
diff -urN mplayer-svn-r27330.orig/configure mplayer-svn-r27330/configure
--- mplayer-svn-r27330.orig/configure 2008-07-21 03:35:30 +0300
+++ mplayer-svn-r27330/configure 2008-07-21 04:03:30 +0300
@@ -297,10 +297,12 @@
--disable-libavcodec_a disable static libavcodec [autodetect]
--disable-libavformat_a disable static libavformat [autodetect]
--disable-libpostproc_a disable static libpostproc [autodetect]
+ --disable-libswscale_a disable static libswscale [autodetect]
--disable-libavutil_so disable shared libavutil [autodetect]
--disable-libavcodec_so disable shared libavcodec [autodetect]
--disable-libavformat_so disable shared libavformat [autodetect]
--disable-libpostproc_so disable shared libpostproc [autodetect]
+ --disable-libswscale_so disable shared libswscale [autodetect]
--disable-libavcodec_mpegaudio_hp disable high precision audio decoding
in libavcodec [enabled]
--disable-tremor-internal disable internal Tremor [enabled]
@@ -518,6 +520,8 @@
_libavformat_so=auto
_libpostproc_a=auto
_libpostproc_so=auto
+_libswscale_a=auto
+_libswscale_so=auto
_libavcodec_mpegaudio_hp=yes
_mencoder=yes
_mplayer=yes
@@ -1076,6 +1080,10 @@
--disable-libpostproc_a) _libpostproc_a=no ;;
--enable-libpostproc_so) _libpostproc_so=yes ;;
--disable-libpostproc_so) _libpostproc_so=no ;;
+ --enable-libswscale_a) _libswscale_a=yes ;;
+ --disable-libswscale_a) _libswscale_a=no ;;
+ --enable-libswscale_so) _libswscale_so=yes ;;
+ --disable-libswscale_so) _libswscale_so=no ;;
--enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp=yes ;;
--disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp=no ;;
@@ -6268,6 +6276,45 @@
fi
echores "$_real"
+echocheck "FFmpeg libswscale"
+if test "$_libswscale_a" = auto ; then
+ if test -d libswascale ; then
+ _libswscale_a=yes
+ _res_comment="static"
+ else
+ die "MPlayer will not compile without libswscale in the source tree."
+ fi
+elif test "$_libswscale_so" != no ; then
+ _libswscale_so=no
+ cat > $TMPC << EOF
+#include <ffmpeg/swscale.h>
+int main(void) { sws_getIdentityVec(); return 0; }
+EOF
+ if $_pkg_config --exists libswscale ; then
+ _inc_libswscale=`$_pkg_config --cflags libswscale`
+ _ld_tmp=`$_pkg_config --libs libswscale`
+ cc_check $_inc_libswscale $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \
+ && _libswscale_so=yes
+ elif cc_check -lswscale $_ld_lm ; then
+ _ld_extra="$_ld_extra -lswscale"
+ _libswscale_so=yes
+ _res_comment="using libswscale.so, but static libswscale is recommended"
+ fi
+fi
+_libswscale=no
+_def_libswscale='#undef USE_LIBSWSCALE'
+_def_libswscale_a='#undef USE_LIBSWSCALE_A'
+_def_libswscale_so='#undef USE_LIBSWSCALE_SO'
+test "$_libswscale_a" = yes || test "$_libswscale_so" = yes && _libswscale=yes
+test "$_libswscale" = yes && _def_libswscale='#define USE_LIBSWSCALE 1'
+test "$_libswscale_a" = yes && _def_libswscale_a='#define USE_LIBSWSCALE_A 1'
+test "$_libswscale_so" = yes && _def_libswscale_so='#define USE_LIBSWSCALE_SO 1'
+# neither static nor shared libswscale is available, but it is mandatory ...
+if test "$_libswscale" = no ; then
+ die "You need static or shared libswscale, MPlayer will not compile without!"
+fi
+echores "$_libswscale"
+
echocheck "QuickTime codecs"
_qtx_emulation=no
@@ -7812,6 +7859,10 @@
LIBPOSTPROC = $_libpostproc
LIBPOSTPROC_A = $_libpostproc_a
LIBPOSTPROC_SO = $_libpostproc_so
+LIBSWSCALE = $_libswscale
+LIBSWSCALE_A = $_libswscale_a
+LIBSWSCALE_SO = $_libswscale_so
+CONFIG_SWSCALE = $_libswscale
BUILD_STATIC=yes
SRC_PATH=..
@@ -8154,6 +8205,10 @@
$_def_libpostproc_a
$_def_libpostproc_so
+$_def_libswscale
+$_def_libswscale_a
+$_def_libswscale_so
+
/* Win32 DLL support */
$_def_win32dll
#define WIN32_PATH "$_win32codecsdir"
diff -urN mplayer-svn-r27330.orig/libmpcodecs/vd_ffmpeg.c mplayer-svn-r27330/libmpcodecs/vd_ffmpeg.c
--- mplayer-svn-r27330.orig/libmpcodecs/vd_ffmpeg.c 2008-05-22 11:22:55 +0300
+++ mplayer-svn-r27330/libmpcodecs/vd_ffmpeg.c 2008-07-21 04:03:30 +0300
@@ -9,6 +9,7 @@
#include "av_opts.h"
#include "libavutil/common.h"
+#include "libavutil/avutil.h"
#include "libavutil/intreadwrite.h"
#include "mpbswap.h"
diff -urN mplayer-svn-r27330.orig/libmpdemux/demux_lavf.c mplayer-svn-r27330/libmpdemux/demux_lavf.c
--- mplayer-svn-r27330.orig/libmpdemux/demux_lavf.c 2008-07-21 03:35:29 +0300
+++ mplayer-svn-r27330/libmpdemux/demux_lavf.c 2008-07-21 04:03:30 +0300
@@ -36,7 +36,6 @@
#include "libavformat/avformat.h"
#include "libavutil/avutil.h"
-#include "libavformat/avi.h"
#include "libavcodec/opt.h"
#include "libavformat/riff.h"
diff -urN mplayer-svn-r27330.orig/Makefile mplayer-svn-r27330/Makefile
--- mplayer-svn-r27330.orig/Makefile 2008-07-21 03:35:30 +0300
+++ mplayer-svn-r27330/Makefile 2008-07-21 04:04:36 +0300
@@ -634,7 +634,7 @@
COMMON_LIBS-$(LIBAVCODEC_A) += libavcodec/libavcodec.a
COMMON_LIBS-$(LIBAVUTIL_A) += libavutil/libavutil.a
COMMON_LIBS-$(LIBPOSTPROC_A) += libpostproc/libpostproc.a
-COMMON_LIBS = libswscale/libswscale.a
+COMMON_LIBS-$(LIBSWSCALE_A) += libswscale/libswscale.a
COMMON_LIBS += $(COMMON_LIBS-yes)
OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)))
@@ -941,8 +941,7 @@
TOOLS/bmovl-test$(EXESUF): -lSDL_image
-TOOLS/subrip$(EXESUF): vobsub.o spudec.o unrar_exec.o libvo/aclib.o \
- libswscale/libswscale.a libavutil/libavutil.a $(TEST_OBJS)
+TOOLS/subrip$(EXESUF): vobsub.o spudec.o unrar_exec.o $(TEST_OBJS) -lswscale
TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32