[vlc-commits] input: skip extra buffering (size based) for low-delay
Francois Cartegnie
git at videolan.org
Tue Oct 15 17:08:56 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr 16 18:10:52 2019 +0200| [e649fae1c0a21a9ddfee6f5df9d196456be2b532] | committer: Francois Cartegnie
input: skip extra buffering (size based) for low-delay
just like with stream paced content
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e649fae1c0a21a9ddfee6f5df9d196456be2b532
---
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 3d67c35730..9fe622785e 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -3032,10 +3032,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 ? */
More information about the vlc-commits
mailing list