Commit d970994c authored by Christophe Massiot's avatar Christophe Massiot
Browse files

* Decoders do not necessarily use bit stream (see mad plug-in)

* mad PTS should finally be accurate
* Some configure changes.
parent 1fce3cc9
......@@ -179,7 +179,7 @@ DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_
DEFINE += $(DEFINE_SYS)
# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
# Gettext support
DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
......
This diff is collapsed.
......@@ -61,9 +61,10 @@ AC_ARG_WITH(words,
*)
dnl Try to guess endianness by matching patterns on a compiled
dnl binary, by looking for an ASCII or EBCDIC string
ac_cv_c_bigendian=unknown
AC_MSG_CHECKING(what the byte order looks to be)[
cat >conftest.c <<EOF
AC_CACHE_CHECK([whether the byte order is big-endian],
[ac_cv_c_bigendian],
[ac_cv_c_bigendian=unknown
[cat >conftest.c <<EOF
short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
void _a(void) { char*s = (char*)am; s = (char *)ai; }
......@@ -72,37 +73,34 @@ AC_ARG_WITH(words,
void _e(void) { char*s = (char*)em; s = (char*)ei; }
int main(void) { _a(); _e(); return 0; }
EOF
]
if test -f conftest.c
then
if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
&& test -f conftest.o
then
if test `grep -l BIGenDianSyS conftest.o`
]
if test -f conftest.c
then
if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
&& test -f conftest.o
then
AC_MSG_RESULT("big endian")
ac_cv_c_bigendian=yes
fi
if test `grep -l LiTTleEnDian conftest.o`
then
AC_MSG_RESULT("little endian")
ac_cv_c_bigendian=no
if test `grep -l BIGenDianSyS conftest.o`
then
ac_cv_c_bigendian=yes
fi
if test `grep -l LiTTleEnDian conftest.o`
then
ac_cv_c_bigendian=no
fi
fi
fi
fi
])
if test $ac_cv_c_bigendian = xunknown
then
AC_MSG_ERROR([Could not guess endianness, please use --with-words])
fi
dnl Now we know what to use for endianness, just put it in the header
if test $ac_cv_c_bigendian = yes
then
cat >> confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF
fi
;;
esac
dnl Now we know what to use for endianness, just put it in the header
if test $ac_cv_c_bigendian = yes
then
AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
fi
dnl Check for system libs needed
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty)
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.69 2002/01/14 23:46:35 massiot Exp $
* $Id: common.h,v 1.70 2002/01/21 23:57:46 massiot Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -510,6 +510,9 @@ typedef struct module_symbols_s
void ( * ) ( struct bit_stream_s *,
boolean_t ),
void * );
void ( * BitstreamNextDataPacket )( struct bit_stream_s * );
boolean_t ( * NextDataPacket ) ( struct decoder_fifo_s *,
struct data_packet_s ** );
void ( * DecoderError ) ( struct decoder_fifo_s * p_fifo );
int ( * input_InitStream ) ( struct input_thread_s *, size_t );
void ( * input_EndStream ) ( struct input_thread_s * );
......
/* include/defs.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* include/defs.h.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
#undef C_ALLOCA
......@@ -326,6 +326,9 @@
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* big endian system */
#undef WORDS_BIGENDIAN
/* long getopt support */
#undef HAVE_GETOPT_LONG
......
......@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_ext-dec.h,v 1.51 2002/01/14 23:46:35 massiot Exp $
* $Id: input_ext-dec.h,v 1.52 2002/01/21 23:57:46 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
......@@ -158,9 +158,6 @@ typedef struct bit_stream_s
/* The decoder fifo contains the data of the PES stream */
decoder_fifo_t * p_decoder_fifo;
/* Function to jump to the next data packet */
void (* pf_next_data_packet)( struct bit_stream_s * );
/* Callback to the decoder used when changing data packets ; set
* to NULL if your decoder doesn't need it. */
void (* pf_bitstream_callback)( struct bit_stream_s *,
......@@ -218,11 +215,20 @@ typedef struct bit_stream_s
* Prototypes from input_ext-dec.c
*****************************************************************************/
#ifndef PLUGIN
void InitBitstream ( struct bit_stream_s *, struct decoder_fifo_s *,
void (* pf_bitstream_callback)( struct bit_stream_s *,
boolean_t ),
void * p_callback_arg );
boolean_t NextDataPacket( struct decoder_fifo_s *, struct data_packet_s ** );
void BitstreamNextDataPacket( struct bit_stream_s * );
u32 UnalignedShowBits( struct bit_stream_s *, unsigned int );
void UnalignedRemoveBits( struct bit_stream_s * );
u32 UnalignedGetBits( struct bit_stream_s *, unsigned int );
void CurrentPTS( struct bit_stream_s *, mtime_t *, mtime_t * );
#else
# define InitBitstream p_symbols->InitBitstream
# define NextDataPacket p_symbols->NextDataPacket
# define BitstreamNextDataPacket p_symbols->BitstreamNextDataPacket
# define UnalignedShowBits p_symbols->UnalignedShowBits
# define UnalignedRemoveBits p_symbols->UnalignedRemoveBits
# define UnalignedGetBits p_symbols->UnalignedGetBits
......@@ -248,7 +254,7 @@ static __inline__ void AlignWord( bit_stream_t * p_bit_stream )
}
else
{
p_bit_stream->pf_next_data_packet( p_bit_stream );
BitstreamNextDataPacket( p_bit_stream );
p_bit_stream->fifo.buffer |= *(p_bit_stream->p_byte++)
<< (8 * sizeof(WORD_TYPE) - 8
- p_bit_stream->fifo.i_available);
......@@ -499,7 +505,7 @@ static __inline__ void GetChunk( bit_stream_t * p_bit_stream,
p_bit_stream->p_byte = p_bit_stream->p_end;
p_buffer += i_available;
i_buf_len -= i_available;
p_bit_stream->pf_next_data_packet( p_bit_stream );
BitstreamNextDataPacket( p_bit_stream );
}
while( (i_available = p_bit_stream->p_end - p_bit_stream->p_byte)
<= i_buf_len && !p_bit_stream->p_decoder_fifo->b_die );
......@@ -534,11 +540,6 @@ typedef struct decoder_config_s
struct stream_ctrl_s * p_stream_ctrl;
struct decoder_fifo_s * p_decoder_fifo;
void (* pf_init_bit_stream)( struct bit_stream_s *,
struct decoder_fifo_s *,
void (* pf_bitstream_callback)( struct bit_stream_s *,
boolean_t ),
void * );
} decoder_config_t;
/*****************************************************************************
......
......@@ -4,7 +4,7 @@
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.57 2002/01/09 02:01:14 sam Exp $
* $Id: input_ext-intf.h,v 1.58 2002/01/21 23:57:46 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -269,11 +269,6 @@ typedef struct input_thread_s
void (* pf_open)( struct input_thread_s * );
void (* pf_close)( struct input_thread_s * );
void (* pf_end)( struct input_thread_s * );
void (* pf_init_bit_stream)( struct bit_stream_s *,
struct decoder_fifo_s *,
void (* pf_bitstream_callback)( struct bit_stream_s *,
boolean_t ),
void * );
/* Read & Demultiplex */
int (* pf_read)( struct input_thread_s *,
......
......@@ -3,7 +3,7 @@
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_ext-plugins.h,v 1.15 2001/12/30 07:09:54 sam Exp $
* $Id: input_ext-plugins.h,v 1.16 2002/01/21 23:57:46 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -33,19 +33,6 @@
* escape a decoder. */
#define NO_SEEK -1
/*****************************************************************************
* Prototypes from input_ext-dec.c
*****************************************************************************/
#ifndef PLUGIN
void InitBitstream ( struct bit_stream_s *, struct decoder_fifo_s *,
void (* pf_bitstream_callback)( struct bit_stream_s *,
boolean_t ),
void * p_callback_arg );
void NextDataPacket ( struct bit_stream_s * );
#else
# define InitBitstream p_symbols->InitBitstream
#endif
/*****************************************************************************
* Prototypes from input_programs.c
*****************************************************************************/
......
......@@ -2,7 +2,7 @@
* ac3_adec.c: ac3 decoder module main file
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ac3_adec.c,v 1.14 2002/01/14 23:46:35 massiot Exp $
* $Id: ac3_adec.c,v 1.15 2002/01/21 23:57:46 massiot Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
......@@ -200,8 +200,7 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
/*
* Bit stream
*/
p_ac3thread->p_config->pf_init_bit_stream(
&p_ac3thread->ac3_decoder->bit_stream,
InitBitstream(&p_ac3thread->ac3_decoder->bit_stream,
p_ac3thread->p_config->p_decoder_fifo,
BitstreamCallback, (void *) p_ac3thread );
......
......@@ -2,7 +2,7 @@
* ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.c,v 1.10 2001/12/30 07:09:54 sam Exp $
* $Id: ac3_spdif.c,v 1.11 2002/01/21 23:57:46 massiot Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
......@@ -229,10 +229,8 @@ static int InitThread( ac3_spdif_thread_t * p_spdif )
*/
p_spdif->p_fifo = p_spdif->p_config->p_decoder_fifo;
p_spdif->p_config->pf_init_bit_stream(
&p_spdif->bit_stream,
p_spdif->p_config->p_decoder_fifo,
BitstreamCallback, (void*)p_spdif );
InitBitstream( &p_spdif->bit_stream, p_spdif->p_config->p_decoder_fifo,
BitstreamCallback, (void*)p_spdif );
/* Creating the audio output fifo */
p_spdif->p_aout_fifo = aout_CreateFifo( AOUT_ADEC_SPDIF_FIFO, 1, 48000, 0,
......
......@@ -2,7 +2,7 @@
* lpcm_decoder_thread.c: lpcm decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: lpcm_adec.c,v 1.9 2002/01/14 23:46:35 massiot Exp $
* $Id: lpcm_adec.c,v 1.10 2002/01/21 23:57:46 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
......@@ -146,10 +146,8 @@ static int InitThread (lpcmdec_thread_t * p_lpcmdec)
{
/* Init the BitStream */
p_lpcmdec->p_config->pf_init_bit_stream(
&p_lpcmdec->bit_stream,
p_lpcmdec->p_config->p_decoder_fifo,
NULL, NULL);
InitBitstream( &p_lpcmdec->bit_stream, p_lpcmdec->p_config->p_decoder_fifo,
NULL, NULL);
/* Creating the audio output fifo */
p_lpcmdec->p_aout_fifo = aout_CreateFifo( AOUT_ADEC_STEREO_FIFO, 2, 48000,
......
......@@ -132,14 +132,14 @@ static int decoder_Run ( decoder_config_t * p_config )
/* mad decoder thread's main loop */
while ((!p_mad_adec->p_fifo->b_die) && (!p_mad_adec->p_fifo->b_error))
{
intf_ErrMsg( "mad_adec: starting libmad decoder" );
if (mad_decoder_run(p_mad_adec->libmad_decoder, MAD_DECODER_MODE_SYNC)==-1)
{
intf_ErrMsg( "mad_adec error: libmad decoder returns abnormally");
DecoderError( p_mad_adec->p_fifo );
EndThread(p_mad_adec);
return( -1 );
}
intf_ErrMsg( "mad_adec: starting libmad decoder" );
if (mad_decoder_run(p_mad_adec->libmad_decoder, MAD_DECODER_MODE_SYNC)==-1)
{
intf_ErrMsg( "mad_adec error: libmad decoder returns abnormally");
DecoderError( p_mad_adec->p_fifo );
EndThread(p_mad_adec);
return( -1 );
}
}
/* If b_error is set, the mad decoder thread enters the error loop */
......@@ -148,7 +148,7 @@ static int decoder_Run ( decoder_config_t * p_config )
DecoderError( p_mad_adec->p_fifo );
}
/* End of the ac3 decoder thread */
/* End of the mad decoder thread */
EndThread (p_mad_adec);
return( 0 );
......@@ -159,42 +159,55 @@ static int decoder_Run ( decoder_config_t * p_config )
*****************************************************************************/
static int InitThread( mad_adec_thread_t * p_mad_adec )
{
decoder_fifo_t * p_fifo = p_mad_adec->p_fifo;
/*
* Properties of audio for libmad
*/
/* Initialize the libmad decoder structures */
p_mad_adec->libmad_decoder = (struct mad_decoder*) malloc(sizeof(struct mad_decoder));
if (p_mad_adec->libmad_decoder == NULL) {
if (p_mad_adec->libmad_decoder == NULL)
{
intf_ErrMsg ( "mad_adec error: not enough memory "
"for decoder_InitThread() to allocate p_mad_adec->libmad_decder" );
return -1;
return -1;
}
p_mad_adec->i_current_pts = p_mad_adec->i_next_pts = 0;
/*
* Initialize bit stream
*/
p_mad_adec->p_config->pf_init_bit_stream( &p_mad_adec->bit_stream,
p_mad_adec->p_config->p_decoder_fifo,
NULL, /* pf_bitstream_callback */
NULL ); /* void **/
mad_decoder_init( p_mad_adec->libmad_decoder,
p_mad_adec, /* vlc's thread structure and p_fifo playbuffer */
libmad_input, /* input_func */
0, /* header_func */
0, /* filter */
libmad_output, /* output_func */
0, /* error */
0); /* message */
p_mad_adec, /* vlc's thread structure and p_fifo playbuffer */
libmad_input, /* input_func */
0, /* header_func */
0, /* filter */
libmad_output, /* output_func */
0, /* error */
0); /* message */
mad_decoder_options(p_mad_adec->libmad_decoder, MAD_OPTION_IGNORECRC);
mad_timer_reset(&p_mad_adec->libmad_timer);
/* output fifo will be created when needed */
p_mad_adec->p_aout_fifo=NULL;
/*
* Initialize the output properties
*/
p_mad_adec->p_aout_fifo = NULL;
/*
* Initialize the input properties
*/
/* Get the first data packet. */
vlc_mutex_lock( &p_fifo->data_lock );
while ( p_fifo->p_first == NULL )
{
if ( p_fifo->b_die )
{
vlc_mutex_unlock( &p_fifo->data_lock );
return( -1 );
}
vlc_cond_wait( &p_fifo->data_wait, &p_fifo->data_lock );
}
vlc_mutex_unlock( &p_fifo->data_lock );
p_mad_adec->p_data = p_fifo->p_first->p_first;
intf_ErrMsg("mad_adec debug: mad decoder thread %p initialized", p_mad_adec);
......
......@@ -34,8 +34,8 @@ typedef struct mad_adec_thread_s
* Decoder properties
*/
struct mad_decoder *libmad_decoder;
mad_timer_t libmad_timer;
byte_t buffer[MAD_BUFFER_SIZE];
mad_timer_t libmad_timer;
byte_t buffer[MAD_BUFFER_SIZE];
/*
* Thread properties
......@@ -46,12 +46,11 @@ typedef struct mad_adec_thread_s
* Input properties
*/
decoder_fifo_t * p_fifo; /* stores the PES stream data */
/* The bit stream structure handles the PES stream at the bit level */
bit_stream_t bit_stream;
data_packet_t * p_data;
decoder_config_t * p_config;
/* Store i_pts for syncing audio frames */
mtime_t i_current_pts, i_next_pts;
mtime_t i_current_pts, i_next_pts;
/*
* Output properties
......
......@@ -56,7 +56,7 @@ enum mad_flow libmad_input(void *data, struct mad_stream *p_libmad_stream)
}
if ( p_mad_adec->p_fifo->b_error == 1 ) {
intf_ErrMsg( "mad_adec error: libmad_input ignoring current audio frame" );
intf_ErrMsg( "mad_adec error: libmad_input ignoring current audio frame" );
return MAD_FLOW_IGNORE;
}
......@@ -65,63 +65,60 @@ enum mad_flow libmad_input(void *data, struct mad_stream *p_libmad_stream)
*/
if ((p_libmad_stream->buffer==NULL) || (p_libmad_stream->error==MAD_ERROR_BUFLEN))
{
/* libmad does not consume all the buffer it's given. Some
* datas, part of a truncated frame, is left unused at the
* end of the buffer. Those datas must be put back at the
* beginning of the buffer and taken in account for
* refilling the buffer. This means that the input buffer
* must be large enough to hold a complete frame at the
* highest observable bit-rate (currently 448 kb/s). XXX=XXX
* Is 2016 bytes the size of the largest frame?
* (448000*(1152/32000))/8
*/
if (p_libmad_stream->next_frame!=NULL)
{
Remaining=p_libmad_stream->bufend-p_libmad_stream->next_frame;
memmove(p_mad_adec->buffer,p_libmad_stream->next_frame,Remaining);
ReadStart=p_mad_adec->buffer+Remaining;
ReadSize=(MAD_BUFFER_SIZE)-Remaining;
/* libmad does not consume all the buffer it's given. Some
* datas, part of a truncated frame, is left unused at the
* end of the buffer. Those datas must be put back at the
* beginning of the buffer and taken in account for
* refilling the buffer. This means that the input buffer
* must be large enough to hold a complete frame at the
* highest observable bit-rate (currently 448 kb/s). XXX=XXX
* Is 2016 bytes the size of the largest frame?
* (448000*(1152/32000))/8
*/
if(p_libmad_stream->next_frame!=NULL)
{
Remaining=p_libmad_stream->bufend-p_libmad_stream->next_frame;
if( p_mad_adec->buffer != p_libmad_stream->next_frame )
{
FAST_MEMCPY( p_mad_adec->buffer, p_libmad_stream->next_frame,
Remaining );
}
ReadStart=p_mad_adec->buffer+Remaining;
ReadSize=(MAD_BUFFER_SIZE)-Remaining;
/* Store time stamp of next frame */
p_mad_adec->i_current_pts = p_mad_adec->i_next_pts;
CurrentPTS( &p_mad_adec->bit_stream, &p_mad_adec->i_next_pts, NULL );
}
else
{
ReadSize=(MAD_BUFFER_SIZE);
ReadStart=p_mad_adec->buffer;
Remaining=0;
p_mad_adec->i_next_pts = 0;
CurrentPTS( &p_mad_adec->bit_stream, &p_mad_adec->i_current_pts, NULL );
}
//intf_ErrMsg( "mad_adec debug: buffer size remaining [%d] and readsize [%d] total [%d]",
// Remaining, ReadSize, ReadSize+Remaining);
p_mad_adec->i_next_pts = p_mad_adec->p_fifo->p_first->i_pts;
}
else
{
ReadSize=(MAD_BUFFER_SIZE);
ReadStart=p_mad_adec->buffer;
Remaining=0;
p_mad_adec->i_next_pts = 0;
p_mad_adec->i_current_pts = p_mad_adec->p_fifo->p_first->i_pts;
}
/* Fill-in the buffer. If an error occurs print a message
* and leave the decoding loop. If the end of stream is
* reached we also leave the loop but the return status is
* left untouched.
*/
#if 0
/* This is currently buggy --Meuuh */
if( ReadSize > p_mad_adec->bit_stream.p_end
- p_mad_adec->bit_stream.p_byte )
if( ReadSize > p_mad_adec->p_data->p_payload_end
- p_mad_adec->p_data->p_payload_start )
{
FAST_MEMCPY( ReadStart, p_mad_adec->bit_stream.p_byte,
p_mad_adec->bit_stream.p_end - p_mad_adec->bit_stream.p_byte );
p_mad_adec->bit_stream.pf_next_data_packet( &p_mad_adec->bit_stream );
ReadSize = p_mad_adec->p_data->p_payload_end
- p_mad_adec->p_data->p_payload_start;
FAST_MEMCPY( ReadStart, p_mad_adec->p_data->p_payload_start,
ReadSize );
NextDataPacket( p_mad_adec->p_fifo, &p_mad_adec->p_data );
}
else
{
FAST_MEMCPY( ReadStart, p_mad_adec->bit_stream.p_byte,
FAST_MEMCPY( ReadStart, p_mad_adec->p_data->p_payload_start,
ReadSize );
p_mad_adec->bit_stream.p_byte += ReadSize;
p_mad_adec->p_data->p_payload_start += ReadSize;
}
#else
/* This is PTS-inaccurate --Meuuh */
GetChunk( &p_mad_adec->bit_stream, ReadStart, ReadSize );
#endif
if ( p_mad_adec->p_fifo->b_die == 1 )
{
......@@ -135,12 +132,13 @@ enum mad_flow libmad_input(void *data, struct mad_stream *p_libmad_stream)
return MAD_FLOW_IGNORE;
}
/* Pipe the new buffer content to libmad's stream decoder facility.
* Libmad never copies the buffer, but just references it. So keep it in
* mad_adec_thread_t structure.
*/
mad_stream_buffer(p_libmad_stream,(unsigned char*) &p_mad_adec->buffer,MAD_BUFFER_SIZE);
p_libmad_stream->error=0;
/* Pipe the new buffer content to libmad's stream decoder facility.
* Libmad never copies the buffer, but just references it. So keep it in
* mad_adec_thread_t structure.
*/
mad_stream_buffer(p_libmad_stream,(unsigned char*) &p_mad_adec->buffer,
Remaining + ReadSize);
p_libmad_stream->error=0;
}
return MAD_FLOW_CONTINUE;
......@@ -318,7 +316,6 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header
intf_ErrMsg("mad_adec debug: in libmad_output aout fifo created");
}
/* Set timestamp to synchronize audio and video decoder fifo's */
if (p_mad_adec->p_aout_fifo->l_rate != p_libmad_pcm->samplerate)
{
intf_ErrMsg( "mad_adec: libmad_output samplerate is changing from [%d] Hz to [%d] Hz, sample size [%d], error_code [%0x]",
......
......@@ -2,7 +2,7 @@
* mpeg_adec.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: mpeg_adec.c,v 1.14 2002/01/14 23:46:35 massiot Exp $
* $Id: mpeg_adec.c,v 1.15 2002/01/21 23:57:46 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -123,8 +123,8 @@ static int decoder_Run ( decoder_config_t * p_config )
/*
* Initialize bit stream
*/
p_adec->p_config->pf_init_bit_stream( &p_adec->bit_stream,
p_adec->p_config->p_decoder_fifo, NULL, NULL );
InitBitstream( &p_adec->bit_stream, p_adec->p_config->p_decoder_fifo,
NULL, NULL );
/* We do not create the audio output fifo now, but
it will be created when the first frame is received */
......
......@@ -2,7 +2,7 @@
* input_es.c: Elementary Stream demux and packet management
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: input_es.c,v 1.11 2001/12/30 07:09:55 sam Exp $
* $Id: input_es.c,v 1.12 2002/01/21 23:57:46 massiot Exp $
*
* Author: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -68,12 +68,7 @@ static void ESEnd ( struct input_thread_s * );
static void ESSeek ( struct input_thread_s *, off_t );
static int ESSetProgram ( struct input_thread_s *, pgrm_descriptor_t * );
static void ESDemux ( struct input_thread_s *,
struct data_packet_s * );
static void ESNextDataPacket( struct bit_stream_s * );
static void ESInitBitstream( struct bit_stream_s *, struct decoder_fifo_s *,
void (* pf_bitstream_callback)( struct bit_stream_s *,
boolean_t ),
void * );
struct data_packet_s * );
/*****************************************************************************
* Declare a buffer manager
......@@ -101,7 +96,6 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
input.pf_open = NULL;
input.pf_close = NULL;
input.pf_end = ESEnd;
input.pf_init_bit_stream = ESInitBitstream;