Commit 94bda0d1 authored by Laurent Aimar's avatar Laurent Aimar

* include/common.h and input_ext-plugins.h, src/misc/modules_plugin.h :...

    * include/common.h and input_ext-plugins.h, src/misc/modules_plugin.h : export input_ClockGetTS for plugins.
    * plugins/mpeg_system/mpeg_audio.c : a demux for mpeg audio stream (file, web radio ...)
    * Makefile configure.in : to compile it
parent cdfc1ede
......@@ -128,6 +128,7 @@ PLUGINS_TARGETS := a52/a52 \
motion/motionmmxext \
motion/motion3dnow \
motion/motionaltivec \
mpeg_system/mpeg_audio \
mpeg_system/mpeg_es \
mpeg_system/mpeg_ps \
mpeg_system/mpeg_ts \
......
......@@ -5417,7 +5417,7 @@ case x"${target_cpu}" in
esac
BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts mpeg_audio file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
......
......@@ -406,7 +406,7 @@ dnl
dnl default modules
dnl
BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts mpeg_audio file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
dnl
dnl Accelerated modules
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.103 2002/05/03 20:49:30 sam Exp $
* $Id: common.h,v 1.104 2002/05/10 02:04:16 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -636,6 +636,9 @@ typedef struct module_symbols_s
int ( * input_ClockManageControl ) ( struct input_thread_s *,
struct pgrm_descriptor_s *,
mtime_t );
mtime_t ( *input_ClockGetTS ) ( struct input_thread_s *,
struct pgrm_descriptor_s *,
mtime_t );
void ( * input_FDSeek ) ( struct input_thread_s *, off_t );
void ( * input_FDClose ) ( struct input_thread_s * );
ssize_t ( * input_FDRead ) ( struct input_thread_s *, byte_t *,
......
......@@ -3,7 +3,7 @@
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
* $Id: input_ext-plugins.h,v 1.24 2002/04/25 21:52:42 sam Exp $
* $Id: input_ext-plugins.h,v 1.25 2002/05/10 02:04:16 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -102,6 +102,7 @@ mtime_t input_ClockGetTS( struct input_thread_s *,
#else
# define input_ClockManageRef p_symbols->input_ClockManageRef
# define input_ClockManageControl p_symbols->input_ClockManageControl
# define input_ClockGetTS p_symbols->input_ClockGetTS
#endif
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.14 2002/05/07 13:53:55 fenrir Exp $
* $Id: avi.c,v 1.15 2002/05/10 02:04:17 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -438,7 +438,7 @@ static int AVIInit( input_thread_t *p_input )
/* we need to seek to be able to readcorrectly */
if( !p_input->stream.b_seekable )
{
intf_ErrMsg( "input error: need the ability to seek in stream" );
intf_WarnMsg( 2,"input: RIFF-AVI plug-in discarded (no seekable)" );
return( -1 );
}
p_input->p_demux_data =
......@@ -461,7 +461,7 @@ static int AVIInit( input_thread_t *p_input )
if( RIFF_TestFileHeader( p_input, &p_riff, FOURCC_AVI ) != 0 )
{
__AVIFreeDemuxData( p_input );
intf_ErrMsg( "input: RIFF-AVI plug-in discarded (avi_file)" );
intf_WarnMsg( 2,"input: RIFF-AVI plug-in discarded (avi_file)" );
return( -1 );
}
p_avi_demux->p_riff = p_riff;
......@@ -802,7 +802,6 @@ static int AVIInit( input_thread_t *p_input )
}
else
{
/* TODO: if there is more than 1 video stream */
intf_Msg( "input error: no video stream found !" );
}
if( p_avi_demux->p_info_audio != NULL )
......@@ -883,17 +882,14 @@ static int __AVI_NextIndexEntry( input_thread_t *p_input,
p_info->i_idxposc--;
/* create entry on the fly */
/* TODO: when parsing for a stream take care of the other to not do
the same things two time */
/* search for the less advance stream and parse from it for all streams*/
/* search for the more advance stream and parse from it for all streams*/
p_info_tmp = p_info;
/* XXX XXX XXX change to take the stream the more advanced */
for( i = 0; i < p_avi_demux->i_streams; i++ )
{
#define p_info_i p_avi_demux->pp_info[i]
if( p_info_i->p_index[p_info_i->i_idxnb - 1].i_offset +
p_info_i->i_idxoffset <
p_info_i->i_idxoffset >
p_info_tmp->p_index[p_info_tmp->i_idxnb - 1].i_offset +
p_info_tmp->i_idxoffset )
{
......@@ -1264,6 +1260,8 @@ static int AVI_ReAlign( input_thread_t *p_input )
&& ( i_pos < p_info->p_index[p_info->i_idxposc].i_offset +
p_info->p_index[p_info->i_idxposc].i_length ) )
{
/* FIXME FIXME FIXME if master == audio and samplesize != 0 */
/* don't work with big chunk */
/* don't do anything we are in the current chunk */
return( 0 );
}
......@@ -1387,7 +1385,6 @@ static pes_packet_t *AVI_GetFrameInPES( input_thread_t *p_input,
/* stream is chunk based , easy */
int i_chunk = __AVI_PTSToChunk( p_info, i_dpts);
/* at least one frame */
/* i_chunk = __MIN( 50, i_chunk ); */ /* but no more than 20 */
/* read them */
p_pes_first = NULL;
for( i = 0; i < i_chunk; i++ )
......
......@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.6 2002/05/07 13:55:36 fenrir Exp $
* $Id: ffmpeg.c,v 1.7 2002/05/10 02:04:17 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -120,7 +120,7 @@ static int decoder_Probe( u8 *pi_type )
switch( *pi_type )
{
/* case( MPEG1_VIDEO_ES ): marche pas pr le moment
case( MPEG2_VIDEO_ES ): */
case( MPEG2_VIDEO_ES ): */
case( MSMPEG4_VIDEO_ES ):
case( MPEG4_VIDEO_ES ):
return( 0 );
......
......@@ -292,7 +292,7 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header
{
p_mad_adec->p_aout_fifo = aout_CreateFifo(
AOUT_FIFO_PCM, /* fifo type */
p_libmad_pcm->channels, /* nr. of channels */
2, /*p_libmad_pcm->channels,*/ /* nr. of channels */
p_libmad_pcm->samplerate, /* frame rate in Hz ?*/
p_libmad_pcm->length*2, /* length of output buffer *2 channels*/
NULL ); /* buffer */
......@@ -373,9 +373,11 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header
}
/* DEBUG */
/*
if (p_libmad_pcm->channels == 1) {
intf_ErrMsg( "mad debug: libmad_output channels [%d]", p_libmad_pcm->channels);
}
*/
vlc_mutex_lock (&p_mad_adec->p_aout_fifo->data_lock);
p_mad_adec->p_aout_fifo->i_end_frame = (p_mad_adec->p_aout_fifo->i_end_frame + 1) & AOUT_FIFO_SIZE;
......
......@@ -2,3 +2,5 @@ mpeg_es_SOURCES = mpeg_es.c
mpeg_ps_SOURCES = mpeg_ps.c
mpeg_ts_SOURCES = mpeg_ts.c
mpeg_ts_dvbpsi_SOURCES = mpeg_ts.c
mpeg_audio_SOURCES = mpeg_audio.c
This diff is collapsed.
......@@ -2,7 +2,7 @@
* modules_plugin.h : Plugin management functions used by the core application.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules_plugin.h,v 1.24 2002/05/03 20:49:30 sam Exp $
* $Id: modules_plugin.h,v 1.25 2002/05/10 02:04:17 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -253,6 +253,7 @@ module_error( char *psz_buffer )
(p_symbols)->input_DemuxTS = input_DemuxTS; \
(p_symbols)->input_ClockManageRef = input_ClockManageRef; \
(p_symbols)->input_ClockManageControl = input_ClockManageControl; \
(p_symbols)->input_ClockGetTS = input_ClockGetTS; \
(p_symbols)->input_FDSeek = input_FDSeek; \
(p_symbols)->input_FDClose = input_FDClose; \
(p_symbols)->input_FDRead = input_FDRead; \
......
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