Commit 1e67ea66 authored by Clément Stenac's avatar Clément Stenac

* String review, round one

* A few coding style fixes
* Doxygenized a few functions
parent f5932b75
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* demux.c * demux.c
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2004 VideoLAN * Copyright (C) 1999-2004 VideoLAN
* $Id: demux.c,v 1.9 2004/01/20 14:48:37 fenrir Exp $ * $Id: demux.c,v 1.10 2004/01/25 17:16:05 zorglub Exp $
* *
* Author: Laurent Aimar <fenrir@via.ecp.fr> * Author: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -142,7 +142,7 @@ int demux_vaControlDefault( input_thread_t *p_input, int i_query, ...@@ -142,7 +142,7 @@ int demux_vaControlDefault( input_thread_t *p_input, int i_query,
break; break;
default: default:
msg_Err( p_input, "unknown query in demux_vaControlDefault !!!" ); msg_Err( p_input, "unknown query in demux_vaControlDefault" );
i_ret = VLC_EGENERIC; i_ret = VLC_EGENERIC;
break; break;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* es_out.c: Es Out handler for input. * es_out.c: Es Out handler for input.
***************************************************************************** *****************************************************************************
* Copyright (C) 2003-2004 VideoLAN * Copyright (C) 2003-2004 VideoLAN
* $Id: es_out.c,v 1.20 2004/01/22 00:00:34 fenrir Exp $ * $Id: es_out.c,v 1.21 2004/01/25 17:16:05 zorglub Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -78,9 +78,12 @@ static void EsOutDel ( es_out_t *, es_out_id_t * ); ...@@ -78,9 +78,12 @@ static void EsOutDel ( es_out_t *, es_out_id_t * );
static int EsOutControl( es_out_t *, int i_query, va_list ); static int EsOutControl( es_out_t *, int i_query, va_list );
/***************************************************************************** /**
* input_EsOutNew: * Create a new es_out structure
*****************************************************************************/ *
* \param p_input The related input thread
* \return the new es_out_t
*/
es_out_t *input_EsOutNew( input_thread_t *p_input ) es_out_t *input_EsOutNew( input_thread_t *p_input )
{ {
es_out_t *out = malloc( sizeof( es_out_t ) ); es_out_t *out = malloc( sizeof( es_out_t ) );
...@@ -121,9 +124,12 @@ es_out_t *input_EsOutNew( input_thread_t *p_input ) ...@@ -121,9 +124,12 @@ es_out_t *input_EsOutNew( input_thread_t *p_input )
return out; return out;
} }
/***************************************************************************** /**
* input_EsOutDelete: * Deletes an es_out structure
*****************************************************************************/ *
* \param out the es_out structure to destroy
* \return nothing
*/
void input_EsOutDelete( es_out_t *out ) void input_EsOutDelete( es_out_t *out )
{ {
es_out_sys_t *p_sys = out->p_sys; es_out_sys_t *p_sys = out->p_sys;
...@@ -140,9 +146,14 @@ void input_EsOutDelete( es_out_t *out ) ...@@ -140,9 +146,14 @@ void input_EsOutDelete( es_out_t *out )
free( p_sys ); free( p_sys );
free( out ); free( out );
} }
/*****************************************************************************
* EsOutAddProgram: /**
*****************************************************************************/ * Add a program
*
* \param out the es_out
* \param i_group ...
* \return a program descriptor for the new program
*/
static pgrm_descriptor_t *EsOutAddProgram( es_out_t *out, int i_group ) static pgrm_descriptor_t *EsOutAddProgram( es_out_t *out, int i_group )
{ {
input_thread_t *p_input = out->p_sys->p_input; input_thread_t *p_input = out->p_sys->p_input;
...@@ -158,7 +169,7 @@ static pgrm_descriptor_t *EsOutAddProgram( es_out_t *out, int i_group ) ...@@ -158,7 +169,7 @@ static pgrm_descriptor_t *EsOutAddProgram( es_out_t *out, int i_group )
/* XXX welcome to kludge, add a dummy es, if you want to understand /* XXX welcome to kludge, add a dummy es, if you want to understand
* why have a look at input_SetProgram. Basicaly, it assume the first * why have a look at input_SetProgram. Basicaly, it assume the first
* es to be the PMT, how that is stupide, nevertheless it is needed for * es to be the PMT, how that is stupid, nevertheless it is needed for
* the old ts demuxer */ * the old ts demuxer */
p_pmt = input_AddES( p_input, p_prgm, 0, UNKNOWN_ES, NULL, 0 ); p_pmt = input_AddES( p_input, p_prgm, 0, UNKNOWN_ES, NULL, 0 );
p_pmt->i_fourcc = VLC_FOURCC( 'n', 'u', 'l', 'l' ); p_pmt->i_fourcc = VLC_FOURCC( 'n', 'u', 'l', 'l' );
...@@ -173,10 +184,15 @@ static pgrm_descriptor_t *EsOutAddProgram( es_out_t *out, int i_group ) ...@@ -173,10 +184,15 @@ static pgrm_descriptor_t *EsOutAddProgram( es_out_t *out, int i_group )
return p_prgm; return p_prgm;
} }
/***************************************************************************** /**
* EsOutSelect: Select an ES given the current mode * Select an ES given the current mode
* XXX: you need to take a the lock before (stream.stream_lock) * XXX: you need to take a the lock before (stream.stream_lock)
*****************************************************************************/ *
* \param out The es_out structure
* \param es es_out_id structure
* \param b_force ...
* \return nothing
*/
static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force ) static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force )
{ {
es_out_sys_t *p_sys = out->p_sys; es_out_sys_t *p_sys = out->p_sys;
...@@ -267,9 +283,13 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force ) ...@@ -267,9 +283,13 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force )
} }
} }
/***************************************************************************** /**
* EsOutAdd: * Add an es_out
*****************************************************************************/ *
* \param out the es_out to add
* \param fmt the es_format of the es_out
* \return an es_out id
*/
static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt ) static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
{ {
es_out_sys_t *p_sys = out->p_sys; es_out_sys_t *p_sys = out->p_sys;
...@@ -277,7 +297,7 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt ) ...@@ -277,7 +297,7 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
input_thread_t *p_input = p_sys->p_input; input_thread_t *p_input = p_sys->p_input;
es_out_id_t *es = malloc( sizeof( es_out_id_t ) ); es_out_id_t *es = malloc( sizeof( es_out_id_t ) );
pgrm_descriptor_t *p_prgm = NULL; pgrm_descriptor_t *p_prgm = NULL;
char psz_cat[sizeof( "Stream " ) + 10]; char psz_cat[sizeof( _("Stream ") ) + 10];
input_info_category_t *p_cat; input_info_category_t *p_cat;
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
...@@ -529,9 +549,13 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt ) ...@@ -529,9 +549,13 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
return es; return es;
} }
/***************************************************************************** /**
* EsOutSend: * Send a block for the given es_out
*****************************************************************************/ *
* \param out the es_out to send from
* \param es the es_out_id
* \param p_block the data block to send
*/
static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block ) static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
{ {
es_out_sys_t *p_sys = out->p_sys; es_out_sys_t *p_sys = out->p_sys;
...@@ -624,9 +648,14 @@ static void EsOutDel( es_out_t *out, es_out_id_t *es ) ...@@ -624,9 +648,14 @@ static void EsOutDel( es_out_t *out, es_out_id_t *es )
free( es ); free( es );
} }
/***************************************************************************** /**
* EsOutControl: * Control query handler
*****************************************************************************/ *
* \param out the es_out to control
* \param i_query A es_out query as defined in include/ninput.h
* \param args a variable list of arguments for the query
* \return VLC_SUCCESS or an error code
*/
static int EsOutControl( es_out_t *out, int i_query, va_list args ) static int EsOutControl( es_out_t *out, int i_query, va_list args )
{ {
es_out_sys_t *p_sys = out->p_sys; es_out_sys_t *p_sys = out->p_sys;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* decoders. * decoders.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2004 VideoLAN * Copyright (C) 1998-2004 VideoLAN
* $Id: input.c,v 1.276 2004/01/15 23:40:44 gbazin Exp $ * $Id: input.c,v 1.277 2004/01/25 17:16:05 zorglub Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -99,7 +99,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent, ...@@ -99,7 +99,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
/* Parse input options */ /* Parse input options */
for( i = 0 ; i < p_item->i_categories ; i++ ) for( i = 0 ; i < p_item->i_categories ; i++ )
{ {
if( !strncmp( p_item->pp_categories[i]->psz_name, "Options", 7 ) ) if( !strncmp( p_item->pp_categories[i]->psz_name, _("Options"), 7 ) )
{ {
msg_Dbg(p_input,"Parsing %i options for item", msg_Dbg(p_input,"Parsing %i options for item",
p_item->pp_categories[i]->i_infos ); p_item->pp_categories[i]->i_infos );
...@@ -739,9 +739,9 @@ static int InitThread( input_thread_t * p_input ) ...@@ -739,9 +739,9 @@ static int InitThread( input_thread_t * p_input )
p_input->s = stream_OpenInput( p_input ); p_input->s = stream_OpenInput( p_input );
if( p_input->s == NULL ) if( p_input->s == NULL )
{ {
/* should nver occur yet */ /* should never occur yet */
msg_Err( p_input, "cannot create stream_t !" ); msg_Err( p_input, "cannot create stream_t" );
module_Unneed( p_input, p_input->p_access ); module_Unneed( p_input, p_input->p_access );
if ( p_input->stream.p_sout != NULL ) if ( p_input->stream.p_sout != NULL )
...@@ -819,7 +819,8 @@ static int InitThread( input_thread_t * p_input ) ...@@ -819,7 +819,8 @@ static int InitThread( input_thread_t * p_input )
if( val.psz_string && *val.psz_string ) if( val.psz_string && *val.psz_string )
{ {
subtitle_demux_t *p_sub; subtitle_demux_t *p_sub;
if( ( p_sub = subtitle_New( p_input, strdup(val.psz_string), i_microsecondperframe, 0 ) ) ) if( ( p_sub = subtitle_New( p_input, strdup(val.psz_string),
i_microsecondperframe, 0 ) ) )
{ {
p_sub_toselect = p_sub; p_sub_toselect = p_sub;
TAB_APPEND( p_input->p_sys->i_sub, p_input->p_sys->sub, p_sub ); TAB_APPEND( p_input->p_sys->i_sub, p_input->p_sys->sub, p_sub );
...@@ -836,7 +837,8 @@ static int InitThread( input_thread_t * p_input ) ...@@ -836,7 +837,8 @@ static int InitThread( input_thread_t * p_input )
char **tmp2 = tmp; char **tmp2 = tmp;
for( i = 0; *tmp2 != NULL; i++ ) for( i = 0; *tmp2 != NULL; i++ )
{ {
if( ( p_sub = subtitle_New( p_input, strdup(*tmp2++), i_microsecondperframe, i ) ) ) if( ( p_sub = subtitle_New( p_input, strdup(*tmp2++),
i_microsecondperframe, i ) ) )
{ {
TAB_APPEND( p_input->p_sys->i_sub, p_input->p_sys->sub, p_sub ); TAB_APPEND( p_input->p_sys->i_sub, p_input->p_sys->sub, p_sub );
} }
...@@ -854,7 +856,8 @@ static int InitThread( input_thread_t * p_input ) ...@@ -854,7 +856,8 @@ static int InitThread( input_thread_t * p_input )
val.b_bool ? ES_OUT_MODE_ALL : ES_OUT_MODE_AUTO ); val.b_bool ? ES_OUT_MODE_ALL : ES_OUT_MODE_AUTO );
if( p_sub_toselect ) if( p_sub_toselect )
{ {
es_out_Control( p_input->p_es_out, ES_OUT_SET_ES, p_sub_toselect->p_es, VLC_TRUE ); es_out_Control( p_input->p_es_out, ES_OUT_SET_ES,
p_sub_toselect->p_es, VLC_TRUE );
} }
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders * input_dec.c: Functions for the management of decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2004 VideoLAN * Copyright (C) 1999-2004 VideoLAN
* $Id: input_dec.c,v 1.87 2004/01/19 18:15:29 fenrir Exp $ * $Id: input_dec.c,v 1.88 2004/01/25 17:16:05 zorglub Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -82,9 +82,13 @@ struct decoder_owner_sys_t ...@@ -82,9 +82,13 @@ struct decoder_owner_sys_t
}; };
/***************************************************************************** /**
* input_RunDecoder: spawns a new decoder thread * Spawns a new decoder thread
*****************************************************************************/ *
* \param p_input the input thread
* \param p_es the es descriptor
* \return the spawned decoder object
*/
decoder_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 )
{ {
decoder_t *p_dec = NULL; decoder_t *p_dec = NULL;
...@@ -180,9 +184,13 @@ decoder_t * input_RunDecoder( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -180,9 +184,13 @@ decoder_t * input_RunDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
return p_dec; return p_dec;
} }
/***************************************************************************** /**
* input_EndDecoder: kills a decoder thread and waits until it's finished * Kills a decoder thread and waits until it's finished
*****************************************************************************/ *
* \param p_input the input thread
* \param p_es the es descriptor
* \return nothing
*/
void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es ) void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
{ {
decoder_t *p_dec = p_es->p_dec; decoder_t *p_dec = p_es->p_dec;
...@@ -234,11 +242,13 @@ void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -234,11 +242,13 @@ void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
p_input->stream.b_changed = 1; p_input->stream.b_changed = 1;
} }
/***************************************************************************** /**
* input_DecodePES
*****************************************************************************
* Put a PES in the decoder's fifo. * Put a PES in the decoder's fifo.
*****************************************************************************/ *
* \param p_dec the decoder object
* \param p_pes the pes packet
* \return nothing
*/
void input_DecodePES( decoder_t * p_dec, pes_packet_t * p_pes ) void input_DecodePES( decoder_t * p_dec, pes_packet_t * p_pes )
{ {
data_packet_t *p_data; data_packet_t *p_data;
...@@ -274,11 +284,13 @@ void input_DecodePES( decoder_t * p_dec, pes_packet_t * p_pes ) ...@@ -274,11 +284,13 @@ void input_DecodePES( decoder_t * p_dec, pes_packet_t * p_pes )
input_DeletePES( p_dec->p_owner->p_method_data, p_pes ); input_DeletePES( p_dec->p_owner->p_method_data, p_pes );
} }
/*****************************************************************************
* input_DecodeBlock /**
*****************************************************************************
* Put a block_t in the decoder's fifo. * Put a block_t in the decoder's fifo.
*****************************************************************************/ *
* \param p_dec the decoder object
* \param p_block the data block
*/
void input_DecodeBlock( decoder_t * p_dec, block_t *p_block ) void input_DecodeBlock( decoder_t * p_dec, block_t *p_block )
{ {
if( p_dec->p_owner->b_own_thread ) if( p_dec->p_owner->b_own_thread )
...@@ -298,14 +310,17 @@ void input_DecodeBlock( decoder_t * p_dec, block_t *p_block ) ...@@ -298,14 +310,17 @@ void input_DecodeBlock( decoder_t * p_dec, block_t *p_block )
} }
} }
/***************************************************************************** /**
* Create a NULL packet for padding in case of a data loss * Create a NULL packet for padding in case of a data loss
*****************************************************************************/ *
* \param p_input the input thread
* \param p_es es descriptor
* \return nothing
*/
static void input_NullPacket( input_thread_t * p_input, static void input_NullPacket( input_thread_t * p_input,
es_descriptor_t * p_es ) es_descriptor_t * p_es )
{ {
block_t *p_block = block_New( p_input, PADDING_PACKET_SIZE ); block_t *p_block = block_New( p_input, PADDING_PACKET_SIZE );
if( p_block ) if( p_block )
{ {
memset( p_block->p_buffer, 0, PADDING_PACKET_SIZE ); memset( p_block->p_buffer, 0, PADDING_PACKET_SIZE );
...@@ -315,9 +330,12 @@ static void input_NullPacket( input_thread_t * p_input, ...@@ -315,9 +330,12 @@ static void input_NullPacket( input_thread_t * p_input,
} }
} }
/***************************************************************************** /**
* input_EscapeDiscontinuity: send a NULL packet to the decoders * Send a NULL packet to the decoders
*****************************************************************************/ *
* \param p_input the input thread
* \return nothing
*/
void input_EscapeDiscontinuity( input_thread_t * p_input ) void input_EscapeDiscontinuity( input_thread_t * p_input )
{ {
unsigned int i_es, i; unsigned int i_es, i;
...@@ -336,9 +354,12 @@ void input_EscapeDiscontinuity( input_thread_t * p_input ) ...@@ -336,9 +354,12 @@ void input_EscapeDiscontinuity( input_thread_t * p_input )
} }
} }
/***************************************************************************** /**
* input_EscapeAudioDiscontinuity: send a NULL packet to the audio decoders * Send a NULL packet to the audio decoders
*****************************************************************************/ *
* \param p_input the input thread
* \return nothing
*/
void input_EscapeAudioDiscontinuity( input_thread_t * p_input ) void input_EscapeAudioDiscontinuity( input_thread_t * p_input )
{ {
unsigned int i_es, i; unsigned int i_es, i;
...@@ -357,9 +378,14 @@ void input_EscapeAudioDiscontinuity( input_thread_t * p_input ) ...@@ -357,9 +378,14 @@ void input_EscapeAudioDiscontinuity( input_thread_t * p_input )
} }
} }
/***************************************************************************** /**
* CreateDecoder: create a decoder object * Create a decoder object
*****************************************************************************/ *
* \param p_input the input thread
* \param p_es the es descriptor
* \param i_object_type Object type as define in include/vlc_objects.h
* \return the decoder object
*/
static decoder_t * CreateDecoder( input_thread_t * p_input, static decoder_t * CreateDecoder( input_thread_t * p_input,
es_descriptor_t * p_es, int i_object_type ) es_descriptor_t * p_es, int i_object_type )
{ {
...@@ -479,9 +505,12 @@ static decoder_t * CreateDecoder( input_thread_t * p_input, ...@@ -479,9 +505,12 @@ static decoder_t * CreateDecoder( input_thread_t * p_input,
return p_dec; return p_dec;
} }
/***************************************************************************** /**
* DecoderThread: the decoding main loop * The decoding main loop
*****************************************************************************/ *
* \param p_dec the decoder
* \return 0
*/
static int DecoderThread( decoder_t * p_dec ) static int DecoderThread( decoder_t * p_dec )
{ {
block_t *p_block; block_t *p_block;
...@@ -523,9 +552,13 @@ static int DecoderThread( decoder_t * p_dec ) ...@@ -523,9 +552,13 @@ static int DecoderThread( decoder_t * p_dec )
return 0; return 0;
} }
/***************************************************************************** /**
* DecoderDecode: decode a block * Decode a block
*****************************************************************************/ *
* \param p_dec the decoder object
* \param p_block the block to decode
* \return VLC_SUCCESS or an error code
*/
static int DecoderDecode( decoder_t *p_dec, block_t *p_block ) static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
{ {
if( p_block->i_buffer <= 0 ) if( p_block->i_buffer <= 0 )
...@@ -623,16 +656,19 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block ) ...@@ -623,16 +656,19 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
} }
else else
{ {
msg_Err( p_dec, "unknown ES format !!" ); msg_Err( p_dec, "unknown ES format" );
p_dec->b_error = 1; p_dec->b_error = 1;
} }
return p_dec->b_error ? VLC_EGENERIC : VLC_SUCCESS; return p_dec->b_error ? VLC_EGENERIC : VLC_SUCCESS;
} }
/***************************************************************************** /**
* DeleteDecoder: destroys a decoder object * Destroys a decoder object
*****************************************************************************/ *
* \param p_dec the decoder object
* \return nothing
*/
static void DeleteDecoder( decoder_t * p_dec ) static void DeleteDecoder( decoder_t * p_dec )
{ {
vlc_object_detach( p_dec ); vlc_object_detach( p_dec );
...@@ -790,7 +826,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec ) ...@@ -790,7 +826,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
} }
if( i_pic == p_dec->p_owner->p_vout->render.i_pictures ) if( i_pic == p_dec->p_owner->p_vout->render.i_pictures )
{ {
msg_Err( p_dec, "decoder is leaking pictures, reseting the heap" ); msg_Err( p_dec, "decoder is leaking pictures, resetting the heap" );
/* Just free all the pictures */ /* Just free all the pictures */
for( i_pic = 0; i_pic < p_dec->p_owner->p_vout->render.i_pictures; for( i_pic = 0; i_pic < p_dec->p_owner->p_vout->render.i_pictures;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-intf.c: services to the interface * input_ext-intf.c: services to the interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2004 VideoLAN * Copyright (C) 1998-2004 VideoLAN
* $Id: input_ext-intf.c,v 1.55 2004/01/06 12:02:06 zorglub Exp $ * $Id: input_ext-intf.c,v 1.56 2004/01/25 17:16:05 zorglub Exp $
* *
* Author: Christophe Massiot <massiot@via.ecp.fr> * Author: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -164,7 +164,6 @@ void __input_SetRate( vlc_object_t * p_this, int i_rate ) ...@@ -164,7 +164,6 @@ void __input_SetRate( vlc_object_t * p_this, int i_rate )
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
return; return;
} }
p_input->stream.i_new_status = FORWARD_S; p_input->stream.i_new_status = FORWARD_S;
p_input->stream.i_new_rate = i_rate; p_input->stream.i_new_rate = i_rate;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-plugins.c: useful functions for access and demux plug-ins * input_ext-plugins.c: useful functions for access and demux plug-ins
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2004 VideoLAN * Copyright (C) 2001-2004 VideoLAN
* $Id: input_ext-plugins.c,v 1.39 2004/01/06 12:02:06 zorglub Exp $ * $Id: input_ext-plugins.c,v 1.40 2004/01/25 17:16:06 zorglub Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -141,7 +141,7 @@ void input_BuffersEnd( input_thread_t * p_input, input_buffers_t * p_buffers ) ...@@ -141,7 +141,7 @@ void input_BuffersEnd( input_thread_t * p_input, input_buffers_t * p_buffers )
free( p_buf ); free( p_buf );
p_buf = p_next; p_buf = p_next;
} }
} }
if( p_buffers->i_allocated ) if( p_buffers->i_allocated )
{ {
...@@ -598,7 +598,7 @@ ssize_t input_SplitBuffer( input_thread_t * p_input, ...@@ -598,7 +598,7 @@ ssize_t input_SplitBuffer( input_thread_t * p_input,
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->stream.p_selected_area->i_tell += i_size; p_input->stream.p_selected_area->i_tell += i_size;
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
return i_size; return i_size;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_info.c: Convenient functions to handle the input info structures * input_info.c: Convenient functions to handle the input info structures
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2004 VideoLAN * Copyright (C) 1998-2004 VideoLAN
* $Id: input_info.c,v 1.13 2004/01/15 23:40:44 gbazin Exp $ * $Id: input_info.c,v 1.14 2004/01/25 17:16:06 zorglub Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -63,7 +63,7 @@ input_info_category_t * input_InfoCategory( input_thread_t * p_input, ...@@ -63,7 +63,7 @@ input_info_category_t * input_InfoCategory( input_thread_t * p_input,
p_category = malloc( sizeof( input_info_category_t ) ); p_category = malloc( sizeof( input_info_category_t ) );
if ( !p_category ) if ( !p_category )
{ {
msg_Err( p_input, "No mem" ); msg_Err( p_input, "out of memory" );
return NULL; return NULL;
} }
p_category->psz_name = strdup( psz_name ); p_category->psz_name = strdup( psz_name );
...@@ -94,9 +94,9 @@ int input_AddInfo( input_info_category_t * p_category, char * psz_name, ...@@ -94,9 +94,9 @@ int input_AddInfo( input_info_category_t * p_category, char * psz_name,
{ {
return -1; return -1;
} }
va_start( args, psz_format ); va_start( args, psz_format );
/* /*
* Convert message to string * Convert message to string
*/ */
...@@ -143,13 +143,13 @@ int input_AddInfo( input_info_category_t * p_category, char * psz_name, ...@@ -143,13 +143,13 @@ int input_AddInfo( input_info_category_t * p_category, char * psz_name,
* \internal * \internal
* *
* \param p_input The input thread to be cleaned for info * \param p_input The input thread to be cleaned for info
* \returns for the moment 0 * \returns for the moment VLC_SUCCESS
*/ */
int input_DelInfo( input_thread_t * p_input ) int input_DelInfo( input_thread_t * p_input )
{ {
input_info_category_t * p_category, * p_prev_category; input_info_category_t * p_category, * p_prev_category;
input_info_t * p_info, * p_prev_info; input_info_t * p_info, * p_prev_info;
p_category = p_input->stream.p_info; p_category = p_input->stream.p_info;
while ( p_category ) while ( p_category )
{ {
...@@ -176,5 +176,5 @@ int input_DelInfo( input_thread_t * p_input ) ...@@ -176,5 +176,5 @@ int input_DelInfo( input_thread_t * p_input )
p_category = p_category->p_next; p_category = p_category->p_next;
free( p_prev_category ); free( p_prev_category );
} }
return 0; return VLC_SUCCESS;
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2004 VideoLAN