Commit 0051f028 authored by Laurent Aimar's avatar Laurent Aimar

Privatized p_input->b_can_pace_control.

parent c63257e2
...@@ -411,8 +411,6 @@ struct input_thread_t ...@@ -411,8 +411,6 @@ struct input_thread_t
bool b_preparsing; bool b_preparsing;
bool b_dead; bool b_dead;
bool b_can_pace_control;
/* All other data is input_thread is PRIVATE. You can't access it /* All other data is input_thread is PRIVATE. You can't access it
* outside of src/input */ * outside of src/input */
input_thread_private_t *p; input_thread_private_t *p;
......
...@@ -384,8 +384,8 @@ static mtime_t EsOutGetWakeup( es_out_t *out ) ...@@ -384,8 +384,8 @@ static mtime_t EsOutGetWakeup( es_out_t *out )
/* We do not have a wake up date if the input cannot have its speed /* We do not have a wake up date if the input cannot have its speed
* controlled or sout is imposing its own or while buffering * controlled or sout is imposing its own or while buffering
* *
* FIXME for !p_input->b_can_pace_control a wkeup time is still needed to avoid too strong buffering */ * FIXME for !p_input->p->b_can_pace_control a wkeup time is still needed to avoid too strong buffering */
if( !p_input->b_can_pace_control || if( !p_input->p->b_can_pace_control ||
p_input->p->b_out_pace_control || p_input->p->b_out_pace_control ||
p_sys->b_buffering ) p_sys->b_buffering )
return 0; return 0;
...@@ -2181,7 +2181,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) ...@@ -2181,7 +2181,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
/* 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_Update( p_pgrm->p_clock, VLC_OBJECT(p_sys->p_input), input_clock_Update( p_pgrm->p_clock, VLC_OBJECT(p_sys->p_input),
p_sys->p_input->b_can_pace_control || p_sys->b_buffering, i_pcr, mdate() ); p_sys->p_input->p->b_can_pace_control || p_sys->b_buffering, i_pcr, mdate() );
/* Check buffering state on master clock update */ /* Check buffering state on master clock update */
if( p_sys->b_buffering && p_pgrm == p_sys->p_pgrm ) if( p_sys->b_buffering && p_pgrm == p_sys->p_pgrm )
EsOutDecodersStopBuffering( out, false ); EsOutDecodersStopBuffering( out, false );
......
...@@ -457,7 +457,7 @@ static int ControlLockedGetWakeup( es_out_t *p_out, mtime_t *pi_wakeup ) ...@@ -457,7 +457,7 @@ static int ControlLockedGetWakeup( es_out_t *p_out, mtime_t *pi_wakeup )
if( p_sys->b_delayed ) if( p_sys->b_delayed )
{ {
assert( !p_sys->p_input->b_can_pace_control ); assert( !p_sys->p_input->p->b_can_pace_control );
*pi_wakeup = 0; *pi_wakeup = 0;
} }
else else
...@@ -490,7 +490,7 @@ static int ControlLockedSetPauseState( es_out_t *p_out, bool b_source_paused, bo ...@@ -490,7 +490,7 @@ static int ControlLockedSetPauseState( es_out_t *p_out, bool b_source_paused, bo
else else
{ {
i_ret = VLC_EGENERIC; i_ret = VLC_EGENERIC;
if( !p_sys->p_input->b_can_pace_control ) if( !p_sys->p_input->p->b_can_pace_control )
{ {
if( !p_sys->b_delayed ) if( !p_sys->b_delayed )
TsStart( p_out ); TsStart( p_out );
...@@ -525,7 +525,7 @@ static int ControlLockedSetRate( es_out_t *p_out, int i_src_rate, int i_rate ) ...@@ -525,7 +525,7 @@ static int ControlLockedSetRate( es_out_t *p_out, int i_src_rate, int i_rate )
else else
{ {
i_ret = VLC_EGENERIC; i_ret = VLC_EGENERIC;
if( !p_sys->p_input->b_can_pace_control ) if( !p_sys->p_input->p->b_can_pace_control )
{ {
if( !p_sys->b_delayed ) if( !p_sys->b_delayed )
TsStart( p_out ); TsStart( p_out );
......
...@@ -165,7 +165,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, ...@@ -165,7 +165,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
/* Init Common fields */ /* Init Common fields */
p_input->b_eof = false; p_input->b_eof = false;
p_input->b_can_pace_control = true; p_input->p->b_can_pace_control = true;
p_input->p->i_start = 0; p_input->p->i_start = 0;
p_input->p->i_time = 0; p_input->p->i_time = 0;
p_input->p->i_stop = 0; p_input->p->i_stop = 0;
...@@ -901,7 +901,7 @@ static void InitTitle( input_thread_t * p_input ) ...@@ -901,7 +901,7 @@ static void InitTitle( input_thread_t * p_input )
} }
/* Global flag */ /* Global flag */
p_input->b_can_pace_control = p_master->b_can_pace_control; p_input->p->b_can_pace_control = p_master->b_can_pace_control;
p_input->p->b_can_pause = p_master->b_can_pause; p_input->p->b_can_pause = p_master->b_can_pause;
p_input->p->b_can_rate_control = p_master->b_can_rate_control; p_input->p->b_can_rate_control = p_master->b_can_rate_control;
...@@ -1181,7 +1181,7 @@ static int Init( input_thread_t * p_input ) ...@@ -1181,7 +1181,7 @@ static int Init( input_thread_t * p_input )
{ {
p_input->p->b_out_pace_control = (p_input->p->p_sout->i_out_pace_nocontrol > 0); p_input->p->b_out_pace_control = (p_input->p->p_sout->i_out_pace_nocontrol > 0);
if( p_input->b_can_pace_control && p_input->p->b_out_pace_control ) if( p_input->p->b_can_pace_control && p_input->p->b_out_pace_control )
{ {
/* We don't want a high input priority here or we'll /* We don't want a high input priority here or we'll
* end-up sucking up all the CPU time */ * end-up sucking up all the CPU time */
...@@ -1773,7 +1773,7 @@ static bool Control( input_thread_t *p_input, int i_type, ...@@ -1773,7 +1773,7 @@ static bool Control( input_thread_t *p_input, int i_type,
i_rate = INPUT_RATE_DEFAULT; i_rate = INPUT_RATE_DEFAULT;
} }
if( i_rate != p_input->p->i_rate && if( i_rate != p_input->p->i_rate &&
!p_input->b_can_pace_control && p_input->p->b_can_rate_control ) !p_input->p->b_can_pace_control && p_input->p->b_can_rate_control )
{ {
int i_ret; int i_ret;
if( p_input->p->input.p_access ) if( p_input->p->input.p_access )
...@@ -1803,7 +1803,7 @@ static bool Control( input_thread_t *p_input, int i_type, ...@@ -1803,7 +1803,7 @@ static bool Control( input_thread_t *p_input, int i_type,
if( p_input->p->input.b_rescale_ts ) if( p_input->p->input.b_rescale_ts )
{ {
const int i_rate_source = (p_input->b_can_pace_control || p_input->p->b_can_rate_control ) ? i_rate : INPUT_RATE_DEFAULT; const int i_rate_source = (p_input->p->b_can_pace_control || p_input->p->b_can_rate_control ) ? i_rate : INPUT_RATE_DEFAULT;
es_out_SetRate( p_input->p->p_es_out, i_rate_source, i_rate ); es_out_SetRate( p_input->p->p_es_out, i_rate_source, i_rate );
} }
......
...@@ -78,6 +78,7 @@ struct input_thread_private_t ...@@ -78,6 +78,7 @@ struct input_thread_private_t
/* Global properties */ /* Global properties */
bool b_can_pause; bool b_can_pause;
bool b_can_rate_control; bool b_can_rate_control;
bool b_can_pace_control;
double f_fps; double f_fps;
int i_state; int i_state;
......
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