Commit da5a30e4 authored by Laurent Aimar's avatar Laurent Aimar

No functionnal changes.

It fixes clock prototypes.
parent 03b02bd6
......@@ -137,9 +137,9 @@ static void ClockNewRef( input_clock_t *cl,
}
/*****************************************************************************
* input_ClockNew: create a new clock
* input_clock_New: create a new clock
*****************************************************************************/
input_clock_t *input_ClockNew( bool b_master, int i_cr_average, int i_rate )
input_clock_t *input_clock_New( bool b_master, int i_cr_average, int i_rate )
{
input_clock_t *cl = malloc( sizeof(*cl) );
if( !cl )
......@@ -164,21 +164,21 @@ input_clock_t *input_ClockNew( bool b_master, int i_cr_average, int i_rate )
}
/*****************************************************************************
* input_ClockDelete: destroy a new clock
* input_clock_Delete: destroy a new clock
*****************************************************************************/
void input_ClockDelete( input_clock_t *cl )
void input_clock_Delete( input_clock_t *cl )
{
free( cl );
}
/*****************************************************************************
* input_ClockSetPCR: manages a clock reference
* input_clock_SetPCR: manages a clock reference
*
* i_ck_stream: date in stream clock
* i_ck_system: date in system clock
*****************************************************************************/
void input_ClockSetPCR( input_thread_t *p_input,
input_clock_t *cl,
void input_clock_SetPCR( input_clock_t *cl,
input_thread_t *p_input,
mtime_t i_ck_stream, mtime_t i_ck_system )
{
const bool b_synchronize = p_input->b_can_pace_control && cl->b_master;
......@@ -236,19 +236,19 @@ void input_ClockSetPCR( input_thread_t *p_input,
}
/*****************************************************************************
* input_ClockResetPCR:
* input_clock_ResetPCR:
*****************************************************************************/
void input_ClockResetPCR( input_clock_t *cl )
void input_clock_ResetPCR( input_clock_t *cl )
{
cl->b_has_reference = false;
cl->last_pts = 0;
}
/*****************************************************************************
* input_ClockGetTS: manages a PTS or DTS
* input_clock_GetTS: manages a PTS or DTS
*****************************************************************************/
mtime_t input_ClockGetTS( input_thread_t * p_input,
input_clock_t *cl, mtime_t i_ts )
mtime_t input_clock_GetTS( input_clock_t *cl,
input_thread_t *p_input, mtime_t i_ts )
{
if( !cl->b_has_reference )
return 0;
......@@ -258,9 +258,9 @@ mtime_t input_ClockGetTS( input_thread_t * p_input,
}
/*****************************************************************************
* input_ClockSetRate:
* input_clock_SetRate:
*****************************************************************************/
void input_ClockSetRate( input_clock_t *cl, int i_rate )
void input_clock_SetRate( input_clock_t *cl, int i_rate )
{
/* Move the reference point */
if( cl->b_has_reference )
......@@ -270,17 +270,17 @@ void input_ClockSetRate( input_clock_t *cl, int i_rate )
}
/*****************************************************************************
* input_ClockSetMaster:
* input_clock_SetMaster:
*****************************************************************************/
void input_ClockSetMaster( input_clock_t *cl, bool b_master )
void input_clock_SetMaster( input_clock_t *cl, bool b_master )
{
cl->b_master = b_master;
}
/*****************************************************************************
* input_ClockGetWakeup
* input_clock_GetWakeup
*****************************************************************************/
mtime_t input_ClockGetWakeup( input_thread_t *p_input, input_clock_t *cl )
mtime_t input_clock_GetWakeup( input_clock_t *cl, input_thread_t *p_input )
{
/* Not synchronized, we cannot wait */
if( !cl->b_has_reference )
......
......@@ -317,7 +317,7 @@ void input_EsOutDelete( es_out_t *out )
for( i = 0; i < p_sys->i_pgrm; i++ )
{
es_out_pgrm_t *p_pgrm = p_sys->pgrm[i];
input_ClockDelete( p_pgrm->p_clock );
input_clock_Delete( p_pgrm->p_clock );
free( p_pgrm->psz_now_playing );
free( p_pgrm->psz_publisher );
free( p_pgrm->psz_name );
......@@ -355,7 +355,7 @@ mtime_t input_EsOutGetWakeup( es_out_t *out )
if( !p_sys->p_pgrm )
return 0;
return input_ClockGetWakeup( p_sys->p_input, p_sys->p_pgrm->p_clock );
return input_clock_GetWakeup( p_sys->p_pgrm->p_clock, p_sys->p_input );
}
static void EsOutDiscontinuity( es_out_t *out, bool b_flush, bool b_audio )
......@@ -386,7 +386,7 @@ void input_EsOutChangeRate( es_out_t *out, int i_rate )
EsOutDiscontinuity( out, false, false );
for( i = 0; i < p_sys->i_pgrm; i++ )
input_ClockSetRate( p_sys->pgrm[i]->p_clock, i_rate );
input_clock_SetRate( p_sys->pgrm[i]->p_clock, i_rate );
}
int input_EsOutSetRecord( es_out_t *out, bool b_record )
......@@ -640,8 +640,8 @@ static void EsOutProgramSelect( es_out_t *out, es_out_pgrm_t *p_pgrm )
/* Switch master stream */
if( p_sys->p_pgrm )
input_ClockSetMaster( p_sys->p_pgrm->p_clock, false );
input_ClockSetMaster( p_pgrm->p_clock, true );
input_clock_SetMaster( p_sys->p_pgrm->p_clock, false );
input_clock_SetMaster( p_pgrm->p_clock, true );
p_sys->p_pgrm = p_pgrm;
/* Update "program" */
......@@ -690,7 +690,7 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group )
p_pgrm->psz_now_playing = NULL;
p_pgrm->psz_publisher = NULL;
p_pgrm->p_epg = NULL;
p_pgrm->p_clock = input_ClockNew( false, p_input->p->input.i_cr_average, p_sys->i_rate );
p_pgrm->p_clock = input_clock_New( false, p_input->p->input.i_cr_average, p_sys->i_rate );
if( !p_pgrm->p_clock )
{
free( p_pgrm );
......@@ -751,7 +751,7 @@ static int EsOutProgramDel( es_out_t *out, int i_group )
if( p_sys->p_pgrm == p_pgrm )
p_sys->p_pgrm = NULL;
input_ClockDelete( p_pgrm->p_clock );
input_clock_Delete( p_pgrm->p_clock );
free( p_pgrm->psz_name );
free( p_pgrm->psz_now_playing );
......@@ -1546,7 +1546,7 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
else if( p_block->i_dts > 0 )
{
p_block->i_dts =
input_ClockGetTS( p_input, p_pgrm->p_clock, p_block->i_dts ) + i_delay;
input_clock_GetTS( p_pgrm->p_clock, p_input, p_block->i_dts ) + i_delay;
}
if( p_block->i_pts > 0 && (p_block->i_flags&BLOCK_FLAG_PREROLL) )
{
......@@ -1555,7 +1555,7 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
else if( p_block->i_pts > 0 )
{
p_block->i_pts =
input_ClockGetTS( p_input, p_pgrm->p_clock, p_block->i_pts ) + i_delay;
input_clock_GetTS( p_pgrm->p_clock, p_input, p_block->i_pts ) + i_delay;
}
if ( p_block->i_rate == INPUT_RATE_DEFAULT &&
es->fmt.i_codec == VLC_FOURCC( 't', 'e', 'l', 'x' ) )
......@@ -1910,13 +1910,13 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
i_pcr = (int64_t)va_arg( args, int64_t );
/* search program
* TODO do not use mdate() but proper stream acquisition date */
input_ClockSetPCR( p_sys->p_input, p_pgrm->p_clock, i_pcr, mdate() );
input_clock_SetPCR( p_pgrm->p_clock, p_sys->p_input, i_pcr, mdate() );
return VLC_SUCCESS;
}
case ES_OUT_RESET_PCR:
for( i = 0; i < p_sys->i_pgrm; i++ )
input_ClockResetPCR( p_sys->pgrm[i]->p_clock );
input_clock_ResetPCR( p_sys->pgrm[i]->p_clock );
return VLC_SUCCESS;
case ES_OUT_GET_TS:
......@@ -1924,8 +1924,8 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
{
int64_t i_ts = (int64_t)va_arg( args, int64_t );
int64_t *pi_ts = (int64_t *)va_arg( args, int64_t * );
*pi_ts = input_ClockGetTS( p_sys->p_input,
p_sys->p_pgrm->p_clock, i_ts );
*pi_ts = input_clock_GetTS( p_sys->p_pgrm->p_clock,
p_sys->p_input, i_ts );
return VLC_SUCCESS;
}
return VLC_EGENERIC;
......@@ -1998,8 +1998,8 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
if( !es || !es->p_dec )
return VLC_EGENERIC;
/* XXX We should call input_ClockGetTS but PCR has been reseted
* and it will return 0, so we won't call input_ClockGetTS on all preroll samples
/* XXX We should call input_clock_GetTS but PCR has been reseted
* and it will return 0, so we won't call input_clock_GetTS on all preroll samples
* but that's ugly(more time discontinuity), it need to be improved -- fenrir */
es->i_preroll_end = i_date;
......
......@@ -358,15 +358,15 @@ bool input_EsOutDecodersEmpty( es_out_t * );
/* clock.c */
typedef struct input_clock_t input_clock_t;
input_clock_t *input_ClockNew( bool b_master, int i_cr_average, int i_rate );
void input_ClockDelete( input_clock_t * );
void input_ClockSetPCR( input_thread_t *, input_clock_t *, mtime_t i_clock, mtime_t i_system );
void input_ClockResetPCR( input_clock_t * );
mtime_t input_ClockGetTS( input_thread_t *, input_clock_t *, mtime_t );
void input_ClockSetRate( input_clock_t *cl, int i_rate );
void input_ClockSetMaster( input_clock_t *cl, bool b_master );
mtime_t input_ClockGetWakeup( input_thread_t *, input_clock_t *cl );
input_clock_t *input_clock_New( bool b_master, int i_cr_average, int i_rate );
void input_clock_Delete( input_clock_t * );
void input_clock_SetPCR( input_clock_t *, input_thread_t *, mtime_t i_clock, mtime_t i_system );
void input_clock_ResetPCR( input_clock_t * );
mtime_t input_clock_GetTS( input_clock_t *, input_thread_t *, mtime_t );
void input_clock_SetRate( input_clock_t *cl, int i_rate );
void input_clock_SetMaster( input_clock_t *cl, bool b_master );
mtime_t input_clock_GetWakeup( input_clock_t *cl, input_thread_t * );
/* Subtitles */
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