Commit 77dbb1a4 authored by Laurent Aimar's avatar Laurent Aimar

Removed all clock dependencies on input.

parent b72b3e53
...@@ -192,10 +192,10 @@ void input_clock_Delete( input_clock_t *cl ) ...@@ -192,10 +192,10 @@ void input_clock_Delete( input_clock_t *cl )
* i_ck_system: date in system clock * i_ck_system: date in system clock
*****************************************************************************/ *****************************************************************************/
void input_clock_SetPCR( input_clock_t *cl, void input_clock_SetPCR( input_clock_t *cl,
input_thread_t *p_input, vlc_object_t *p_log, bool b_can_pace_control,
mtime_t i_ck_stream, mtime_t i_ck_system ) mtime_t i_ck_stream, mtime_t i_ck_system )
{ {
const bool b_synchronize = p_input->b_can_pace_control && cl->b_master; const bool b_synchronize = b_can_pace_control && cl->b_master;
bool b_reset_reference = false; bool b_reset_reference = false;
if( ( !cl->b_has_reference ) || if( ( !cl->b_has_reference ) ||
...@@ -213,11 +213,11 @@ void input_clock_SetPCR( input_clock_t *cl, ...@@ -213,11 +213,11 @@ void input_clock_SetPCR( input_clock_t *cl,
/* Stream discontinuity, for which we haven't received a /* Stream discontinuity, for which we haven't received a
* 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_log, "clock gap, unexpected stream discontinuity" );
cl->last_pts = 0; cl->last_pts = 0;
/* */ /* */
msg_Warn( p_input, "feeding synchro with a new reference point trying to recover from clock gap" ); msg_Warn( p_log, "feeding synchro with a new reference point trying to recover from clock gap" );
b_reset_reference= true; b_reset_reference= true;
} }
if( b_reset_reference ) if( b_reset_reference )
...@@ -294,7 +294,7 @@ void input_clock_SetMaster( input_clock_t *cl, bool b_master ) ...@@ -294,7 +294,7 @@ void input_clock_SetMaster( input_clock_t *cl, bool b_master )
/***************************************************************************** /*****************************************************************************
* input_clock_GetWakeup * input_clock_GetWakeup
*****************************************************************************/ *****************************************************************************/
mtime_t input_clock_GetWakeup( input_clock_t *cl, input_thread_t *p_input ) mtime_t input_clock_GetWakeup( input_clock_t *cl )
{ {
/* Not synchronized, we cannot wait */ /* Not synchronized, we cannot wait */
if( !cl->b_has_reference ) if( !cl->b_has_reference )
......
...@@ -351,7 +351,8 @@ es_out_id_t *input_EsOutGetFromID( es_out_t *out, int i_id ) ...@@ -351,7 +351,8 @@ es_out_id_t *input_EsOutGetFromID( es_out_t *out, int i_id )
mtime_t input_EsOutGetWakeup( es_out_t *out ) mtime_t input_EsOutGetWakeup( es_out_t *out )
{ {
es_out_sys_t *p_sys = out->p_sys; es_out_sys_t *p_sys = out->p_sys;
input_thread_t *p_input = p_sys->p_input;
if( !p_sys->p_pgrm ) if( !p_sys->p_pgrm )
return 0; return 0;
...@@ -1916,7 +1917,8 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args ) ...@@ -1916,7 +1917,8 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
i_pcr = (int64_t)va_arg( args, int64_t ); i_pcr = (int64_t)va_arg( args, int64_t );
/* search program /* search program
* TODO do not use mdate() but proper stream acquisition date */ * TODO do not use mdate() but proper stream acquisition date */
input_clock_SetPCR( p_pgrm->p_clock, p_sys->p_input, i_pcr, mdate() ); input_clock_SetPCR( p_pgrm->p_clock, VLC_OBJECT(p_sys->p_input),
p_sys->p_input->b_can_pace_control, i_pcr, mdate() );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -361,7 +361,8 @@ typedef struct input_clock_t input_clock_t; ...@@ -361,7 +361,8 @@ typedef struct input_clock_t input_clock_t;
input_clock_t *input_clock_New( 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 );
void input_clock_Delete( input_clock_t * ); 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_SetPCR( input_clock_t *, vlc_object_t *p_log,
bool b_can_pace_control, mtime_t i_clock, mtime_t i_system );
void input_clock_ResetPCR( input_clock_t * ); void input_clock_ResetPCR( input_clock_t * );
mtime_t input_clock_GetTS( input_clock_t *, mtime_t i_pts_delay, mtime_t ); mtime_t input_clock_GetTS( input_clock_t *, mtime_t i_pts_delay, mtime_t );
void input_clock_SetRate( input_clock_t *cl, int i_rate ); void input_clock_SetRate( input_clock_t *cl, int i_rate );
......
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