Commit 5e7b466d authored by Gildas Bazin's avatar Gildas Bazin

* New AC3 decoder plugin using liba52 from Aaron Holtzman and
    Michel Lespinasse.
    This plugin isn't used by default, you have to specify:
    --ac3_adec liba52
parent 6aeeca6d
...@@ -34,6 +34,7 @@ PLUGINS_DIR := ac3_adec \ ...@@ -34,6 +34,7 @@ PLUGINS_DIR := ac3_adec \
idct \ idct \
imdct \ imdct \
kde \ kde \
liba52_adec \
lpcm_adec \ lpcm_adec \
macosx \ macosx \
mad \ mad \
...@@ -93,6 +94,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \ ...@@ -93,6 +94,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
imdct/imdct3dn \ imdct/imdct3dn \
imdct/imdctsse \ imdct/imdctsse \
kde/kde \ kde/kde \
liba52_adec/liba52_adec \
lpcm_adec/lpcm_adec \ lpcm_adec/lpcm_adec \
macosx/macosx \ macosx/macosx \
mad/mad \ mad/mad \
......
...@@ -84,6 +84,7 @@ LIB_IMDCT = @LIB_IMDCT@ ...@@ -84,6 +84,7 @@ LIB_IMDCT = @LIB_IMDCT@
LIB_IMDCT3DN = @LIB_IMDCT3DN@ LIB_IMDCT3DN = @LIB_IMDCT3DN@
LIB_IMDCTSSE = @LIB_IMDCTSSE@ LIB_IMDCTSSE = @LIB_IMDCTSSE@
LIB_KDE = @LIB_KDE@ LIB_KDE = @LIB_KDE@
LIB_LIBA52_ADEC = @LIB_LIBA52_ADEC@
LIB_LIBDVDCSS = @LIB_LIBDVDCSS@ LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
LIB_LIBDVDREAD = @LIB_LIBDVDREAD@ LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
LIB_MACOSX = @LIB_MACOSX@ LIB_MACOSX = @LIB_MACOSX@
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1060,6 +1060,19 @@ AC_ARG_ENABLE(qnx, ...@@ -1060,6 +1060,19 @@ AC_ARG_ENABLE(qnx,
]) ])
fi fi
dnl
dnl Liba52 AC3 decoder plugin
dnl
AC_ARG_ENABLE(liba52,
[ --disable-liba52 AC3 support with liba52 (default enabled)])
if ((test "x$enableval" != "xno") && (test x$SYS != xmingw32))
then
AC_CHECK_HEADERS(a52dec/a52.h, [
PLUGINS="${PLUGINS} liba52_adec"
LIB_LIBA52_ADEC="-la52"
],[])
fi
dnl dnl
dnl Linux framebuffer module dnl Linux framebuffer module
dnl dnl
...@@ -1498,6 +1511,7 @@ AC_SUBST(LIB_IMDCT) ...@@ -1498,6 +1511,7 @@ AC_SUBST(LIB_IMDCT)
AC_SUBST(LIB_IMDCT3DN) AC_SUBST(LIB_IMDCT3DN)
AC_SUBST(LIB_IMDCTSSE) AC_SUBST(LIB_IMDCTSSE)
AC_SUBST(LIB_KDE) AC_SUBST(LIB_KDE)
AC_SUBST(LIB_LIBA52_ADEC)
AC_SUBST(LIB_LIBDVDCSS) AC_SUBST(LIB_LIBDVDCSS)
AC_SUBST(LIB_LIBDVDREAD) AC_SUBST(LIB_LIBDVDREAD)
AC_SUBST(LIB_MACOSX) AC_SUBST(LIB_MACOSX)
......
...@@ -278,8 +278,9 @@ ...@@ -278,8 +278,9 @@
* - long, in order to perform the buffer calculations as few as possible */ * - long, in order to perform the buffer calculations as few as possible */
#define AOUT_BUFFER_DURATION 100000 #define AOUT_BUFFER_DURATION 100000
/* Environment variable for MPEG audio decoder */ /* Environment variable for audio decoders */
#define ADEC_MPEG_VAR "vlc_mpeg_adec" #define ADEC_MPEG_VAR "vlc_mpeg_adec"
#define ADEC_AC3_VAR "vlc_ac3_adec"
/***************************************************************************** /*****************************************************************************
* Video configuration * Video configuration
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders * input_dec.c: Functions for the management of decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: input_dec.c,v 1.24 2002/01/21 23:57:46 massiot Exp $ * $Id: input_dec.c,v 1.25 2002/02/05 21:46:41 gbazin Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -56,6 +56,10 @@ vlc_thread_t input_RunDecoder( input_thread_t * p_input, ...@@ -56,6 +56,10 @@ vlc_thread_t input_RunDecoder( input_thread_t * p_input,
{ {
psz_plugin = main_GetPszVariable( ADEC_MPEG_VAR, NULL ); psz_plugin = main_GetPszVariable( ADEC_MPEG_VAR, NULL );
} }
if( p_es->i_type == AC3_AUDIO_ES )
{
psz_plugin = main_GetPszVariable( ADEC_AC3_VAR, NULL );
}
p_es->p_module = module_Need( MODULE_CAPABILITY_DECODER, psz_plugin, &probedata ); p_es->p_module = module_Need( MODULE_CAPABILITY_DECODER, psz_plugin, &probedata );
if( p_es->p_module == NULL ) if( p_es->p_module == NULL )
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* and spawn threads. * and spawn threads.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: main.c,v 1.146 2002/01/21 00:52:07 sam Exp $ * $Id: main.c,v 1.147 2002/02/05 21:46:41 gbazin Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -132,12 +132,13 @@ ...@@ -132,12 +132,13 @@
#define OPT_STATS 194 #define OPT_STATS 194
#define OPT_MPEG_ADEC 200 #define OPT_MPEG_ADEC 200
#define OPT_AC3_ADEC 201
#define OPT_NOMMX 201 #define OPT_NOMMX 210
#define OPT_NO3DNOW 202 #define OPT_NO3DNOW 211
#define OPT_NOMMXEXT 203 #define OPT_NOMMXEXT 212
#define OPT_NOSSE 204 #define OPT_NOSSE 213
#define OPT_NOALTIVEC 205 #define OPT_NOALTIVEC 214
/* Usage fashion */ /* Usage fashion */
#define USAGE 0 #define USAGE 0
...@@ -210,6 +211,7 @@ static const struct option longopts[] = ...@@ -210,6 +211,7 @@ static const struct option longopts[] =
/* Decoder options */ /* Decoder options */
{ "mpeg_adec", 1, 0, OPT_MPEG_ADEC }, { "mpeg_adec", 1, 0, OPT_MPEG_ADEC },
{ "ac3_adec", 1, 0, OPT_AC3_ADEC },
/* CPU options */ /* CPU options */
{ "nommx", 0, 0, OPT_NOMMX }, { "nommx", 0, 0, OPT_NOMMX },
...@@ -861,6 +863,10 @@ static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) ...@@ -861,6 +863,10 @@ static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
main_PutPszVariable( ADEC_MPEG_VAR, optarg ); main_PutPszVariable( ADEC_MPEG_VAR, optarg );
break; break;
case OPT_AC3_ADEC:
main_PutPszVariable( ADEC_AC3_VAR, optarg );
break;
/* CPU options */ /* CPU options */
case OPT_NOMMX: case OPT_NOMMX:
p_main->i_cpu_capabilities &= ~CPU_CAPABILITY_MMX; p_main->i_cpu_capabilities &= ~CPU_CAPABILITY_MMX;
...@@ -995,7 +1001,8 @@ static void Usage( int i_fashion ) ...@@ -995,7 +1001,8 @@ static void Usage( int i_fashion )
"\n --channels \tenable channels" "\n --channels \tenable channels"
"\n --channelserver <host> \tchannel server address" "\n --channelserver <host> \tchannel server address"
"\n" "\n"
"\n --mpeg_adec <builtin|mad> \tchoose audio decoder" "\n --mpeg_adec <builtin|mad> \tchoose MPEG audio decoder"
"\n --ac3_adec <builtin|liba52> \tchoose AC3 audio decoder"
"\n" "\n"
"\n --nommx \tdisable CPU's MMX support" "\n --nommx \tdisable CPU's MMX support"
"\n --no3dnow \tdisable CPU's 3D Now! support" "\n --no3dnow \tdisable CPU's 3D Now! support"
...@@ -1075,7 +1082,8 @@ static void Usage( int i_fashion ) ...@@ -1075,7 +1082,8 @@ static void Usage( int i_fashion )
/* Decoder parameters */ /* Decoder parameters */
intf_MsgImm( "\nDecoder parameters:" intf_MsgImm( "\nDecoder parameters:"
"\n " ADEC_MPEG_VAR "=<builtin|mad> \taudio decoder" ); "\n " ADEC_MPEG_VAR "=<builtin|mad> \tMPEG audio decoder"
"\n " ADEC_AC3_VAR "=<builtin|liba52> \tAC3 audio decoder" );
} }
/***************************************************************************** /*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment