[PATCH] mplayer - obsługa amr_nb (dźwięk z filmów z tel.kom.)
Michal Kochanowicz
michal at michal.waw.pl
Sat Feb 18 18:13:35 CET 2006
Hej
Załączone łatki dodają obsługę kodeka dźwięku amr (narrow band)
używanego przez telefony komórkowe.
Special bonus greetings: qboosh za objaśnienia do libtool'a
Special bonus f.*ckings: autorzy mplayer'a za użycie własnej kopii
ffmpeg (oczywiście najpierw połatałem dzielonego i się dziwiłem że
mplayer tego nie widzi).
--
--= Michal Kochanowicz =--==--==BOFH==--==--= michal at michal.waw.pl =--
--= finger me for PGP public key or visit http://michal.waw.pl/PGP =--
--==--==--==--==--==-- Vodka. Connecting people.--==--==--==--==--==--
A chodzenie po górach SSIE!!!
-------------- next part --------------
diff -ur MPlayer-1.0pre7try2.orig/Makefile MPlayer-1.0pre7try2/Makefile
--- MPlayer-1.0pre7try2.orig/Makefile 2006-02-18 15:19:55.000000000 +0100
+++ MPlayer-1.0pre7try2/Makefile 2006-02-18 17:35:36.000000000 +0100
@@ -246,7 +246,7 @@
ifeq ($(TARGET_WIN32),yes)
windres -o osdep/mplayer-rc.o osdep/mplayer.rc
endif
- $(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) $(I18NLIBS) $(MATH_LIB)
+ $(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(AMRNB_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) $(I18NLIBS) $(MATH_LIB)
mplayer.exe.spec.c: libmpcodecs/libmpcodecs.a
winebuild -fPIC -o mplayer.exe.spec.c -exe mplayer.exe -mcui \
@@ -254,14 +254,14 @@
-L/usr/local/lib/wine -lkernel32
mplayer.exe.so: $(MPLAYER_DEP) mplayer.exe.spec.c
- $(CC) $(CFLAGS) -Wall -shared -Wl,-rpath,/usr/local/lib -Wl,-Bsymbolic -o mplayer.exe.so $(OBJS_MPLAYER) mplayer.exe.spec.c libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) -lwine $(MATH_LIB)
+ $(CC) $(CFLAGS) -Wall -shared -Wl,-rpath,/usr/local/lib -Wl,-Bsymbolic -o mplayer.exe.so $(OBJS_MPLAYER) mplayer.exe.spec.c libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(AMRNB_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) -lwine $(MATH_LIB)
mplayer_wine.so: $(MPLAYER_DEP)
- $(CC) $(CFLAGS) -shared -Wl,-Bsymbolic -o mplayer_wine.so mplayer_wine.spec.c $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) -lwine $(ARCH_LIB) $(MATH_LIB)
+ $(CC) $(CFLAGS) -shared -Wl,-Bsymbolic -o mplayer_wine.so mplayer_wine.spec.c $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(AMRNB_LIB) $(LIRCC_LIB) $(STATIC_LIB) -lwine $(ARCH_LIB) $(MATH_LIB)
ifeq ($(MENCODER),yes)
$(PRG_MENCODER): $(MENCODER_DEP)
- $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) libmpcodecs/libmpencoders.a $(ENCORE_LIB) $(COMMON_LIBS) $(EXTRA_LIB) $(MLIB_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(ARCH_LIB) $(I18NLIBS) $(MATH_LIB)
+ $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) libmpcodecs/libmpencoders.a $(ENCORE_LIB) $(COMMON_LIBS) $(EXTRA_LIB) $(MLIB_LIB) $(LIRC_LIB) $(AMRNB_LIB) $(LIRCC_LIB) $(ARCH_LIB) $(I18NLIBS) $(MATH_LIB)
endif
codecs.conf.h: $(PRG_CFG) etc/codecs.conf
diff -ur MPlayer-1.0pre7try2.orig/configure MPlayer-1.0pre7try2/configure
--- MPlayer-1.0pre7try2.orig/configure 2006-02-18 15:19:56.000000000 +0100
+++ MPlayer-1.0pre7try2/configure 2006-02-18 17:37:04.000000000 +0100
@@ -5830,6 +5830,7 @@
fi
fi
if test "$_amr_nb" = yes ; then
+ _ld_amrnb='-lamrnb'
_def_amr_nb='#define AMR_NB 1'
else
_def_amr_nb='#undef AMR_NB'
@@ -6851,6 +6852,7 @@
# input/demuxer/codecs
TERMCAP_LIB = $_ld_termcap
LIRC_LIB = $_ld_lirc
+AMRNB_LIB = $_ld_amrnb
LIRCC_LIB = $_ld_lircc
DVDREAD_LIB = $_ld_dvdread
DVDKIT = $_dvdkit
diff -ur MPlayer-1.0pre7try2.orig/libavcodec/Makefile MPlayer-1.0pre7try2/libavcodec/Makefile
--- MPlayer-1.0pre7try2.orig/libavcodec/Makefile 2006-02-18 15:19:55.000000000 +0100
+++ MPlayer-1.0pre7try2/libavcodec/Makefile 2006-02-18 17:17:55.000000000 +0100
@@ -34,7 +34,7 @@
CLEANAMR=cleanamr
else
AMROBJS= amr.o
-OBJS+= amr_float/sp_dec.o amr_float/sp_enc.o amr_float/interf_dec.o amr_float/interf_enc.o
+#OBJS+= amr_float/sp_dec.o amr_float/sp_enc.o amr_float/interf_dec.o amr_float/interf_enc.o
CLEANAMR=cleanamrfloat
endif
endif
diff -ur MPlayer-1.0pre7try2.orig/libavcodec/amr.c MPlayer-1.0pre7try2/libavcodec/amr.c
--- MPlayer-1.0pre7try2.orig/libavcodec/amr.c 2005-04-16 22:41:13.000000000 +0200
+++ MPlayer-1.0pre7try2/libavcodec/amr.c 2006-02-18 17:20:50.000000000 +0100
@@ -59,16 +59,16 @@
#define MMS_IO
-#include "amr/sp_dec.h"
-#include "amr/d_homing.h"
-#include "amr/typedef.h"
-#include "amr/sp_enc.h"
-#include "amr/sid_sync.h"
-#include "amr/e_homing.h"
+#include "amrnb/sp_dec.h"
+#include "amrnb/d_homing.h"
+#include "amrnb/typedef.h"
+#include "amrnb/sp_enc.h"
+#include "amrnb/sid_sync.h"
+/*#include "amrnb/e_homing.h"*/
#else
-#include "amr_float/interf_dec.h"
-#include "amr_float/interf_enc.h"
+#include "amrnb/interf_dec.h"
+#include "amrnb/interf_enc.h"
#endif
/* Common code for fixed and float version*/
-------------- next part --------------
Index: mplayer.spec
===================================================================
RCS file: /cvsroot/SPECS/mplayer.spec,v
retrieving revision 1.316
diff -u -r1.316 mplayer.spec
--- mplayer.spec 13 Feb 2006 20:58:15 -0000 1.316
+++ mplayer.spec 18 Feb 2006 17:13:19 -0000
@@ -69,7 +69,7 @@
Summary(pt_BR): Reprodutor de filmes
Name: mplayer
Version: 1.0
-%define _rel 5.5
+%define _rel 5.6
Release: 2.%{pre}.%{_rel}
# DO NOT increase epoch unless it's really neccessary!
# especially such changes like pre7->pre7try2, increase Release instead!
@@ -110,6 +110,7 @@
Patch14: %{name}-shared.patch
Patch15: %{name}-xvmc.patch
Patch16: %{name}-kill-mabi_altivec.patch
+Patch17: %{name}-amrnb.patch
#http://www.openchrome.org/snapshots/mplayer/
URL: http://www.mplayerhq.hu/
%{?with_directfb:BuildRequires: DirectFB-devel}
@@ -122,6 +123,7 @@
%endif
%{?with_aalib:BuildRequires: aalib-devel}
%{?with_alsa:BuildRequires: alsa-lib-devel}
+BuildRequires: amrnb-devel
%{?with_arts:BuildRequires: artsc-devel}
BuildRequires: audiofile-devel
BuildRequires: cdparanoia-III-devel
@@ -309,6 +311,7 @@
%endif
%patch15 -p0
%patch16 -p1
+%patch17 -p1
# kill evil file, hackery not needed with llh
echo > osdep/kerneltwosix.h
@@ -334,6 +337,7 @@
--confdir=%{_sysconfdir}/mplayer \
--with-x11incdir=%{_prefix}/X11R6/include \
--with-extraincdir=%{_includedir}/xvid \
+ --enable-amr_nb \
--enable-menu \
%ifnarch %{ix86} %{x8664}
--disable-mmx \
More information about the pld-devel-pl
mailing list