changeset 34952:2a982b69303b

Initial libopus decoding support.
author cehoyos
date Sun, 22 Jul 2012 21:26:51 +0000
parents 75c3f928afdd
children 359ceed74184
files configure etc/codecs.conf libmpdemux/mp_taglists.c
diffstat 3 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sun Jul 22 14:57:52 2012 +0000
+++ b/configure	Sun Jul 22 21:26:51 2012 +0000
@@ -441,6 +441,7 @@
   --disable-ladspa          disable LADSPA plugin support [autodetect]
   --disable-libbs2b         disable libbs2b audio filter support [autodetect]
   --disable-libdv           disable libdv 0.9.5 en/decoding support [autodetect]
+  --disable-libopus         disable libopus decoding support [autodetect]
   --disable-mpg123          disable libmpg123 MP3 decoding support [autodetect]
   --disable-mad             disable libmad (MPEG audio) support [autodetect]
   --disable-mp3lame         disable LAME MP3 encoding support [autodetect]
@@ -758,6 +759,7 @@
 _faac_lavc=auto
 _ladspa=auto
 _libbs2b=auto
+_libopus=auto
 _xmms=no
 _vcd=auto
 _bluray=auto
@@ -1169,6 +1171,8 @@
   --disable-ladspa)     _ladspa=no      ;;
   --enable-libbs2b)     _libbs2b=yes    ;;
   --disable-libbs2b)    _libbs2b=no     ;;
+  --enable-libopus)     _libopus=yes    ;;
+  --disable-libopus)    _libopus=no     ;;
   --enable-xmms)        _xmms=yes       ;;
   --disable-xmms)       _xmms=no        ;;
   --enable-vcd)         _vcd=yes        ;;
@@ -6497,6 +6501,27 @@
 echores "$_faad"
 
 
+echocheck "libopus decoding support"
+if test "$_libopus" = auto ; then
+  _libopus=no
+  if $_pkg_config --exists 'opus' ; then
+    statement_check opus_multistream.h 'opus_multistream_decoder_create(0,0,0,0,0,0)' $($_pkg_config --libs --cflags opus) &&
+      _libopus=yes
+  fi
+fi
+if test "$_libopus" = yes ; then
+  def_libopus='#define CONFIG_LIBOPUS 1'
+  libavdecoders="$libavdecoders LIBOPUS_DECODER"
+  extra_cflags="$extra_cflags $($_pkg_config --cflags opus)"
+  extra_ldflags="$extra_ldflags $($_pkg_config --libs opus)"
+  codecmodules="libopus $codecmodules"
+else
+  nocodecmodules="libopus $nocodecmodules"
+  def_libopus='#undef CONFIG_LIBOPUS'
+fi
+echores "$_libopus"
+
+
 echocheck "LADSPA plugin support"
 if test "$_ladspa" = auto ; then
   _ladspa=no
@@ -8493,6 +8518,7 @@
 $def_liblzo
 $def_libmpeg2
 $def_libmpeg2_internal
+$def_libopus
 $def_mad
 $def_mp3lame
 $def_mp3lame_preset
--- a/etc/codecs.conf	Sun Jul 22 14:57:52 2012 +0000
+++ b/etc/codecs.conf	Sun Jul 22 21:26:51 2012 +0000
@@ -5471,6 +5471,13 @@
   driver ffmpeg
   dll "vmdaudio"
 
+audiocodec fflibopus
+  info "FFmpeg libopus"
+  status working
+  fourcc opus ; internal MPlayer FourCC
+  driver ffmpeg
+  dll libopus
+
 audiocodec ffvorbis
   info "FFmpeg Vorbis"
   status working
--- a/libmpdemux/mp_taglists.c	Sun Jul 22 14:57:52 2012 +0000
+++ b/libmpdemux/mp_taglists.c	Sun Jul 22 21:26:51 2012 +0000
@@ -59,6 +59,7 @@
     { CODEC_ID_MUSEPACK7,         MKTAG('M', 'P', 'C', ' ')},
     { CODEC_ID_MUSEPACK8,         MKTAG('M', 'P', 'C', '8')},
     { CODEC_ID_NELLYMOSER,        MKTAG('n', 'm', 'o', 's')},
+    { CODEC_ID_OPUS,              MKTAG('o', 'p', 'u', 's')},
     { CODEC_ID_PCM_LXF,           MKTAG('P', 'L', 'X', 'F')},
     { CODEC_ID_PCM_S16LE_PLANAR,  MKTAG('1', '6', 'P', 'L')},
     { CODEC_ID_QCELP,             MKTAG('Q', 'c', 'l', 'p')},