[MPlayer-dev-eng] [PATCH] fix AMR support
Andrew Wason
rectalogic at rectalogic.com
Fri Jul 17 02:36:11 CEST 2009
libavcodec has switched to opencore-amr for AMR. Attached patch adds
support for this to MPlayer.
Andrew
-------------- next part --------------
Index: configure
===================================================================
--- configure (revision 29418)
+++ configure (working copy)
@@ -7065,10 +7065,10 @@
if test "$_libamr_nb" = auto ; then
_libamr_nb=no
cat > $TMPC << EOF
-#include <amrnb/sp_dec.h>
-int main(void) { Speech_Decode_Frame_init(); return 0; }
+#include <opencore-amrnb/interf_dec.h>
+int main(void) { Decoder_Interface_init(); return 0; }
EOF
- cc_check -lamrnb && _libamr_nb=yes
+ cc_check -lopencore-amrnb && _libamr_nb=yes
if test "$_libavcodec_a" != yes ; then
_libamr_nb=no
_res_comment="libavcodec (static) is required by libamr_nb, sorry"
@@ -7076,14 +7076,13 @@
fi
if test "$_libamr_nb" = yes ; then
_libamr=yes
- extra_ldflags="$extra_ldflags -lamrnb"
- def_libamr='#define CONFIG_LIBAMR 1'
- def_libamr_nb='#define CONFIG_LIBAMR_NB 1'
- _libavdecoders="$_libavdecoders LIBAMR_NB_DECODER"
- _libavencoders="$_libavencoders LIBAMR_NB_ENCODER"
+ extra_ldflags="$extra_ldflags -lopencore-amrnb"
+ def_libamr_nb='#define CONFIG_LIBOPENCORE_AMRNB 1'
+ _libavdecoders="$_libavdecoders LIBOPENCORE_AMRNB_DECODER"
+ _libavencoders="$_libavencoders LIBOPENCORE_AMRNB_DECODER"
_codecmodules="libamr_nb $_codecmodules"
else
- def_libamr_nb='#define CONFIG_LIBAMR_NB 0'
+ def_libamr_nb='#define CONFIG_LIBOPENCORE_AMRNB 0'
_nocodecmodules="libamr_nb $_nocodecmodules"
fi
echores "$_libamr_nb"
@@ -7093,10 +7092,10 @@
if test "$_libamr_wb" = auto ; then
_libamr_wb=no
cat > $TMPC << EOF
-#include <amrwb/dec_if.h>
+#include <opencore-amrwb/dec_if.h>
int main(void) { D_IF_init(); return 0; }
EOF
- cc_check -lamrwb && _libamr_wb=yes
+ cc_check -lopencore-amrwb && _libamr_wb=yes
if test "$_libavcodec_a" != yes ; then
_libamr_wb=no
_res_comment="libavcodec (static) is required by libamr_wb, sorry"
@@ -7104,14 +7103,13 @@
fi
if test "$_libamr_wb" = yes ; then
_libamr=yes
- extra_ldflags="$extra_ldflags -lamrwb"
- def_libamr='#define CONFIG_LIBAMR 1'
- def_libamr_wb='#define CONFIG_LIBAMR_WB 1'
- _libavdecoders="$_libavdecoders LIBAMR_WB_DECODER"
- _libavencoders="$_libavencoders LIBAMR_WB_ENCODER"
+ extra_ldflags="$extra_ldflags -lopencore-amrwb"
+ def_libamr_wb='#define CONFIG_LIBOPENCORE_AMRWB 1'
+ _libavdecoders="$_libavdecoders LIBOPENCORE_AMRWB_DECODER"
+ _libavencoders="$_libavencoders LIBOPENCORE_AMRWB_DECODER"
_codecmodules="libamr_wb $_codecmodules"
else
- def_libamr_wb='#define CONFIG_LIBAMR_WB 0'
+ def_libamr_wb='#define LIBOPENCORE_AMRWB 0'
_nocodecmodules="libamr_wb $_nocodecmodules"
fi
echores "$_libamr_wb"
@@ -8393,9 +8391,8 @@
CONFIG_BZLIB=$bzlib
CONFIG_ENCODERS=yes
CONFIG_GPL=yes
-CONFIG_LIBAMR=$_libamr
-CONFIG_LIBAMR_NB=$_libamr_nb
-CONFIG_LIBAMR_WB=$_libamr_wb
+CONFIG_LIBOPENCORE_AMRNB=$_libamr_nb
+CONFIG_LIBOPENCORE_AMRWB=$_libamr_wb
CONFIG_LIBDIRAC=$_libdirac_lavc
CONFIG_LIBFAAC=$_faac_lavc
CONFIG_LIBMP3LAME=$_mp3lame_lavc
@@ -8851,7 +8848,6 @@
#define CONFIG_GPL 1
#define CONFIG_GRAY 0
#define CONFIG_HARDCODED_TABLES 0
-#define CONFIG_LIBAMR_NB_FIXED 0
#define CONFIG_LIBVORBIS 0
#define CONFIG_POWERPC_PERF 0
#define CONFIG_SMALL 0
@@ -8882,7 +8878,6 @@
/* External libraries used through libavcodec. */
$def_faac_lavc
-$def_libamr
$def_libamr_nb
$def_libamr_wb
$def_libdirac_lavc
Index: etc/codecs.conf
===================================================================
--- etc/codecs.conf (revision 29418)
+++ etc/codecs.conf (working copy)
@@ -3840,7 +3840,7 @@
fourcc samr
format 0x57 ;amr in avi
driver ffmpeg
- dll "libamr_nb"
+ dll "libopencore_amrnb"
audiocodec ffamrwb
info "AMR Wideband"
@@ -3848,7 +3848,7 @@
fourcc sawb
format 0x58 ;amr in avi
driver ffmpeg
- dll "libamr_wb"
+ dll "libopencore_amrwb"
audiocodec ffadcpmswf
info "FFmpeg's ADPCM Flash-variant"
More information about the MPlayer-dev-eng
mailing list