Commit ce654e9f authored by Rafaël Carré's avatar Rafaël Carré

EsIsSelected() input_ClockSetRate() input_ClockInit() input_ClockResetPCR():

removes unused arguments
parent 079a1818
...@@ -118,8 +118,7 @@ static void ClockNewRef( input_clock_t *cl, ...@@ -118,8 +118,7 @@ static void ClockNewRef( input_clock_t *cl,
* input_ClockInit: reinitializes the clock reference after a stream * input_ClockInit: reinitializes the clock reference after a stream
* discontinuity * discontinuity
*****************************************************************************/ *****************************************************************************/
void input_ClockInit( input_thread_t *p_input, void input_ClockInit( input_clock_t *cl, vlc_bool_t b_master, int i_cr_average, int i_rate )
input_clock_t *cl, vlc_bool_t b_master, int i_cr_average, int i_rate )
{ {
cl->i_synchro_state = SYNCHRO_START; cl->i_synchro_state = SYNCHRO_START;
...@@ -169,7 +168,7 @@ void input_ClockSetPCR( input_thread_t *p_input, ...@@ -169,7 +168,7 @@ void input_ClockSetPCR( input_thread_t *p_input,
* warning from the stream control facilities (dd-edited * warning from the stream control facilities (dd-edited
* stream ?). */ * stream ?). */
msg_Warn( p_input, "clock gap, unexpected stream discontinuity" ); msg_Warn( p_input, "clock gap, unexpected stream discontinuity" );
input_ClockInit( p_input, cl, cl->b_master, cl->i_cr_average, cl->i_rate ); input_ClockInit( cl, cl->b_master, cl->i_cr_average, cl->i_rate );
/* Feed synchro with a new reference point. */ /* Feed synchro with a new reference point. */
msg_Warn( p_input, "feeding synchro with a new reference point trying to recover from clock gap" ); msg_Warn( p_input, "feeding synchro with a new reference point trying to recover from clock gap" );
ClockNewRef( cl, i_clock, ClockNewRef( cl, i_clock,
...@@ -215,7 +214,7 @@ void input_ClockSetPCR( input_thread_t *p_input, ...@@ -215,7 +214,7 @@ void input_ClockSetPCR( input_thread_t *p_input,
/***************************************************************************** /*****************************************************************************
* input_ClockResetPCR: * input_ClockResetPCR:
*****************************************************************************/ *****************************************************************************/
void input_ClockResetPCR( input_thread_t * p_input, input_clock_t *cl ) void input_ClockResetPCR( input_clock_t *cl )
{ {
cl->i_synchro_state = SYNCHRO_REINIT; cl->i_synchro_state = SYNCHRO_REINIT;
cl->last_pts = 0; cl->last_pts = 0;
...@@ -237,7 +236,7 @@ mtime_t input_ClockGetTS( input_thread_t * p_input, ...@@ -237,7 +236,7 @@ mtime_t input_ClockGetTS( input_thread_t * p_input,
/***************************************************************************** /*****************************************************************************
* input_ClockSetRate: * input_ClockSetRate:
*****************************************************************************/ *****************************************************************************/
void input_ClockSetRate( input_thread_t *p_input, input_clock_t *cl, int i_rate ) void input_ClockSetRate( input_clock_t *cl, int i_rate )
{ {
/* Move the reference point */ /* Move the reference point */
if( cl->i_synchro_state == SYNCHRO_OK ) if( cl->i_synchro_state == SYNCHRO_OK )
......
...@@ -145,7 +145,7 @@ static int EsOutControl( es_out_t *, int i_query, va_list ); ...@@ -145,7 +145,7 @@ static int EsOutControl( es_out_t *, int i_query, va_list );
static void EsOutAddInfo( es_out_t *, es_out_id_t *es ); static void EsOutAddInfo( es_out_t *, es_out_id_t *es );
static vlc_bool_t EsIsSelected( es_out_t *out, es_out_id_t *es ); static vlc_bool_t EsIsSelected( es_out_id_t *es );
static void EsSelect( es_out_t *out, es_out_id_t *es ); static void EsSelect( es_out_t *out, es_out_id_t *es );
static void EsUnselect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_update ); static void EsUnselect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_update );
static char *LanguageGetName( const char *psz_code ); static char *LanguageGetName( const char *psz_code );
...@@ -362,7 +362,7 @@ void input_EsOutChangeRate( es_out_t *out, int i_rate ) ...@@ -362,7 +362,7 @@ void input_EsOutChangeRate( es_out_t *out, int i_rate )
EsOutDiscontinuity( out, VLC_FALSE, VLC_FALSE ); EsOutDiscontinuity( out, VLC_FALSE, VLC_FALSE );
for( i = 0; i < p_sys->i_pgrm; i++ ) for( i = 0; i < p_sys->i_pgrm; i++ )
input_ClockSetRate( p_sys->p_input, &p_sys->pgrm[i]->clock, i_rate ); input_ClockSetRate( &p_sys->pgrm[i]->clock, i_rate );
} }
void input_EsOutSetDelay( es_out_t *out, int i_cat, int64_t i_delay ) void input_EsOutSetDelay( es_out_t *out, int i_cat, int64_t i_delay )
...@@ -519,7 +519,7 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm ) ...@@ -519,7 +519,7 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm )
for( i = 0; i < p_sys->i_es; i++ ) for( i = 0; i < p_sys->i_es; i++ )
{ {
if( p_sys->es[i]->p_pgrm == old && EsIsSelected( out, p_sys->es[i] ) && if( p_sys->es[i]->p_pgrm == old && EsIsSelected( p_sys->es[i] ) &&
p_sys->i_mode != ES_OUT_MODE_ALL ) p_sys->i_mode != ES_OUT_MODE_ALL )
EsUnselect( out, p_sys->es[i], VLC_TRUE ); EsUnselect( out, p_sys->es[i], VLC_TRUE );
} }
...@@ -585,7 +585,7 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group ) ...@@ -585,7 +585,7 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group )
p_pgrm->psz_now_playing = NULL; p_pgrm->psz_now_playing = NULL;
p_pgrm->psz_publisher = NULL; p_pgrm->psz_publisher = NULL;
p_pgrm->p_epg = NULL; p_pgrm->p_epg = NULL;
input_ClockInit( p_input, &p_pgrm->clock, VLC_FALSE, p_input->p->input.i_cr_average, p_sys->i_rate ); input_ClockInit( &p_pgrm->clock, VLC_FALSE, p_input->p->input.i_cr_average, p_sys->i_rate );
/* Append it */ /* Append it */
TAB_APPEND( p_sys->i_pgrm, p_sys->pgrm, p_pgrm ); TAB_APPEND( p_sys->i_pgrm, p_sys->pgrm, p_pgrm );
...@@ -1008,7 +1008,7 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt ) ...@@ -1008,7 +1008,7 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
return es; return es;
} }
static vlc_bool_t EsIsSelected( es_out_t *out, es_out_id_t *es ) static vlc_bool_t EsIsSelected( es_out_id_t *es )
{ {
if( es->p_master ) if( es->p_master )
{ {
...@@ -1033,7 +1033,7 @@ static void EsSelect( es_out_t *out, es_out_id_t *es ) ...@@ -1033,7 +1033,7 @@ static void EsSelect( es_out_t *out, es_out_id_t *es )
vlc_value_t val; vlc_value_t val;
const char *psz_var; const char *psz_var;
if( EsIsSelected( out, es ) ) if( EsIsSelected( es ) )
{ {
msg_Warn( p_input, "ES 0x%x is already selected", es->i_id ); msg_Warn( p_input, "ES 0x%x is already selected", es->i_id );
return; return;
...@@ -1113,7 +1113,7 @@ static void EsUnselect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_update ) ...@@ -1113,7 +1113,7 @@ static void EsUnselect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_update )
vlc_value_t val; vlc_value_t val;
const char *psz_var; const char *psz_var;
if( !EsIsSelected( out, es ) ) if( !EsIsSelected( es ) )
{ {
msg_Warn( p_input, "ES 0x%x is already unselected", es->i_id ); msg_Warn( p_input, "ES 0x%x is already unselected", es->i_id );
return; return;
...@@ -1198,7 +1198,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force ) ...@@ -1198,7 +1198,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force )
if( p_sys->i_mode == ES_OUT_MODE_ALL || b_force ) if( p_sys->i_mode == ES_OUT_MODE_ALL || b_force )
{ {
if( !EsIsSelected( out, es ) ) if( !EsIsSelected( es ) )
EsSelect( out, es ); EsSelect( out, es );
} }
else if( p_sys->i_mode == ES_OUT_MODE_PARTIAL ) else if( p_sys->i_mode == ES_OUT_MODE_PARTIAL )
...@@ -1210,7 +1210,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force ) ...@@ -1210,7 +1210,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force )
{ {
if ( val.p_list->p_values[i].i_int == es->p_pgrm->i_id || b_force ) if ( val.p_list->p_values[i].i_int == es->p_pgrm->i_id || b_force )
{ {
if( !EsIsSelected( out, es ) ) if( !EsIsSelected( es ) )
EsSelect( out, es ); EsSelect( out, es );
break; break;
} }
...@@ -1311,19 +1311,19 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force ) ...@@ -1311,19 +1311,19 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force )
i_wanted = es->i_channel; i_wanted = es->i_channel;
} }
if( i_wanted == es->i_channel && !EsIsSelected( out, es ) ) if( i_wanted == es->i_channel && !EsIsSelected( es ) )
EsSelect( out, es ); EsSelect( out, es );
} }
/* FIXME TODO handle priority here */ /* FIXME TODO handle priority here */
if( EsIsSelected( out, es ) ) if( EsIsSelected( es ) )
{ {
if( i_cat == AUDIO_ES ) if( i_cat == AUDIO_ES )
{ {
if( p_sys->i_mode == ES_OUT_MODE_AUTO && if( p_sys->i_mode == ES_OUT_MODE_AUTO &&
p_sys->p_es_audio && p_sys->p_es_audio &&
p_sys->p_es_audio != es && p_sys->p_es_audio != es &&
EsIsSelected( out, p_sys->p_es_audio ) ) EsIsSelected( p_sys->p_es_audio ) )
{ {
EsUnselect( out, p_sys->p_es_audio, VLC_FALSE ); EsUnselect( out, p_sys->p_es_audio, VLC_FALSE );
} }
...@@ -1334,7 +1334,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force ) ...@@ -1334,7 +1334,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, vlc_bool_t b_force )
if( p_sys->i_mode == ES_OUT_MODE_AUTO && if( p_sys->i_mode == ES_OUT_MODE_AUTO &&
p_sys->p_es_sub && p_sys->p_es_sub &&
p_sys->p_es_sub != es && p_sys->p_es_sub != es &&
EsIsSelected( out, p_sys->p_es_sub ) ) EsIsSelected( p_sys->p_es_sub ) )
{ {
EsUnselect( out, p_sys->p_es_sub, VLC_FALSE ); EsUnselect( out, p_sys->p_es_sub, VLC_FALSE );
} }
...@@ -1572,12 +1572,12 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args ) ...@@ -1572,12 +1572,12 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
case ES_OUT_SET_ES_STATE: case ES_OUT_SET_ES_STATE:
es = (es_out_id_t*) va_arg( args, es_out_id_t * ); es = (es_out_id_t*) va_arg( args, es_out_id_t * );
b = (vlc_bool_t) va_arg( args, vlc_bool_t ); b = (vlc_bool_t) va_arg( args, vlc_bool_t );
if( b && !EsIsSelected( out, es ) ) if( b && !EsIsSelected( es ) )
{ {
EsSelect( out, es ); EsSelect( out, es );
return EsIsSelected( out, es ) ? VLC_SUCCESS : VLC_EGENERIC; return EsIsSelected( es ) ? VLC_SUCCESS : VLC_EGENERIC;
} }
else if( !b && EsIsSelected( out, es ) ) else if( !b && EsIsSelected( es ) )
{ {
EsUnselect( out, es, es->p_pgrm == p_sys->p_pgrm ); EsUnselect( out, es, es->p_pgrm == p_sys->p_pgrm );
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -1588,7 +1588,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args ) ...@@ -1588,7 +1588,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
es = (es_out_id_t*) va_arg( args, es_out_id_t * ); es = (es_out_id_t*) va_arg( args, es_out_id_t * );
pb = (vlc_bool_t*) va_arg( args, vlc_bool_t * ); pb = (vlc_bool_t*) va_arg( args, vlc_bool_t * );
*pb = EsIsSelected( out, es ); *pb = EsIsSelected( es );
return VLC_SUCCESS; return VLC_SUCCESS;
case ES_OUT_SET_ACTIVE: case ES_OUT_SET_ACTIVE:
...@@ -1616,7 +1616,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args ) ...@@ -1616,7 +1616,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
/* Reapply policy mode */ /* Reapply policy mode */
for( i = 0; i < p_sys->i_es; i++ ) for( i = 0; i < p_sys->i_es; i++ )
{ {
if( EsIsSelected( out, p_sys->es[i] ) ) if( EsIsSelected( p_sys->es[i] ) )
{ {
EsUnselect( out, p_sys->es[i], EsUnselect( out, p_sys->es[i],
p_sys->es[i]->p_pgrm == p_sys->p_pgrm ); p_sys->es[i]->p_pgrm == p_sys->p_pgrm );
...@@ -1642,7 +1642,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args ) ...@@ -1642,7 +1642,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
{ {
for( i = 0; i < p_sys->i_es; i++ ) for( i = 0; i < p_sys->i_es; i++ )
{ {
if( EsIsSelected( out, p_sys->es[i] ) ) if( EsIsSelected( p_sys->es[i] ) )
EsUnselect( out, p_sys->es[i], EsUnselect( out, p_sys->es[i],
p_sys->es[i]->p_pgrm == p_sys->p_pgrm ); p_sys->es[i]->p_pgrm == p_sys->p_pgrm );
} }
...@@ -1652,7 +1652,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args ) ...@@ -1652,7 +1652,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
for( i = 0; i < p_sys->i_es; i++ ) for( i = 0; i < p_sys->i_es; i++ )
{ {
if( p_sys->es[i]->fmt.i_cat == AUDIO_ES && if( p_sys->es[i]->fmt.i_cat == AUDIO_ES &&
EsIsSelected( out, p_sys->es[i] ) ) EsIsSelected( p_sys->es[i] ) )
EsUnselect( out, p_sys->es[i], EsUnselect( out, p_sys->es[i],
p_sys->es[i]->p_pgrm == p_sys->p_pgrm ); p_sys->es[i]->p_pgrm == p_sys->p_pgrm );
} }
...@@ -1662,7 +1662,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args ) ...@@ -1662,7 +1662,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
for( i = 0; i < p_sys->i_es; i++ ) for( i = 0; i < p_sys->i_es; i++ )
{ {
if( p_sys->es[i]->fmt.i_cat == VIDEO_ES && if( p_sys->es[i]->fmt.i_cat == VIDEO_ES &&
EsIsSelected( out, p_sys->es[i] ) ) EsIsSelected( p_sys->es[i] ) )
EsUnselect( out, p_sys->es[i], EsUnselect( out, p_sys->es[i],
p_sys->es[i]->p_pgrm == p_sys->p_pgrm ); p_sys->es[i]->p_pgrm == p_sys->p_pgrm );
} }
...@@ -1672,7 +1672,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args ) ...@@ -1672,7 +1672,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
for( i = 0; i < p_sys->i_es; i++ ) for( i = 0; i < p_sys->i_es; i++ )
{ {
if( p_sys->es[i]->fmt.i_cat == SPU_ES && if( p_sys->es[i]->fmt.i_cat == SPU_ES &&
EsIsSelected( out, p_sys->es[i] ) ) EsIsSelected( p_sys->es[i] ) )
EsUnselect( out, p_sys->es[i], EsUnselect( out, p_sys->es[i],
p_sys->es[i]->p_pgrm == p_sys->p_pgrm ); p_sys->es[i]->p_pgrm == p_sys->p_pgrm );
} }
...@@ -1769,7 +1769,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args ) ...@@ -1769,7 +1769,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
case ES_OUT_RESET_PCR: case ES_OUT_RESET_PCR:
for( i = 0; i < p_sys->i_pgrm; i++ ) for( i = 0; i < p_sys->i_pgrm; i++ )
input_ClockResetPCR( p_sys->p_input, &p_sys->pgrm[i]->clock ); input_ClockResetPCR( &p_sys->pgrm[i]->clock );
return VLC_SUCCESS; return VLC_SUCCESS;
case ES_OUT_GET_TS: case ES_OUT_GET_TS:
......
...@@ -403,11 +403,11 @@ typedef struct ...@@ -403,11 +403,11 @@ typedef struct
int i_delta_cr_residue; int i_delta_cr_residue;
} input_clock_t; } input_clock_t;
void input_ClockInit( input_thread_t *, input_clock_t *, vlc_bool_t b_master, int i_cr_average, int i_rate ); void input_ClockInit( input_clock_t *, vlc_bool_t b_master, int i_cr_average, int i_rate );
void input_ClockSetPCR( input_thread_t *, input_clock_t *, mtime_t ); void input_ClockSetPCR( input_thread_t *, input_clock_t *, mtime_t );
void input_ClockResetPCR( input_thread_t *, input_clock_t * ); void input_ClockResetPCR( input_clock_t * );
mtime_t input_ClockGetTS( input_thread_t *, input_clock_t *, mtime_t ); mtime_t input_ClockGetTS( input_thread_t *, input_clock_t *, mtime_t );
void input_ClockSetRate( input_thread_t *, input_clock_t *cl, int i_rate ); void input_ClockSetRate( input_clock_t *cl, int i_rate );
/* Subtitles */ /* Subtitles */
char **subtitles_Detect( input_thread_t *, char* path, const char *fname ); char **subtitles_Detect( input_thread_t *, char* path, const char *fname );
......
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