changeset 31563:1474401afe45

Support decoding and encoding via libgsm via libavcodec.
author reimar
date Sat, 03 Jul 2010 20:54:54 +0000
parents 3ce8c7b9b925
children 480cdba9e480
files configure etc/codecs.conf
diffstat 2 files changed, 37 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Jul 03 09:58:13 2010 +0000
+++ b/configure	Sat Jul 03 20:54:54 2010 +0000
@@ -345,6 +345,7 @@
   --enable-tremor           enable external Tremor [autodetect]
   --disable-libvorbis       disable libvorbis support [autodetect]
   --disable-speex           disable Speex support [autodetect]
+  --disable-libgsm          disable libgsm support [autodetect]
   --enable-theora           enable OggTheora libraries [autodetect]
   --enable-faad             enable external FAAD2 (AAC) [autodetect]
   --disable-faad-internal   disable internal FAAD2 (AAC) [autodetect]
@@ -656,6 +657,7 @@
 _tremor_low=no
 _libvorbis=auto
 _speex=auto
+_libgsm=auto
 _theora=auto
 _mpg123=auto
 _mp3lib=auto
@@ -1044,6 +1046,8 @@
   --disable-libvorbis)  _libvorbis=no   ;;
   --enable-speex)       _speex=yes      ;;
   --disable-speex)      _speex=no       ;;
+  --enable-libgsm)      _libgsm=yes     ;;
+  --disable-libgsm)     _libgsm=no      ;;
   --enable-tremor)      _tremor=yes     ;;
   --disable-tremor)     _tremor=no      ;;
   --enable-tremor-internal)     _tremor_internal=yes    ;;
@@ -6607,6 +6611,27 @@
 fi
 echores "$_speex"
 
+echocheck "libgsm"
+if test "$_libgsm" = auto ; then
+  _libgsm=no
+  cat > $TMPC << EOF
+#include <gsm/gsm.h>
+int main(void) { gsm_create(); return 0; }
+EOF
+  cc_check -lgsm && _libgsm=yes
+fi
+if test "$_libgsm" = yes ; then
+  def_libgsm='#define CONFIG_LIBGSM 1'
+  extra_ldflags="$extra_ldflags -lgsm"
+  _libavencoders="$_libavencoders LIBGSM_ENCODER LIBGSM_MS_ENCODER"
+  _libavdecoders="$_libavdecoders LIBGSM_DECODER LIBGSM_MS_DECODER"
+  codecmodules="libgsm $codecmodules"
+else
+  def_libgsm='#define CONFIG_LIBGSM 0'
+  nocodecmodules="libgsm $nocodecmodules"
+fi
+echores "$_libgsm"
+
 echocheck "OggTheora support"
 if test "$_theora" = auto ; then
   _theora=no
@@ -8951,6 +8976,7 @@
 $def_mpg123
 $def_musepack
 $def_speex
+$def_libgsm
 $def_theora
 $def_toolame
 $def_tremor
--- a/etc/codecs.conf	Sat Jul 03 09:58:13 2010 +0000
+++ b/etc/codecs.conf	Sat Jul 03 20:54:54 2010 +0000
@@ -4283,6 +4283,17 @@
   driver acm
   dll "imaadp32.acm"
 
+audiocodec libgsmms
+  info "libgsm MS GSM"
+  status working
+  format 0x31
+  format 0x32
+  format 0x204D5347
+  format 0x1500
+  fourcc agsm
+  driver ffmpeg
+  dll "libgsm_ms"
+
 audiocodec msgsm
   info "MS GSM"
   status working