[Ffmpeg-cvslog] r7945 - in trunk: configure libavcodec/Makefile libavcodec/a52dec.c

Michel Bardiaux mbardiaux
Mon Feb 12 12:16:29 CET 2007


diego wrote:
> Author: diego
> Date: Mon Feb 12 11:05:19 2007
> New Revision: 7945
> 
> Modified:
>    trunk/configure
>    trunk/libavcodec/Makefile
>    trunk/libavcodec/a52dec.c

Please clarify a few things for me. The local copy of liba52 that was in 
the tree remains definitely out, and one always uses an external liba52 
(at least right now). Correct?

> 
> Log:
> Restore the possibility to link liba52 instead of dlopening.
> 
> 
> Modified: trunk/configure
> ==============================================================================
> --- trunk/configure	(original)
> +++ trunk/configure	Mon Feb 12 11:05:19 2007
> @@ -78,6 +78,7 @@
>    echo "  --enable-x11grab         enable X11 grabbing [default=no]"
>    echo "  --enable-dc1394          enable IIDC-1394 grabbing using libdc1394"
>    echo "                           and libraw1394 [default=no]"
> +  echo "  --enable-a52             enable GPLed liba52 support [default=no]"
>    echo "  --enable-a52bin          open liba52.so.0 at runtime [default=no]"

It is far from clear in that help that a52bin requires a52. That seems 
proved by the fact here is only 1 OBJ line below. But there is no code 
anywhere forcing a52, neither code requiring it, when a52bin is used.

>    echo "  --enable-avisynth        allow reading AVISynth script files [default=no]"
>    echo "  --enable-dts             enable GPLed libdts support [default=no]"
> @@ -486,6 +487,7 @@
>      gpl
>      gprof
>      ipv6
> +    liba52
>      liba52bin
>      libdts
>      libfaac
> @@ -595,7 +597,7 @@
>  amr_wb_encoder_deps="amr_wb"
>  dts_decoder_deps="libdts"
>  faac_encoder_deps="libfaac"
> -liba52_decoder_deps="liba52bin"
> +liba52_decoder_deps="liba52"
>  libgsm_decoder_deps="libgsm"
>  libgsm_encoder_deps="libgsm"
>  libtheora_encoder_deps="libtheora"
> @@ -754,6 +756,7 @@
>  dc1394="no"
>  dlfcn_h="no"
>  dlopen="no"
> +liba52="no"
>  liba52bin="no"
>  libdts="no"
>  libfaac="no"
> @@ -1032,6 +1035,8 @@
>    ;;
>    --disable-v4l2) video4linux2="no"
>    ;;
> +  --enable-a52) liba52="yes"
> +  ;;
>    --enable-a52bin) liba52bin="yes"
>    ;;
>    --enable-dts) libdts="yes"
> @@ -1182,7 +1187,7 @@
>          enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
>      }
>      die_gpl_disabled "The Postprocessing code" pp
> -    die_gpl_disabled "liba52"                  liba52bin
> +    die_gpl_disabled "liba52"                  liba52
>      die_gpl_disabled "libxvidcore"             xvid
>      die_gpl_disabled "x264"                    x264
>      die_gpl_disabled "libdts"                  libdts
> @@ -1494,6 +1499,7 @@
>      die "Only one of amr_nb and amr_nb_fixed may be enabled."
>  
>  # these are off by default, so fail if requested and not available
> +enabled liba52     && require liba52 a52dec/a52.h a52_init -la52
>  enabled libdts     && require libdts dts.h dts_init -ldts -lm
>  enabled libgsm     && require libgsm gsm.h gsm_create -lgsm
>  enabled libmp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
> @@ -1815,6 +1821,7 @@
>  fi
>  echo "Sun medialib support      $mlib"
>  echo "AVISynth enabled          $avisynth"
> +echo "liba52 support            $liba52"
>  echo "liba52 dlopened           $liba52bin"
>  echo "libdts support            $libdts"
>  echo "libfaac enabled           $libfaac"
> 
> Modified: trunk/libavcodec/Makefile
> ==============================================================================
> --- trunk/libavcodec/Makefile	(original)
> +++ trunk/libavcodec/Makefile	Mon Feb 12 11:05:19 2007
> @@ -248,7 +248,7 @@
>  OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER)    += adpcm.o
>  
>  # external codec libraries
> -OBJS-$(CONFIG_LIBA52BIN)               += a52dec.o
> +OBJS-$(CONFIG_LIBA52)                  += a52dec.o
>  OBJS-$(CONFIG_LIBDTS)                  += dtsdec.o
>  OBJS-$(CONFIG_LIBFAAC)                 += faac.o
>  OBJS-$(CONFIG_LIBFAAD)                 += faad.o
> 
> Modified: trunk/libavcodec/a52dec.c
> ==============================================================================
> --- trunk/libavcodec/a52dec.c	(original)
> +++ trunk/libavcodec/a52dec.c	Mon Feb 12 11:05:19 2007
> @@ -26,8 +26,11 @@
>  
>  #include "avcodec.h"
>  #include <a52dec/a52.h>
> +
> +#ifdef CONFIG_LIBA52BIN
>  #include <dlfcn.h>
>  static const char* liba52name = "liba52.so.0";
> +#endif
>  
>  /**
>   * liba52 - Copyright (C) Aaron Holtzman
> @@ -79,6 +82,7 @@
>  {
>      AC3DecodeState *s = avctx->priv_data;
>  
> +#ifdef CONFIG_LIBA52BIN
>      s->handle = dlopen(liba52name, RTLD_LAZY);
>      if (!s->handle)
>      {
> @@ -97,6 +101,15 @@
>          dlclose(s->handle);
>          return -1;
>      }
> +#else
> +    s->handle = 0;
> +    s->a52_init = a52_init;
> +    s->a52_samples = a52_samples;
> +    s->a52_syncinfo = a52_syncinfo;
> +    s->a52_frame = a52_frame;
> +    s->a52_block = a52_block;
> +    s->a52_free = a52_free;
> +#endif
>      s->state = s->a52_init(0); /* later use CPU flags */
>      s->samples = s->a52_samples(s->state);
>      s->inbuf_ptr = s->inbuf;
> @@ -226,7 +239,9 @@
>  {
>      AC3DecodeState *s = avctx->priv_data;
>      s->a52_free(s->state);
> +#ifdef CONFIG_LIBA52BIN
>      dlclose(s->handle);
> +#endif
>      return 0;
>  }



-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-cvslog mailing list