src/input/stream.c \
src/input/demux.c \
src/input/subtitles.c \
- src/input/input_ext-plugins.c \
- src/input/input_ext-dec.c \
+ src/input/input_ext-plugins.c \
src/input/input_ext-intf.c \
src/input/input_dec.c \
src/input/input_programs.c \
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_ext-dec.h,v 1.82 2003/11/06 16:36:41 nitrox Exp $
+ * $Id: input_ext-dec.h,v 1.83 2003/11/24 00:39:00 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
unsigned int i_nb_data; /* Number of data packets in the chained list */
};
-/*****************************************************************************
- * decoder_fifo_t
- *****************************************************************************
- * This rotative FIFO contains PES packets that are to be decoded.
- *****************************************************************************/
-struct decoder_fifo_t
-{
- VLC_COMMON_MEMBERS
-
- /* Thread structures */
- vlc_mutex_t data_lock; /* fifo data lock */
- vlc_cond_t data_wait; /* fifo data conditional variable */
-
- /* Data */
- pes_packet_t * p_first;
- pes_packet_t ** pp_last;
- int i_depth; /* number of PES packets in the stack */
-
- /* Communication interface between input and decoders */
- input_buffers_t *p_packets_mgt; /* packets management services data */
-
- /* Standard pointers given to the decoders as a toolbox. */
- uint16_t i_id;
- vlc_fourcc_t i_fourcc;
- es_sys_t * p_demux_data;
- stream_ctrl_t * p_stream_ctrl;
- sout_instance_t * p_sout;
- void * p_waveformatex;
- void * p_bitmapinfoheader;
- void * p_spuinfo;
-
- decoder_t * p_dec;
-};
-
-/*****************************************************************************
- * bit_fifo_t : bit fifo descriptor
- *****************************************************************************
- * This type describes a bit fifo used to store bits while working with the
- * input stream at the bit level.
- *****************************************************************************/
-typedef uint32_t WORD_TYPE;
-
-typedef struct bit_fifo_t
-{
- /* This unsigned integer allows us to work at the bit level. This buffer
- * can contain 32 bits, and the used space can be found on the MSb's side
- * and the available space on the LSb's side. */
- WORD_TYPE buffer;
-
- /* Number of bits available in the bit buffer */
- int i_available;
-
-} bit_fifo_t;
-
-/*****************************************************************************
- * bit_stream_t : bit stream descriptor
- *****************************************************************************
- * This type, based on a PES stream, includes all the structures needed to
- * handle the input stream like a bit stream.
- *****************************************************************************/
-struct bit_stream_t
-{
- /*
- * Bit structures
- */
- bit_fifo_t fifo;
-
- /*
- * Input structures
- */
- /* The decoder fifo contains the data of the PES stream */
- decoder_fifo_t * p_decoder_fifo;
-
- /* Callback to the decoder used when changing data packets ; set
- * to NULL if your decoder doesn't need it. */
- void (* pf_bitstream_callback)( bit_stream_t *, vlc_bool_t );
- /* Optional argument to the callback */
- void * p_callback_arg;
-
- /*
- * PTS retrieval
- */
- mtime_t i_pts, i_dts;
- byte_t * p_pts_validity;
-
- /*
- * Byte structures
- */
- /* Current PES packet (extracted from the PES stream) */
- pes_packet_t * p_pes;
- /* Current data packet (in the current PES packet) */
- data_packet_t * p_data;
- /* Pointer to the next byte that is to be read (in the current packet) */
- byte_t * p_byte;
- /* Pointer to the last byte that is to be read (in the current packet */
- byte_t * p_end;
- /* Temporary buffer in case we're not aligned when changing data packets */
- WORD_TYPE i_showbits_buffer;
- data_packet_t showbits_data;
-};
-
-/*****************************************************************************
- * Inline functions used by the decoders to read bit_stream_t
- *****************************************************************************/
-
-/*
- * DISCUSSION : How to use the bit_stream structures
- *
- * sizeof(WORD_TYPE) (usually 32) bits are read at the same time, thus
- * minimizing the number of p_byte changes.
- * Bits are read via GetBits() or ShowBits.
- *
- * XXX : Be aware that if, in the forthcoming functions, i_bits > 24,
- * the data have to be already aligned on an 8-bit boundary, or wrong
- * results will be returned. Use RealignBits() if unsure.
- */
-
-#if (WORD_TYPE == uint32_t)
-# define WORD_AT U32_AT
-# define WORD_SIGNED int32_t
-#elif (WORD_TYPE == uint64_t)
-# define WORD_AT U64_AT
-# define WORD_SIGNED int64_t
-#else
-# error Unsupported WORD_TYPE
-#endif
-
/*****************************************************************************
* Prototypes from input_ext-dec.c
*****************************************************************************/
-VLC_EXPORT( void, input_ExtractPES, ( decoder_fifo_t *, pes_packet_t ** ) );
VLC_EXPORT( void, input_DeletePES, ( input_buffers_t *, pes_packet_t * ) );
-VLC_EXPORT( int, InitBitstream, ( bit_stream_t *, decoder_fifo_t *, void ( * )( bit_stream_t *, vlc_bool_t ), void * p_callback_arg ) );
-VLC_EXPORT( vlc_bool_t, NextDataPacket, ( decoder_fifo_t *, bit_stream_t * ) );
-VLC_EXPORT( void, BitstreamNextDataPacket, ( bit_stream_t * ) );
-VLC_EXPORT( uint32_t, UnalignedShowBits, ( bit_stream_t *, unsigned int ) );
-VLC_EXPORT( void, UnalignedRemoveBits, ( bit_stream_t * ) );
-VLC_EXPORT( uint32_t, UnalignedGetBits, ( bit_stream_t *, unsigned int ) );
-VLC_EXPORT( void, CloseBitstream, ( bit_stream_t * ) );
-VLC_EXPORT( void, CurrentPTS, ( bit_stream_t *, mtime_t *, mtime_t * ) );
-VLC_EXPORT( void, NextPTS, ( bit_stream_t *, mtime_t *, mtime_t * ) );
-
-/*****************************************************************************
- * AlignWord : fill in the bit buffer so that the byte pointer be aligned
- * on a word boundary (XXX: there must be at least sizeof(WORD_TYPE) - 1
- * empty bytes in the bit buffer)
- *****************************************************************************/
-static inline void AlignWord( bit_stream_t * p_bit_stream )
-{
- while( (ptrdiff_t)p_bit_stream->p_byte
- & (sizeof(WORD_TYPE) - 1) )
- {
- if( p_bit_stream->p_byte < p_bit_stream->p_end )
- {
- p_bit_stream->fifo.buffer |= *(p_bit_stream->p_byte++)
- << (8 * sizeof(WORD_TYPE) - 8
- - p_bit_stream->fifo.i_available);
- p_bit_stream->fifo.i_available += 8;
- }
- else
- {
- 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);
- p_bit_stream->fifo.i_available += 8;
- }
- }
-}
-
-/*****************************************************************************
- * ShowBits : return i_bits bits from the bit stream
- *****************************************************************************/
-static inline uint32_t ShowBits( bit_stream_t * p_bit_stream,
- unsigned int i_bits )
-{
- if( (unsigned int)p_bit_stream->fifo.i_available >= i_bits )
- {
- return( p_bit_stream->fifo.buffer >> (8 * sizeof(WORD_TYPE) - i_bits) );
- }
-
- if( p_bit_stream->p_byte <= p_bit_stream->p_end - sizeof(WORD_TYPE) )
- {
- return( (p_bit_stream->fifo.buffer |
- (WORD_AT( p_bit_stream->p_byte )
- >> p_bit_stream->fifo.i_available))
- >> (8 * sizeof(WORD_TYPE) - i_bits) );
- }
-
- return( UnalignedShowBits( p_bit_stream, i_bits ) );
-}
-
-/*****************************************************************************
- * ShowSignedBits : return i_bits bits from the bit stream, using signed
- * arithmetic
- *****************************************************************************/
-static inline int32_t ShowSignedBits( bit_stream_t * p_bit_stream,
- unsigned int i_bits )
-{
- if( (unsigned int)p_bit_stream->fifo.i_available >= i_bits )
- {
- return( (WORD_SIGNED)p_bit_stream->fifo.buffer
- >> (8 * sizeof(WORD_TYPE) - i_bits) );
- }
-
- /* You can probably do something a little faster, but now I'm tired. */
- return( (WORD_SIGNED)(ShowBits( p_bit_stream, i_bits ) << (32 - i_bits))
- >> (32 - i_bits) );
-}
-
-/*****************************************************************************
- * RemoveBits : removes i_bits bits from the bit buffer
- * XXX: do not use for 32 bits, see RemoveBits32
- *****************************************************************************/
-static inline void RemoveBits( bit_stream_t * p_bit_stream,
- unsigned int i_bits )
-{
- p_bit_stream->fifo.i_available -= i_bits;
-
- if( p_bit_stream->fifo.i_available >= 0 )
- {
- p_bit_stream->fifo.buffer <<= i_bits;
- return;
- }
-
- if( p_bit_stream->p_byte <= p_bit_stream->p_end - sizeof(WORD_TYPE) )
- {
- p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte )
- << ( -p_bit_stream->fifo.i_available );
- p_bit_stream->p_byte =
- (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
- p_bit_stream->fifo.i_available += sizeof(WORD_TYPE) * 8;
- return;
- }
-
- UnalignedRemoveBits( p_bit_stream );
-}
-
-/*****************************************************************************
- * RemoveBits32 : removes 32 bits from the bit buffer (and as a side effect,
- * refill it)
- *****************************************************************************/
-#if (WORD_TYPE == uint32_t)
-static inline void RemoveBits32( bit_stream_t * p_bit_stream )
-{
- if( p_bit_stream->p_byte <= p_bit_stream->p_end - sizeof(WORD_TYPE) )
- {
- if( p_bit_stream->fifo.i_available )
- {
- p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte )
- << (32 - p_bit_stream->fifo.i_available);
- p_bit_stream->p_byte =
- (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
- return;
- }
-
- p_bit_stream->p_byte =
- (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
- return;
- }
-
- p_bit_stream->fifo.i_available -= 32;
- UnalignedRemoveBits( p_bit_stream );
-}
-#else
-# define RemoveBits32( p_bit_stream ) RemoveBits( p_bit_stream, 32 )
-#endif
-
-/*****************************************************************************
- * GetBits : returns i_bits bits from the bit stream and removes them
- * XXX: do not use for 32 bits, see GetBits32
- *****************************************************************************/
-static inline uint32_t GetBits( bit_stream_t * p_bit_stream,
- unsigned int i_bits )
-{
- uint32_t i_result;
-
- p_bit_stream->fifo.i_available -= i_bits;
-
- if( p_bit_stream->fifo.i_available >= 0 )
- {
- i_result = p_bit_stream->fifo.buffer
- >> (8 * sizeof(WORD_TYPE) - i_bits);
- p_bit_stream->fifo.buffer <<= i_bits;
- return( i_result );
- }
-
- if( p_bit_stream->p_byte <= p_bit_stream->p_end - sizeof(WORD_TYPE) )
- {
- i_result = p_bit_stream->fifo.buffer
- >> (8 * sizeof(WORD_TYPE) - i_bits);
- p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte );
- p_bit_stream->p_byte =
- (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
- i_result |= p_bit_stream->fifo.buffer
- >> (8 * sizeof(WORD_TYPE)
- + p_bit_stream->fifo.i_available);
- p_bit_stream->fifo.buffer <<= ( -p_bit_stream->fifo.i_available );
- p_bit_stream->fifo.i_available += sizeof(WORD_TYPE) * 8;
- return( i_result );
- }
-
- return UnalignedGetBits( p_bit_stream, i_bits );
-}
-
-/*****************************************************************************
- * GetSignedBits : returns i_bits bits from the bit stream and removes them,
- * using signed arithmetic
- * XXX: do not use for 32 bits
- *****************************************************************************/
-static inline int32_t GetSignedBits( bit_stream_t * p_bit_stream,
- unsigned int i_bits )
-{
- if( (unsigned int)p_bit_stream->fifo.i_available >= i_bits )
- {
- int32_t i_result;
-
- p_bit_stream->fifo.i_available -= i_bits;
- i_result = (WORD_SIGNED)p_bit_stream->fifo.buffer
- >> (8 * sizeof(WORD_TYPE) - i_bits);
- p_bit_stream->fifo.buffer <<= i_bits;
- return( i_result );
- }
-
- /* You can probably do something a little faster, but now I'm tired. */
- return( (WORD_SIGNED)(GetBits( p_bit_stream, i_bits ) << (32 - i_bits))
- >> (32 - i_bits) );
-}
-
-/*****************************************************************************
- * GetBits32 : returns 32 bits from the bit stream and removes them
- *****************************************************************************/
-#if (WORD_TYPE == uint32_t)
-static inline uint32_t GetBits32( bit_stream_t * p_bit_stream )
-{
- uint32_t i_result;
-
- if( p_bit_stream->fifo.i_available == 32 )
- {
- p_bit_stream->fifo.i_available = 0;
- i_result = p_bit_stream->fifo.buffer;
- p_bit_stream->fifo.buffer = 0;
- return( i_result );
- }
-
- if( p_bit_stream->p_byte <= p_bit_stream->p_end - sizeof(WORD_TYPE) )
- {
- if( p_bit_stream->fifo.i_available )
- {
- i_result = p_bit_stream->fifo.buffer;
- p_bit_stream->fifo.buffer = WORD_AT( p_bit_stream->p_byte );
- p_bit_stream->p_byte =
- (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
- i_result |= p_bit_stream->fifo.buffer
- >> (p_bit_stream->fifo.i_available);
- p_bit_stream->fifo.buffer <<= (32 - p_bit_stream->fifo.i_available);
- return( i_result );
- }
-
- i_result = WORD_AT( p_bit_stream->p_byte );
- p_bit_stream->p_byte =
- (byte_t *) ( ((WORD_TYPE *)p_bit_stream->p_byte) + 1 );
- return( i_result );
- }
-
- p_bit_stream->fifo.i_available -= 32;
- return UnalignedGetBits( p_bit_stream, 32 );
-}
-#else
-# define GetBits32( p_bit_stream ) GetBits( p_bit_stream, 32 )
-#endif
-
-/*****************************************************************************
- * RealignBits : realigns the bit buffer on an 8-bit boundary
- *****************************************************************************/
-static inline void RealignBits( bit_stream_t * p_bit_stream )
-{
- p_bit_stream->fifo.buffer <<= (p_bit_stream->fifo.i_available & 0x7);
- p_bit_stream->fifo.i_available &= ~0x7;
-}
-
-
-/*****************************************************************************
- * GetChunk : reads a large chunk of data
- *****************************************************************************
- * The position in the stream must be byte-aligned, if unsure call
- * RealignBits(). p_buffer must point to a buffer at least as big as i_buf_len
- * otherwise your code will crash.
- *****************************************************************************/
-static inline void GetChunk( bit_stream_t * p_bit_stream,
- byte_t * p_buffer, size_t i_buf_len )
-{
- ptrdiff_t i_available;
-
- /* We need to take care because i_buf_len may be < 4. */
- while( p_bit_stream->fifo.i_available > 0 && i_buf_len )
- {
- *p_buffer = p_bit_stream->fifo.buffer >> (8 * sizeof(WORD_TYPE) - 8);
- p_buffer++;
- i_buf_len--;
- p_bit_stream->fifo.buffer <<= 8;
- p_bit_stream->fifo.i_available -= 8;
- }
-
- i_available = p_bit_stream->p_end - p_bit_stream->p_byte;
- if( i_available >= (ptrdiff_t)i_buf_len )
- {
- p_bit_stream->p_decoder_fifo->p_vlc->pf_memcpy( p_buffer,
- p_bit_stream->p_byte, i_buf_len );
- p_bit_stream->p_byte += i_buf_len;
- }
- else
- {
- do
- {
- p_bit_stream->p_decoder_fifo->p_vlc->pf_memcpy( p_buffer,
- p_bit_stream->p_byte, i_available );
- p_bit_stream->p_byte = p_bit_stream->p_end;
- p_buffer += i_available;
- i_buf_len -= i_available;
- BitstreamNextDataPacket( p_bit_stream );
- if( p_bit_stream->p_decoder_fifo->b_die )
- return;
- }
- while( (i_available = p_bit_stream->p_end - p_bit_stream->p_byte)
- <= (ptrdiff_t)i_buf_len );
-
- if( i_buf_len )
- {
- p_bit_stream->p_decoder_fifo->p_vlc->pf_memcpy( p_buffer,
- p_bit_stream->p_byte, i_buf_len );
- p_bit_stream->p_byte += i_buf_len;
- }
- }
-
- if( p_bit_stream->p_byte <= p_bit_stream->p_end - sizeof(WORD_TYPE) )
- {
- AlignWord( p_bit_stream );
- }
-}
-
-
-/*
- * Communication interface between input and decoders
- */
-
-/*****************************************************************************
- * Prototypes from input_dec.c
- *****************************************************************************/
-VLC_EXPORT( void, DecoderError, ( decoder_fifo_t * p_fifo ) );
#endif /* "input_ext-dec.h" */
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.99 2003/11/22 18:04:10 gbazin Exp $
+ * $Id: input_ext-intf.h,v 1.100 2003/11/24 00:39:00 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/* Decoder information */
es_format_t fmt;
- decoder_fifo_t * p_decoder_fifo;
void * p_waveformatex;
void * p_bitmapinfoheader;
void * p_spuinfo;
+ /* Decoder */
+ decoder_t * p_dec;
count_t c_packets; /* total packets read */
count_t c_invalid_packets; /* invalid packets read */
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
- * $Id: input_ext-plugins.h,v 1.42 2003/05/05 22:23:31 gbazin Exp $
+ * $Id: input_ext-plugins.h,v 1.43 2003/11/24 00:39:00 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/*****************************************************************************
* Prototypes from input_dec.c
*****************************************************************************/
-decoder_fifo_t * input_RunDecoder( input_thread_t *, es_descriptor_t * );
+decoder_t * input_RunDecoder( input_thread_t *, es_descriptor_t * );
void input_EndDecoder( input_thread_t *, es_descriptor_t * );
-VLC_EXPORT( void, input_DecodePES, ( decoder_fifo_t *, pes_packet_t * ) );
+
+VLC_EXPORT( void, input_DecodePES, ( decoder_t *, pes_packet_t * ) );
+void input_DecodeBlock( decoder_t *, block_t * );
+
void input_EscapeDiscontinuity( input_thread_t * );
void input_EscapeAudioDiscontinuity( input_thread_t * );
VLC_EXPORT( void, input_NullPacket, ( input_thread_t *, es_descriptor_t * ) );
* vlc_codec.h: codec related structures
*****************************************************************************
* Copyright (C) 1999-2003 VideoLAN
- * $Id: vlc_codec.h,v 1.4 2003/11/16 21:07:30 gbazin Exp $
+ * $Id: vlc_codec.h,v 1.5 2003/11/24 00:39:00 fenrir Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
module_t * p_module;
decoder_sys_t * p_sys;
- /* Deprecated */
- int ( * pf_decode )( decoder_t *, block_t * );
- decoder_fifo_t * p_fifo;
- int ( * pf_run ) ( decoder_fifo_t * );
- /* End deprecated */
-
picture_t * ( * pf_decode_video )( decoder_t *, block_t ** );
aout_buffer_t * ( * pf_decode_audio )( decoder_t *, block_t ** );
void ( * pf_decode_sub) ( decoder_t *, block_t ** );
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.89 2003/11/22 13:56:21 ipkiss Exp $
+ * $Id: vlc_common.h,v 1.90 2003/11/24 00:39:00 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
typedef struct slp_session_t slp_session_t;*/
/* Decoders */
-typedef struct decoder_fifo_t decoder_fifo_t;
typedef struct decoder_t decoder_t;
typedef struct decoder_sys_t decoder_sys_t;
typedef struct stream_position_t stream_position_t;
typedef struct stream_ctrl_t stream_ctrl_t;
typedef struct pes_packet_t pes_packet_t;
-typedef struct bit_stream_t bit_stream_t;
typedef struct network_socket_t network_socket_t;
typedef struct iso639_lang_t iso639_lang_t;
* vlc_es.h
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: vlc_es.h,v 1.3 2003/11/22 18:04:10 gbazin Exp $
+ * $Id: vlc_es.h,v 1.4 2003/11/24 00:39:00 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
{
char *psz_encoding;
+ struct
+ {
+ /* FIXME */
+ uint32_t palette[16+1];
+ } spu;
};
/**
* vlc_objects.h: vlc_object_t definition.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: vlc_objects.h,v 1.20 2003/10/14 22:41:41 gbazin Exp $
+ * $Id: vlc_objects.h,v 1.21 2003/11/24 00:39:00 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#define VLC_OBJECT_ITEM (-6)
#define VLC_OBJECT_INPUT (-7)
#define VLC_OBJECT_DECODER (-8)
-/* tmp for backward compat */
-#define VLC_OBJECT_DECODER_FIFO (-999)
#define VLC_OBJECT_VOUT (-9)
#define VLC_OBJECT_AOUT (-10)
#define VLC_OBJECT_SOUT (-11)
* cdda.c : CD digital audio input module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: cdda.c,v 1.6 2003/09/07 22:49:05 fenrir Exp $
+ * $Id: cdda.c,v 1.7 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
p_input->stream.p_selected_program,
p_demux->i_pts );
- if( p_demux->p_es->p_decoder_fifo )
+ if( p_demux->p_es->p_dec )
{
- input_DecodePES( p_demux->p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( p_demux->p_es->p_dec, p_pes );
}
else
{
* cddax.c : CD digital audio input module for vlc using libcdio
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: cddax.c,v 1.4 2003/11/23 14:34:19 rocky Exp $
+ * $Id: cddax.c,v 1.5 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
p_input->stream.p_selected_program,
p_demux->i_pts );
- if( p_demux->p_es->p_decoder_fifo )
+ if( p_demux->p_es->p_dec )
{
- input_DecodePES( p_demux->p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( p_demux->p_es->p_dec, p_pes );
}
else
{
* dshow.cpp : DirectShow access module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: dshow.cpp,v 1.13 2003/11/05 02:43:55 gbazin Exp $
+ * $Id: dshow.cpp,v 1.14 2003/11/24 00:39:01 fenrir Exp $
*
* Author: Gildas Bazin <gbazin@netcourrier.com>
*
p_pes->p_first->p_payload_start += 16;
p_pes->i_pes_size -= 16;
- if( p_es && p_es->p_decoder_fifo )
+ if( p_es && p_es->p_dec )
{
/* Call the pace control. */
input_ClockManageRef( p_input, p_input->stream.p_selected_program,
input_ClockGetTS( p_input, p_input->stream.p_selected_program,
i_pcr );
- input_DecodePES( p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( p_es->p_dec, p_pes );
}
else
{
i_es_index ++ )
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
- if ( p_es->p_decoder_fifo )
+ if ( p_es->p_dec )
{
ioctl_UnsetDMXFilter(p_input, p_es->i_demux_fd );
}
i_es_index ++ )
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
- if ( p_es->p_decoder_fifo )
+ if ( p_es->p_dec )
{
input_UnselectES( p_input , p_es );
}
i_es_index ++ )
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
- if ( p_es->p_decoder_fifo )
+ if ( p_es->p_dec )
{
ioctl_UnsetDMXFilter( p_es->i_demux_fd );
}
i_es_index ++ )
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
- if ( p_es->p_decoder_fifo )
+ if ( p_es->p_dec )
{
input_UnselectES( p_input , p_es );
}
* v4l.c : Video4Linux input module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: v4l.c,v 1.31 2003/11/23 18:31:54 alexis Exp $
+ * $Id: v4l.c,v 1.32 2003/11/24 00:39:01 fenrir Exp $
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
* Paul Forgey <paulf at aphrodite dot com>
p_pes->p_first->p_payload_start += 16;
p_pes->i_pes_size -= 16;
- if( p_es && p_es->p_decoder_fifo )
+ if( p_es && p_es->p_dec )
{
- vlc_mutex_lock( &p_es->p_decoder_fifo->data_lock );
- if( p_es->p_decoder_fifo->i_depth >= MAX_PACKETS_IN_FIFO )
- {
- /* Wait for the decoder. */
- vlc_cond_wait( &p_es->p_decoder_fifo->data_wait,
- &p_es->p_decoder_fifo->data_lock );
- }
- vlc_mutex_unlock( &p_es->p_decoder_fifo->data_lock );
- p_pes->i_pts = p_pes->i_dts = i_pts + p_input->i_pts_delay;
+ p_pes->i_pts =
+ p_pes->i_dts = i_pts + p_input->i_pts_delay;
- input_DecodePES( p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( p_es->p_dec, p_pes );
}
else
{
* dvbsub.c : DVB subtitles decoder thread
*****************************************************************************
* Copyright (C) 2003 ANEVIA
- * $Id: dvbsub.c,v 1.4 2003/11/22 23:39:14 fenrir Exp $
+ * Copyright (C) 2003 VideoLAN
+ * $Id: dvbsub.c,v 1.5 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Damien LUCAS <damien.lucas@anevia.com>
*
#include <vlc/vout.h>
#include <vlc/decoder.h>
-#include "codecs.h"
+#include "vlc_bits.h"
+
+/*****************************************************************************
+ * Module descriptor.
+ *****************************************************************************/
+static int Open ( vlc_object_t *p_this );
+static void Close( vlc_object_t *p_this );
+
+vlc_module_begin();
+ add_category_hint( N_("subtitles"), NULL, VLC_TRUE );
+ set_description( _("subtitles decoder") );
+ set_capability( "decoder", 50 );
+ set_callbacks( Open, Close );
+vlc_module_end();
+
// Wow, that's ugly but very usefull for a memory leak track
// so I just keep it
dvbsub_object_t* p_objects;
subpicture_t* p_spu[16];
} dvbsub_all_t;
-typedef struct
-{
- /* Thread properties and locks */
- vlc_thread_t thread_id; /* Id for thread functions */
- /* Input properties */
- decoder_fifo_t* p_fifo; /* Stores the PES stream data */
- bit_stream_t bit_stream; /* PES data at the bit level */
- /* Output properties */
- vout_thread_t* p_vout; /* Needed to create the subpictures */
-} dvbsub_thread_t;
+
struct subpicture_sys_t
{
mtime_t i_pts;
vlc_object_t* p_input; /* Link to the input */
vlc_bool_t b_obsolete;
};
+
+struct decoder_sys_t
+{
+ vout_thread_t *p_vout;
+ mtime_t i_pts;
+
+ bs_t bs;
+};
+
+
// List of different SEGMENT TYPES
// According to EN 300-743, table 2
#define DVBSUB_ST_PAGE_COMPOSITION 0x10
/*****************************************************************************
* Local prototypes
*****************************************************************************/
-static int OpenDecoder ( vlc_object_t * );
-static int RunDecoder ( decoder_fifo_t * );
-static int InitThread ( dvbsub_thread_t * );
-static void EndThread ( dvbsub_thread_t *i, dvbsub_all_t*);
-static vout_thread_t *FindVout( dvbsub_thread_t * );
+static void Decode ( decoder_t *, block_t ** );
+
+static vout_thread_t *FindVout( decoder_t * );
+
static void RenderI42x( vout_thread_t *, picture_t *, const subpicture_t *,
vlc_bool_t );
static void RenderYUY2( vout_thread_t *, picture_t *, const subpicture_t *,
/*****************************************************************************
- * Module descriptor.
- *****************************************************************************/
-vlc_module_begin();
- add_category_hint( N_("subtitles"), NULL, VLC_TRUE );
- set_description( _("subtitles decoder") );
- set_capability( "decoder", 50 );
- set_callbacks( OpenDecoder, NULL );
-vlc_module_end();
-/*****************************************************************************
- * OpenDecoder: probe the decoder and return score
+ * Open: probe the decoder and return score
*****************************************************************************
* Tries to launch a decoder and return score so that the interface is able
* to chose.
*****************************************************************************/
-static int OpenDecoder( vlc_object_t *p_this )
+static int Open( vlc_object_t *p_this )
{
- decoder_t *p_dec = (decoder_t*) p_this;
+ decoder_t *p_dec = (decoder_t*) p_this;
+ decoder_sys_t *p_sys;
+
if( p_dec->fmt_in.i_codec != VLC_FOURCC('d','v','b','s') )
{
return VLC_EGENERIC;
}
- p_dec->pf_run = RunDecoder;
+
+ p_dec->pf_decode_subs = Decode;
+ p_sys = p_dec->p_sys = malloc( sizeof( decoder_sys_t ) );
+
+ p_sys->p_vout = NULL;
+ p_sys->i_pts = 0;
+
+ es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_FOURCC( 'd','v','b','s' ) );
+
return VLC_SUCCESS;
}
+
+/*****************************************************************************
+ * Close:
+ *****************************************************************************/
+static void Close( vlc_object_t *p_this )
+{
+ decoder_t *p_dec = (decoder_t*) p_this;
+ decoder_sys_t *p_sys = p_dec->p_sys;
+
+ if( p_sys->p_vout && p_sys->p_vout->p_subpicture != NULL )
+ {
+ subpicture_t * p_subpic;
+ int i_subpic;
+ for( i_subpic = 0; i_subpic < VOUT_MAX_SUBPICTURES; i_subpic++ )
+ {
+ p_subpic = &p_sys->p_vout->p_subpicture[i_subpic];
+ if( p_subpic != NULL &&
+ ( ( p_subpic->i_status == RESERVED_SUBPICTURE )
+ || ( p_subpic->i_status == READY_SUBPICTURE ) ) )
+ {
+ vout_DestroySubPicture( p_sys->p_vout, p_subpic );
+ }
+ }
+ }
+
+ trox_call();
+}
+
/*****************************************************************************
* RunDecoder: this function is called just after the thread is created
*****************************************************************************/
free_all(&dvbsub);
return 0;
}
+
/* following functions are local */
-/*****************************************************************************
- * InitThread: initialize dvbsub decoder thread
- *****************************************************************************
- * This function is called from RunThread and performs the second step of the
- * initialization. It returns 0 on success. Note that the thread's flag are not
- * modified inside this function.
- *****************************************************************************/
-static int InitThread( dvbsub_thread_t *p_dvbsubdec )
-{
- int i_ret;
- /* Call InitBitstream anyway so p_spudec->bit_stream is in a known
- * state before calling CloseBitstream */
- i_ret = InitBitstream( &p_dvbsubdec->bit_stream, p_dvbsubdec->p_fifo,
- NULL, NULL );
- /* Check for a video output */
- p_dvbsubdec->p_vout = FindVout( p_dvbsubdec );
- if( !p_dvbsubdec->p_vout )
- {
- return -1;
- }
- /* It was just a check */
- vlc_object_release( p_dvbsubdec->p_vout );
- p_dvbsubdec->p_vout = NULL;
- return i_ret;
-}
/*****************************************************************************
* FindVout: Find a vout or wait for one to be created.
*****************************************************************************/
-static vout_thread_t *FindVout( dvbsub_thread_t *p_spudec )
+static vout_thread_t *FindVout( decoder_t *p_dec )
{
- vout_thread_t *p_vout = NULL;
- /* Find an available video output */
- do
+ for( ;; )
{
- if( p_spudec->p_fifo->b_die || p_spudec->p_fifo->b_error )
+ vout_thread_t *p_vout;
+
+ if( p_dec->b_die || p_dec->b_error )
{
- break;
+ return NULL;
}
- p_vout = vlc_object_find( p_spudec->p_fifo, VLC_OBJECT_VOUT,
- FIND_ANYWHERE );
+ p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE );
if( p_vout )
{
- break;
+ return p_vout;
}
msleep( VOUT_OUTMEM_SLEEP );
}
- while( 1 );
- return p_vout;
}
+
/*****************************************************************************
* EndThread: thread destruction
*****************************************************************************
* audio.c: audio decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2003 VideoLAN
- * $Id: audio.c,v 1.25 2003/11/22 23:39:14 fenrir Exp $
+ * $Id: audio.c,v 1.26 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
AVCodec *p_codec, int i_codec_id, char *psz_namecodec )
{
decoder_sys_t *p_sys;
+ vlc_value_t lockval;
+
+ var_Get( p_dec->p_libvlc, "avcodec", &lockval );
/* Allocate the memory needed to store the decoder's structure */
if( ( p_dec->p_sys = p_sys =
}
/* ***** Open the codec ***** */
+ vlc_mutex_lock( lockval.p_address );
if (avcodec_open( p_sys->p_context, p_sys->p_codec ) < 0)
{
+ vlc_mutex_unlock( lockval.p_address );
msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
return VLC_EGENERIC;
}
- else
- {
- msg_Dbg( p_dec, "ffmpeg codec (%s) started", p_sys->psz_namecodec );
- }
+ vlc_mutex_unlock( lockval.p_address );
+
+ msg_Dbg( p_dec, "ffmpeg codec (%s) started", p_sys->psz_namecodec );
p_sys->p_output = malloc( 3 * AVCODEC_MAX_AUDIO_FRAME_SIZE );
* video.c: video decoder using the ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: video.c,v 1.51 2003/11/23 20:37:04 gbazin Exp $
+ * $Id: video.c,v 1.52 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
AVCodec *p_codec, int i_codec_id, char *psz_namecodec )
{
decoder_sys_t *p_sys;
+ vlc_value_t lockval;
vlc_value_t val;
int i_tmp;
+
+ var_Get( p_dec->p_libvlc, "avcodec", &lockval );
+
/* Allocate the memory needed to store the decoder's structure */
if( ( p_dec->p_sys = p_sys =
(decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
#endif
/* ***** Open the codec ***** */
+ vlc_mutex_lock( lockval.p_address );
if( avcodec_open( p_sys->p_context, p_sys->p_codec ) < 0 )
{
+ vlc_mutex_unlock( lockval.p_address );
msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
return VLC_EGENERIC;
}
- else
- {
- msg_Dbg( p_dec, "ffmpeg codec (%s) started", p_sys->psz_namecodec );
- }
+ vlc_mutex_unlock( lockval.p_address );
+ msg_Dbg( p_dec, "ffmpeg codec (%s) started", p_sys->psz_namecodec );
/* ***** ffmpeg frame skipping ***** */
var_Create( p_dec, "ffmpeg-hurry-up", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
* parse.c: SPU parser
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: parse.c,v 1.15 2003/11/22 23:39:14 fenrir Exp $
+ * $Id: parse.c,v 1.16 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Laurent Aimar <fenrir@via.ecp.fr>
case SPU_CMD_SET_PALETTE:
/* 03xxxx (palette) */
- if( p_dec->p_fifo->p_demux_data
- && *(int*)p_dec->p_fifo->p_demux_data == 0xBeeF )
+ if( p_dec->fmt_in.subs.spu.palette[0] == 0xBeeF )
{
unsigned int idx[4];
for( i = 0; i < 4 ; i++ )
{
- uint32_t i_color;
- i_color = ((uint32_t*)((char*)p_dec->p_fifo->p_demux_data +
- sizeof(int)))[idx[i]];
+ uint32_t i_color = p_dec->fmt_in.subs.spu.palette[1+idx[i]];
/* FIXME: this job should be done sooner */
p_spu->p_sys->pi_yuv[3-i][0] = (i_color>>16) & 0xff;
* flac.c : FLAC demux module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: flac.c,v 1.8 2003/11/21 20:49:13 gbazin Exp $
+ * $Id: flac.c,v 1.9 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
* Load the FLAC packetizer
*/
p_sys->p_packetizer = vlc_object_create( p_input, VLC_OBJECT_DECODER );
- p_sys->p_packetizer->pf_decode = 0;
p_sys->p_packetizer->pf_decode_audio = 0;
p_sys->p_packetizer->pf_decode_video = 0;
p_sys->p_packetizer->pf_decode_sub = 0;
p_sys->p_packetizer->pf_packetize = 0;
- p_sys->p_packetizer->pf_run = 0;
/* Initialization of decoder structure */
es_format_Init( &p_sys->p_packetizer->fmt_in, AUDIO_ES,
* mp4.c : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: mp4.c,v 1.41 2003/11/23 13:15:27 gbazin Exp $
+ * $Id: mp4.c,v 1.42 2003/11/24 00:39:01 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
}
else if( track.b_ok )
{
- if( track.b_selected && track.p_es->p_decoder_fifo == NULL )
+ if( track.b_selected && track.p_es->p_dec == NULL )
{
MP4_TrackUnselect( p_input, &track );
}
- else if( !track.b_selected && track.p_es->p_decoder_fifo != NULL )
+ else if( !track.b_selected && track.p_es->p_dec != NULL )
{
MP4_TrackSelect( p_input, &track, MP4_GetMoviePTS( p_demux ) );
}
p_pes->i_pts = 0;
}
- if( track.p_es->p_decoder_fifo )
+ if( track.p_es->p_dec )
{
p_pes->i_rate = p_input->stream.control.i_rate;
- input_DecodePES( track.p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( track.p_es->p_dec, p_pes );
}
else
{
}
/* select again the new decoder */
- if( p_track->b_selected && p_track->p_es && p_track->p_es->p_decoder_fifo == NULL )
+ if( p_track->b_selected && p_track->p_es && p_track->p_es->p_dec == NULL )
{
vlc_mutex_lock( &p_input->stream.stream_lock );
input_SelectES( p_input, p_track->p_es );
vlc_mutex_unlock( &p_input->stream.stream_lock );
- if( p_track->p_es->p_decoder_fifo )
+ if( p_track->p_es->p_dec )
{
if( p_track->p_pes_init != NULL )
{
p_track->p_pes_init->i_rate = p_input->stream.control.i_rate;
- input_DecodePES( p_track->p_es->p_decoder_fifo,
+ input_DecodePES( p_track->p_es->p_dec,
p_track->p_pes_init );
p_track->p_pes_init = NULL;
}
return;
}
- if( p_track->p_es->p_decoder_fifo )
+ if( p_track->p_es->p_dec )
{
vlc_mutex_lock( &p_input->stream.stream_lock );
input_UnselectES( p_input, p_track->p_es );
* m4v.c : MPEG-4 video Stream input module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: m4v.c,v 1.8 2003/09/10 11:51:00 fenrir Exp $
+ * $Id: m4v.c,v 1.9 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
p_input->stream.p_selected_program,
p_demux->i_dts );
- if( !p_demux->p_es->p_decoder_fifo )
+ if( !p_demux->p_es->p_dec )
{
msg_Err( p_input, "no video decoder" );
input_DeletePES( p_input->p_method_data, p_pes );
}
else
{
- input_DecodePES( p_demux->p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( p_demux->p_es->p_dec, p_pes );
}
/* FIXME FIXME FIXME FIXME */
p_demux->i_dts += (mtime_t)90000 / 25;
* mpgv.c : MPEG-I/II Video demuxer
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: mpgv.c,v 1.1 2003/11/22 17:03:57 fenrir Exp $
+ * $Id: mpgv.c,v 1.2 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* Load the mpegvideo packetizer
*/
p_sys->p_packetizer = vlc_object_create( p_input, VLC_OBJECT_PACKETIZER );
- p_sys->p_packetizer->pf_decode = NULL;
p_sys->p_packetizer->pf_decode_audio = NULL;
p_sys->p_packetizer->pf_decode_video = NULL;
p_sys->p_packetizer->pf_decode_sub = NULL;
p_sys->p_packetizer->pf_packetize = NULL;
- p_sys->p_packetizer->pf_run = NULL;
es_format_Init( &p_sys->p_packetizer->fmt_in, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) );
es_format_Init( &p_sys->p_packetizer->fmt_out, UNKNOWN_ES, 0 );
p_sys->p_packetizer->p_module =
* system.c: helper module for TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: system.c,v 1.19 2003/11/06 16:36:41 nitrox Exp $
+ * $Id: system.c,v 1.20 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
/* Now we can eventually put the PES packet in the decoder's
* PES fifo */
- if( p_es->p_decoder_fifo != NULL )
+ if( p_es->p_dec != NULL )
{
- input_DecodePES( p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( p_es->p_dec, p_pes );
}
- else if ( p_es->p_decoder_fifo == NULL &&
+ else if ( p_es->p_dec == NULL &&
((es_ts_data_t*)p_es->p_demux_data)->b_dvbsub)
{
es_descriptor_t* p_dvbsub;
for(i = 0; i < i_count; i++)
{
p_dvbsub = ((es_ts_data_t*)p_es->p_demux_data)->p_dvbsub_es[i];
- if(p_dvbsub->p_decoder_fifo!=NULL)
+ if(p_dvbsub->p_dec !=NULL)
{
- input_DecodePES ( p_dvbsub->p_decoder_fifo, p_pes );
+ input_DecodePES ( p_dvbsub->p_dec, p_pes );
break;
}
}
p_es = ParsePS( p_input, p_data );
vlc_mutex_lock( &p_input->stream.control.control_lock );
- if( p_es != NULL && p_es->p_decoder_fifo != NULL
+ if( p_es != NULL && p_es->p_dec != NULL
&& (p_es->i_cat != AUDIO_ES || !p_input->stream.control.b_mute) )
{
vlc_mutex_unlock( &p_input->stream.control.control_lock );
/* Not selected. Just read the adaptation field for a PCR. */
b_trash = 1;
}
- else if( p_es->p_decoder_fifo == NULL && !b_psi && !b_dvbsub )
+ else if( p_es->p_dec == NULL && !b_psi && !b_dvbsub )
{
b_trash = 1;
}
* may still be null. Who said it was ugly ?
* I have written worse. --Meuuh */
if( ( p_es ) &&
- ((p_es->p_decoder_fifo != NULL) || b_psi || b_pcr || b_dvbsub) )
+ ((p_es->p_dec != NULL) || b_psi || b_pcr || b_dvbsub) )
{
p_es->c_packets++;
* rawdv.c : raw dv input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: rawdv.c,v 1.10 2003/09/07 22:48:29 fenrir Exp $
+ * $Id: rawdv.c,v 1.11 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
}
/* Build video PES packet */
- if( p_rawdv->p_video_es->p_decoder_fifo )
+ if( p_rawdv->p_video_es->p_dec )
{
p_pes = input_NewPES( p_input->p_method_data );
if( p_pes == NULL )
}
/* Do the same for audio */
- if( p_rawdv->p_audio_es->p_decoder_fifo )
+ if( p_rawdv->p_audio_es->p_dec )
{
p_audio_pes = input_NewPES( p_input->p_method_data );
if( p_audio_pes == NULL )
}
p_audio_pes->i_rate = p_input->stream.control.i_rate;
- if( p_rawdv->p_video_es->p_decoder_fifo )
+ if( p_rawdv->p_video_es->p_dec )
p_audio_pes->p_first = p_audio_pes->p_last =
input_ShareBuffer( p_input->p_method_data, p_data->p_buffer );
else
}
/* Decode PES packets if stream is selected */
- if( p_rawdv->p_video_es->p_decoder_fifo )
- input_DecodePES( p_rawdv->p_video_es->p_decoder_fifo, p_pes );
- if( p_rawdv->p_audio_es->p_decoder_fifo )
- input_DecodePES( p_rawdv->p_audio_es->p_decoder_fifo, p_audio_pes );
+ if( p_rawdv->p_video_es->p_dec )
+ input_DecodePES( p_rawdv->p_video_es->p_dec, p_pes );
+ if( p_rawdv->p_audio_es->p_dec )
+ input_DecodePES( p_rawdv->p_audio_es->p_dec, p_audio_pes );
p_rawdv->i_pcr += ( 90000 / p_rawdv->f_rate );
- if( !p_rawdv->p_video_es->p_decoder_fifo &&
- !p_rawdv->p_audio_es->p_decoder_fifo )
+ if( !p_rawdv->p_video_es->p_dec &&
+ !p_rawdv->p_audio_es->p_dec )
input_DeletePacket( p_input->p_method_data, p_data );
return 1;
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.cpp,v 1.38 2003/10/21 01:48:02 titer Exp $
+ * $Id: VlcWrapper.cpp,v 1.39 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
for( unsigned int i = 0; i < p_input->stream.i_es_number; i++ )
{
if( ( p_input->stream.pp_es[i]->i_cat == VIDEO_ES ) &&
- ( p_input->stream.pp_es[i]->p_decoder_fifo != NULL ) )
+ ( p_input->stream.pp_es[i]->p_dec != NULL ) )
{
input_UnselectES( p_input, p_input->stream.pp_es[i] );
input_SelectES( p_input, p_input->stream.pp_es[i] );
* menu.c : functions to handle menu items.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: menu.c,v 1.11 2003/08/04 12:34:20 jpsaman Exp $
+ * $Id: menu.c,v 1.12 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
for( i = 0 ; i < p_intf->p_sys->p_input->stream.i_es_number ; i++ )
{
if( ( ES->i_cat == VIDEO_ES ) &&
- ES->p_decoder_fifo != NULL )
+ ES->p_dec != NULL )
{
input_UnselectES( p_intf->p_sys->p_input, ES );
input_SelectES( p_intf->p_sys->p_input, ES );
* display.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: display.c,v 1.7 2003/11/21 15:32:08 fenrir Exp $
+ * $Id: display.c,v 1.8 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
p_buffer->p_buffer,
p_buffer->i_size );
- if( id->p_es->p_decoder_fifo )
+ if( id->p_es->p_dec )
{
- input_DecodePES( id->p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( id->p_es->p_dec, p_pes );
}
else
{
* decoders.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: input.c,v 1.260 2003/11/22 13:19:30 gbazin Exp $
+ * $Id: input.c,v 1.261 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <vlc/vlc.h>
#include <vlc/input.h>
+#include <vlc/decoder.h>
#include <vlc/vout.h>
#ifdef HAVE_SYS_TIMES_H
msg_Err( p_input, "FIXME unselect es in es_out_Add" );
}
input_SelectES( p_input, id->p_es );
- if( id->p_es->p_decoder_fifo )
+ if( id->p_es->p_dec )
{
out->p_sys->i_audio = fmt->i_priority;
}
msg_Err( p_input, "FIXME unselect es in es_out_Add" );
}
input_SelectES( p_input, id->p_es );
- if( id->p_es->p_decoder_fifo )
+ if( id->p_es->p_dec )
{
out->p_sys->i_video = fmt->i_priority;
}
static int EsOutSend( es_out_t *out, es_out_id_t *id, block_t *p_block )
{
- if( id->p_es->p_decoder_fifo )
+ if( id->p_es->p_dec )
{
- pes_packet_t *p_pes;
-
- if( !(p_pes = input_NewPES( out->p_sys->p_input->p_method_data ) ) )
- {
- return VLC_SUCCESS;
- }
-
- p_pes->p_first = p_pes->p_last =
- input_NewPacket( out->p_sys->p_input->p_method_data,
- p_block->i_buffer );
-
- p_pes->i_nb_data = 1;
- p_pes->i_pts = p_block->i_pts;
- p_pes->i_dts = p_block->i_dts;
-
- p_pes->p_first->p_payload_end =
- p_pes->p_first->p_payload_start + p_block->i_buffer;
- memcpy( p_pes->p_first->p_payload_start,
- p_block->p_buffer, p_block->i_buffer );
-
- block_Release( p_block );
-
- input_DecodePES( id->p_es->p_decoder_fifo, p_pes );
+ input_DecodeBlock( id->p_es->p_dec, p_block );
}
else
{
static int EsOutSendPES( es_out_t *out, es_out_id_t *id, pes_packet_t *p_pes )
{
- if( id->p_es->p_decoder_fifo )
+ if( id->p_es->p_dec )
{
- input_DecodePES( id->p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( id->p_es->p_dec, p_pes );
}
else
{
TAB_REMOVE( p_sys->i_id, p_sys->id, id );
vlc_mutex_lock( &p_sys->p_input->stream.stream_lock );
- if( id->p_es->p_decoder_fifo )
+ if( id->p_es->p_dec )
{
input_UnselectES( p_sys->p_input, id->p_es );
}
vlc_mutex_lock( &p_sys->p_input->stream.stream_lock );
id = (es_out_id_t*) va_arg( args, es_out_id_t * );
b = (vlc_bool_t) va_arg( args, vlc_bool_t );
- if( b && id->p_es->p_decoder_fifo == NULL )
+ if( b && id->p_es->p_dec == NULL )
{
input_SelectES( p_sys->p_input, id->p_es );
vlc_mutex_unlock( &p_sys->p_input->stream.stream_lock );
- return id->p_es->p_decoder_fifo ? VLC_SUCCESS : VLC_EGENERIC;
+ return id->p_es->p_dec ? VLC_SUCCESS : VLC_EGENERIC;
}
- else if( !b && id->p_es->p_decoder_fifo )
+ else if( !b && id->p_es->p_dec )
{
input_UnselectES( p_sys->p_input, id->p_es );
vlc_mutex_unlock( &p_sys->p_input->stream.stream_lock );
id = (es_out_id_t*) va_arg( args, es_out_id_t * );
pb = (vlc_bool_t*) va_arg( args, vlc_bool_t * );
- *pb = id->p_es->p_decoder_fifo ? VLC_TRUE : VLC_FALSE;
+ *pb = id->p_es->p_dec ? VLC_TRUE : VLC_FALSE;
return VLC_SUCCESS;
default:
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.75 2003/11/23 18:21:48 gbazin Exp $
+ * $Id: input_dec.c,v 1.76 2003/11/24 00:39:02 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
static es_format_t null_es_format = {0};
+struct decoder_owner_sys_t
+{
+ aout_instance_t *p_aout;
+ aout_input_t *p_aout_input;
+
+ vout_thread_t *p_vout;
+
+ sout_packetizer_input_t *p_sout;
+
+ /* Current format in use by the output */
+ video_format_t video;
+ audio_format_t audio;
+ es_format_t sout;
+
+ /* fifo */
+ block_fifo_t *p_fifo;
+};
+
+
/*****************************************************************************
* input_RunDecoder: spawns a new decoder thread
*****************************************************************************/
-decoder_fifo_t * input_RunDecoder( input_thread_t * p_input,
- es_descriptor_t * p_es )
+decoder_t * input_RunDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
{
- vlc_value_t val;
decoder_t *p_dec = NULL;
+ vlc_value_t val;
int i_priority;
/* If we are in sout mode, search for packetizer module */
{
msg_Err( p_dec, "no suitable decoder module for fourcc `%4.4s'.\n"
"VLC probably does not support this sound or video format.",
- (char*)&p_dec->p_fifo->i_fourcc );
+ (char*)&p_dec->fmt_in.i_codec );
DeleteDecoder( p_dec );
vlc_object_destroy( p_dec );
p_input->stream.b_changed = 1;
- return p_dec->p_fifo;
+ return p_dec;
}
/*****************************************************************************
*****************************************************************************/
void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
{
+ decoder_t *p_dec = p_es->p_dec;
int i_dummy;
- decoder_t *p_dec = p_es->p_decoder_fifo->p_dec;
- p_es->p_decoder_fifo->b_die = 1;
- p_es->p_decoder_fifo->p_dec->b_die = 1;
+ p_dec->b_die = VLC_TRUE;
/* Make sure the thread leaves the NextDataPacket() function by
* sending it a few null packets. */
if( p_es->p_pes != NULL )
{
- input_DecodePES( p_es->p_decoder_fifo, p_es->p_pes );
+ input_DecodePES( p_es->p_dec, p_es->p_pes );
}
/* Waiting for the thread to exit */
vlc_object_destroy( p_dec );
/* Tell the input there is no more decoder */
- p_es->p_decoder_fifo = NULL;
+ p_es->p_dec = NULL;
p_input->stream.b_changed = 1;
}
*****************************************************************************
* Put a PES in the decoder's fifo.
*****************************************************************************/
-void input_DecodePES( decoder_fifo_t * p_decoder_fifo, pes_packet_t * p_pes )
+void input_DecodePES( decoder_t * p_dec, pes_packet_t * p_pes )
{
- vlc_mutex_lock( &p_decoder_fifo->data_lock );
+ data_packet_t *p_data;
+ int i_size = 0;
- p_pes->p_next = NULL;
- *p_decoder_fifo->pp_last = p_pes;
- p_decoder_fifo->pp_last = &p_pes->p_next;
- p_decoder_fifo->i_depth++;
+ for( p_data = p_pes->p_first; p_data != NULL; p_data = p_data->p_next )
+ {
+ i_size += p_data->p_payload_end - p_data->p_payload_start;
+ }
+ if( i_size > 0 )
+ {
+ block_t *p_block = block_New( p_dec, i_size );
+ if( p_block )
+ {
+ uint8_t *p_buffer = p_block->p_buffer;
+
+ for( p_data = p_pes->p_first; p_data != NULL; p_data = p_data->p_next )
+ {
+ int i_copy = p_data->p_payload_end - p_data->p_payload_start;
+
+ memcpy( p_buffer, p_data->p_payload_start, i_copy );
- /* Warn the decoder that it's got work to do. */
- vlc_cond_signal( &p_decoder_fifo->data_wait );
- vlc_mutex_unlock( &p_decoder_fifo->data_lock );
+ p_buffer += i_copy;
+ }
+ p_block->i_pts = p_pes->i_pts;
+ p_block->i_dts = p_pes->i_dts;
+ p_block->b_discontinuity = p_pes->b_discontinuity;
+
+ block_FifoPut( p_dec->p_owner->p_fifo, p_block );
+ }
+ }
+}
+/*****************************************************************************
+ * input_DecodeBlock
+ *****************************************************************************
+ * Put a block_t in the decoder's fifo.
+ *****************************************************************************/
+void input_DecodeBlock( decoder_t * p_dec, block_t *p_block )
+{
+ block_FifoPut( p_dec->p_owner->p_fifo, p_block );
}
/*****************************************************************************
p_pes->p_first = p_pes->p_last = p_pad_data;
p_pes->i_nb_data = 1;
p_pes->b_discontinuity = 1;
- input_DecodePES( p_es->p_decoder_fifo, p_pes );
+ input_DecodePES( p_es->p_dec, p_pes );
}
}
{
es_descriptor_t * p_es = p_input->stream.pp_selected_es[i_es];
- if( p_es->p_decoder_fifo != NULL )
+ if( p_es->p_dec != NULL )
{
for( i = 0; i < PADDING_PACKET_NUMBER; i++ )
{
{
es_descriptor_t * p_es = p_input->stream.pp_selected_es[i_es];
- if( p_es->p_decoder_fifo != NULL && p_es->i_cat == AUDIO_ES )
+ if( p_es->p_dec != NULL && p_es->i_cat == AUDIO_ES )
{
for( i = 0; i < PADDING_PACKET_NUMBER; i++ )
{
}
}
-struct decoder_owner_sys_t
-{
- aout_instance_t *p_aout;
- aout_input_t *p_aout_input;
-
- vout_thread_t *p_vout;
-
- sout_packetizer_input_t *p_sout;
-
- /* Current format in use by the output */
- video_format_t video;
- audio_format_t audio;
- es_format_t sout;
-};
-
/*****************************************************************************
* CreateDecoder: create a decoder object
*****************************************************************************/
return NULL;
}
- p_dec->pf_decode = 0;
p_dec->pf_decode_audio = 0;
p_dec->pf_decode_video = 0;
p_dec->pf_decode_sub = 0;
p_dec->pf_packetize = 0;
- p_dec->pf_run = 0;
/* Select a new ES */
INSERT_ELEM( p_input->stream.pp_selected_es,
p_input->stream.i_selected_es_number,
p_es );
- /* Allocate the memory needed to store the decoder's fifo */
- p_dec->p_fifo = vlc_object_create( p_input, VLC_OBJECT_DECODER_FIFO );
- if( p_dec->p_fifo == NULL )
- {
- msg_Err( p_input, "out of memory" );
- return NULL;
- }
-
/* Initialize the decoder fifo */
p_dec->p_module = NULL;
p_dec->fmt_in.video.i_width = p_bih->biWidth;
p_dec->fmt_in.video.i_height = p_bih->biHeight;
}
+ /* FIXME
+ * - 1: beurk
+ * - 2: I'm not sure there isn't any endian problem here ... */
+ if( p_es->i_cat == SPU_ES &&
+ ( p_es->i_fourcc == VLC_FOURCC( 's', 'p', 'u', ' ' ) ||
+ p_es->i_fourcc == VLC_FOURCC( 's', 'p', 'u', 'b' ) ) &&
+ p_es->p_demux_data &&
+ *((uint32_t*)p_es->p_demux_data) == 0xBeef )
+ {
+ memcpy( p_dec->fmt_in.subs.spu.palette,
+ p_es->p_demux_data, 17 * 4 );
+ }
p_dec->fmt_in.i_cat = p_es->i_cat;
p_dec->fmt_in.i_codec = p_es->i_fourcc;
p_dec->p_owner->p_aout_input = NULL;
p_dec->p_owner->p_vout = NULL;
p_dec->p_owner->p_sout = NULL;
+ /* decoder fifo */
+ if( ( p_dec->p_owner->p_fifo = block_FifoNew( p_dec ) ) == NULL )
+ {
+ msg_Err( p_dec, "out of memory" );
+ return NULL;
+ }
/* Set buffers allocation callbacks for the decoders */
p_dec->pf_aout_buffer_new = aout_new_buffer;
p_dec->pf_vout_buffer_new = vout_new_buffer;
p_dec->pf_vout_buffer_del = vout_del_buffer;
- /* For old decoders only */
- vlc_mutex_init( p_input, &p_dec->p_fifo->data_lock );
- vlc_cond_init( p_input, &p_dec->p_fifo->data_wait );
- p_es->p_decoder_fifo = p_dec->p_fifo;
- p_dec->p_fifo->i_id = p_es->i_id;
- p_dec->p_fifo->i_fourcc = p_es->i_fourcc;
- p_dec->p_fifo->p_demux_data = p_es->p_demux_data;
- p_dec->p_fifo->p_waveformatex = p_es->p_waveformatex;
- p_dec->p_fifo->p_bitmapinfoheader = p_es->p_bitmapinfoheader;
- p_dec->p_fifo->p_spuinfo = p_es->p_spuinfo;
- p_dec->p_fifo->p_stream_ctrl = &p_input->stream.control;
- p_dec->p_fifo->p_sout = p_input->stream.p_sout;
- p_dec->p_fifo->p_first = NULL;
- p_dec->p_fifo->pp_last = &p_dec->p_fifo->p_first;
- p_dec->p_fifo->i_depth = 0;
- p_dec->p_fifo->b_die = p_dec->p_fifo->b_error = 0;
- p_dec->p_fifo->p_packets_mgt = p_input->p_method_data;
- p_dec->p_fifo->p_dec = p_dec;
- vlc_object_attach( p_dec->p_fifo, p_input );
-
vlc_object_attach( p_dec, p_input );
return p_dec;
*****************************************************************************/
static int DecoderThread( decoder_t * p_dec )
{
- pes_packet_t *p_pes;
- data_packet_t *p_data;
block_t *p_block;
- /* Temporary wrapper to keep old decoder api functional */
- if( p_dec->pf_run )
- {
- p_dec->pf_run( p_dec->p_fifo );
- return 0;
- }
-
/* The decoder's main loop */
- while( !p_dec->p_fifo->b_die && !p_dec->p_fifo->b_error &&
- !p_dec->b_die && !p_dec->b_error )
+ while( !p_dec->b_die && !p_dec->b_error )
{
int i_size;
- input_ExtractPES( p_dec->p_fifo, &p_pes );
- if( !p_pes )
+ if( ( p_block = block_FifoGet( p_dec->p_owner->p_fifo ) ) == NULL )
{
- p_dec->p_fifo->b_error = 1;
+ p_dec->b_error = 1;
break;
}
- for( i_size = 0, p_data = p_pes->p_first;
- p_data != NULL; p_data = p_data->p_next )
- {
- i_size += p_data->p_payload_end - p_data->p_payload_start;
- }
- p_block = block_New( p_dec, i_size );
- for( i_size = 0, p_data = p_pes->p_first;
- p_data != NULL; p_data = p_data->p_next )
- {
- if( p_data->p_payload_end == p_data->p_payload_start )
- continue;
- memcpy( p_block->p_buffer + i_size, p_data->p_payload_start,
- p_data->p_payload_end - p_data->p_payload_start );
- i_size += p_data->p_payload_end - p_data->p_payload_start;
- }
-
- p_block->i_pts = p_pes->i_pts;
- p_block->i_dts = p_pes->i_dts;
- p_block->b_discontinuity = p_pes->b_discontinuity;
-
if( p_dec->i_object_type == VLC_OBJECT_PACKETIZER )
{
block_t *p_sout_block;
p_dec->b_error = 1;
break;
}
-
- input_DeletePES( p_dec->p_fifo->p_packets_mgt, p_pes );
}
- while( !p_dec->p_fifo->b_die && !p_dec->b_die )
+ while( !p_dec->b_die )
{
/* Trash all received PES packets */
- input_ExtractPES( p_dec->p_fifo, NULL );
+ p_block = block_FifoGet( p_dec->p_owner->p_fifo );
+ if( p_block )
+ {
+ block_Release( p_block );
+ }
}
/* XXX We do it here because of dll loader that want close in the
static void DeleteDecoder( decoder_t * p_dec )
{
vlc_object_detach( p_dec );
- vlc_object_detach( p_dec->p_fifo );
msg_Dbg( p_dec,
- "killing decoder for 0x%x, fourcc `%4.4s', %d PES in FIFO",
- p_dec->p_fifo->i_id, (char*)&p_dec->p_fifo->i_fourcc,
- p_dec->p_fifo->i_depth );
+ "killing decoder fourcc `%4.4s', %d PES in FIFO",
+ (char*)&p_dec->fmt_in.i_codec,
+ p_dec->p_owner->p_fifo->i_depth );
/* Free all packets still in the decoder fifo. */
- input_DeletePES( p_dec->p_fifo->p_packets_mgt,
- p_dec->p_fifo->p_first );
-
- /* Destroy the lock and cond */
- vlc_cond_destroy( &p_dec->p_fifo->data_wait );
- vlc_mutex_destroy( &p_dec->p_fifo->data_lock );
+ block_FifoEmpty( p_dec->p_owner->p_fifo );
+ block_FifoRelease( p_dec->p_owner->p_fifo );
- /* Free fifo */
- vlc_object_destroy( p_dec->p_fifo );
-
- /* Cleanup */
+ /* Cleanup */
if( p_dec->p_owner->p_aout_input )
aout_DecDelete( p_dec->p_owner->p_aout, p_dec->p_owner->p_aout_input );
sout_InputDelete( p_dec->p_owner->p_sout );
free( p_dec->p_owner );
-
}
/*****************************************************************************
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ext-intf.c,v 1.51 2003/07/13 19:58:41 massiot Exp $
+ * $Id: input_ext-intf.c,v 1.52 2003/11/24 00:39:02 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
msg_Dbg( p_input, "ES 0x%x, "
"stream 0x%x, fourcc `%4.4s', %s [OK:%ld/ERR:%ld]",
ES->i_id, ES->i_stream_id, (char*)&ES->i_fourcc,
- ES->p_decoder_fifo != NULL ? "selected" : "not selected",
+ ES->p_dec != NULL ? "selected" : "not selected",
ES->c_packets, ES->c_invalid_packets );
#undef ES
}
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
- * $Id: input_programs.c,v 1.121 2003/11/16 21:07:31 gbazin Exp $
+ * $Id: input_programs.c,v 1.122 2003/11/24 00:39:02 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
i_es_index ++ )
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
- if ( p_es->p_decoder_fifo ) /* if the ES was selected */
+ if ( p_es->p_dec ) /* if the ES was selected */
{
input_UnselectES( p_input , p_es );
}
/* Init its values */
p_es->i_id = i_es_id;
p_es->p_pes = NULL;
- p_es->p_decoder_fifo = NULL;
+ p_es->p_dec = NULL;
p_es->i_cat = i_category;
p_es->i_demux_fd = 0;
p_es->c_packets = 0;
}
/* Kill associated decoder, if any. */
- if( p_es->p_decoder_fifo != NULL )
+ if( p_es->p_dec != NULL )
{
input_UnselectES( p_input, p_es );
}
msg_Dbg( p_input, "selecting ES 0x%x", p_es->i_id );
- if( p_es->p_decoder_fifo != NULL )
+ if( p_es->p_dec != NULL )
{
msg_Err( p_input, "ES 0x%x is already selected", p_es->i_id );
return -1;
/* Release the lock, not to block the input thread during
* the creation of the thread. */
vlc_mutex_unlock( &p_input->stream.stream_lock );
- p_es->p_decoder_fifo = input_RunDecoder( p_input, p_es );
+ p_es->p_dec = input_RunDecoder( p_input, p_es );
vlc_mutex_lock( &p_input->stream.stream_lock );
- if( p_es->p_decoder_fifo == NULL )
+ if( p_es->p_dec == NULL )
{
return -1;
}
msg_Dbg( p_input, "unselecting ES 0x%x", p_es->i_id );
- if( p_es->p_decoder_fifo == NULL )
+ if( p_es->p_dec == NULL )
{
msg_Err( p_input, "ES 0x%x is not selected", p_es->i_id );
return( -1 );
input_EndDecoder( p_input, p_es );
p_es->p_pes = NULL;
- if( ( p_es->p_decoder_fifo == NULL ) &&
+ if( ( p_es->p_dec == NULL ) &&
( p_input->stream.i_selected_es_number > 0 ) )
{
while( ( i_index < p_input->stream.i_selected_es_number - 1 ) &&
for( i = 0 ; i < p_input->stream.i_es_number ; i++ )
{
if( p_input->stream.pp_es[i]->i_id == oldval.i_int &&
- p_input->stream.pp_es[i]->p_decoder_fifo != NULL )
+ p_input->stream.pp_es[i]->p_dec != NULL )
{
input_UnselectES( p_input, p_input->stream.pp_es[i] );
}
for( i = 0 ; i < p_input->stream.i_es_number ; i++ )
{
if( p_input->stream.pp_es[i]->i_id == newval.i_int &&
- p_input->stream.pp_es[i]->p_decoder_fifo == NULL )
+ p_input->stream.pp_es[i]->p_dec == NULL )
{
input_SelectES( p_input, p_input->stream.pp_es[i] );
}
* objects.c: vlc_object_t handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: objects.c,v 1.42 2003/10/14 22:41:41 gbazin Exp $
+ * $Id: objects.c,v 1.43 2003/11/24 00:39:02 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
i_size = sizeof(decoder_t);
psz_type = "decoder";
break;
- case VLC_OBJECT_DECODER_FIFO: /* tmp for backward compat */
- i_size = sizeof(decoder_fifo_t);
- psz_type = "decoder";
- break;
case VLC_OBJECT_PACKETIZER:
i_size = sizeof(decoder_t);
psz_type = "packetizer";
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.239 2003/10/26 13:10:05 sigmunau Exp $
+ * $Id: video_output.c,v 1.240 2003/11/24 00:39:02 fenrir Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
for( i = 0 ; i < p_input->stream.i_es_number ; i++ )
{
- if( ( ES->i_cat == VIDEO_ES ) && ES->p_decoder_fifo != NULL )
+ if( ( ES->i_cat == VIDEO_ES ) && ES->p_dec != NULL )
{
input_UnselectES( p_input, ES );
input_SelectES( p_input, ES );
for( i = 0 ; i < p_input->stream.i_es_number ; i++ )
{
- if( ( ES->i_cat == VIDEO_ES ) && ES->p_decoder_fifo != NULL )
+ if( ( ES->i_cat == VIDEO_ES ) && ES->p_dec != NULL )
{
input_UnselectES( p_input, ES );
input_SelectES( p_input, ES );