[vlc-devel] [PATCH] input: skip extra buffering (size based) for low-delay

Thomas Guillem thomas at gllm.fr
Tue Oct 15 17:03:02 CEST 2019


LGTM

On Wed, Oct 9, 2019, at 21:12, Francois Cartegnie wrote:
> just like with stream paced content
> ---
>  src/input/es_out.c         | 4 +++-
>  src/input/input.c          | 2 ++
>  src/input/input_internal.h | 3 +++
>  3 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/src/input/es_out.c b/src/input/es_out.c
> index f29615b3dd..c5ba09dca3 100644
> --- a/src/input/es_out.c
> +++ b/src/input/es_out.c
> @@ -3033,10 +3033,12 @@ static int EsOutVaControlLocked( es_out_t *out, 
> int i_query, va_list args )
>  
>          /* TODO do not use vlc_tick_now() but proper stream 
> acquisition date */
>          bool b_late;
> +        bool b_extra_buffering_allowed = 
> !input_priv(p_sys->p_input)->b_low_delay &&
> +                                         EsOutIsExtraBufferingAllowed( 
> out );
>          input_clock_Update( p_pgrm->p_input_clock, 
> VLC_OBJECT(p_sys->p_input),
>                              &b_late,
>                              
> input_priv(p_sys->p_input)->b_can_pace_control || p_sys->b_buffering,
> -                            EsOutIsExtraBufferingAllowed( out ),
> +                            b_extra_buffering_allowed,
>                              i_pcr, vlc_tick_now() );
>  
>          if( !p_sys->p_pgrm )
> diff --git a/src/input/input.c b/src/input/input.c
> index 97d299a7bd..aefd6ee5a0 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -390,6 +390,8 @@ static input_thread_t *Create( vlc_object_t *p_parent,
>      /* Create Object Variables for private use only */
>      input_ConfigVarInit( p_input );
>  
> +    priv->b_low_delay = var_InheritBool( p_input, "low-delay" );
> +
>      /* Remove 'Now playing' info as it is probably outdated */
>      input_item_SetNowPlaying( p_item, NULL );
>      input_item_SetESNowPlaying( p_item, NULL );
> diff --git a/src/input/input_internal.h b/src/input/input_internal.h
> index 3dc2aed90e..203131e7be 100644
> --- a/src/input/input_internal.h
> +++ b/src/input/input_internal.h
> @@ -474,6 +474,9 @@ typedef struct input_thread_private_t
>      vlc_tick_t  i_start;    /* :start-time,0 by default */
>      vlc_tick_t  i_stop;     /* :stop-time, 0 if none */
>  
> +    /* Delays */
> +    bool        b_low_delay;
> +
>      /* Output */
>      bool            b_out_pace_control; /* XXX Move it ot es_sout ? */
>      sout_instance_t *p_sout;            /* Idem ? */
> -- 
> 2.21.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list