[vlc-commits] demux: mock: add pts_delay parameter

Thomas Guillem git at videolan.org
Fri Sep 6 16:50:58 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Sep  6 15:10:29 2019 +0200| [bc89385d14c525dd43a97a22055e9111ebf32627] | committer: Thomas Guillem

demux: mock: add pts_delay parameter

And use the default pts delay.

There is a double MS<->TICK conversion in order to keep the same unit than
"file-caching" and "network-caching" arguments.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc89385d14c525dd43a97a22055e9111ebf32627
---

 modules/demux/mock.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mock.c b/modules/demux/mock.c
index 70d435892b..692cdeebad 100644
--- a/modules/demux/mock.c
+++ b/modules/demux/mock.c
@@ -109,6 +109,7 @@ var_InheritFourcc(vlc_object_t *obj, const char *name)
     X(can_control_rate, bool, add_bool, var_InheritBool, true) \
     X(can_record, bool, add_bool, var_InheritBool, true) \
     X(error, bool, add_bool, var_InheritBool, false) \
+    X(pts_delay, unsigned, add_integer, var_InheritUnsigned, MS_FROM_VLC_TICK(DEFAULT_PTS_DELAY)) \
     X(add_video_track_at, vlc_tick_t, add_integer, var_InheritInteger, VLC_TICK_INVALID ) \
     X(add_audio_track_at, vlc_tick_t, add_integer, var_InheritInteger, VLC_TICK_INVALID ) \
     X(add_spu_track_at, vlc_tick_t, add_integer, var_InheritInteger, VLC_TICK_INVALID ) \
@@ -191,7 +192,7 @@ Control(demux_t *demux, int query, va_list args)
             *va_arg(args, bool *) = sys->can_control_pace;
             return VLC_SUCCESS;
         case DEMUX_GET_PTS_DELAY:
-            *va_arg(args, vlc_tick_t *) = 0;
+            *va_arg(args, vlc_tick_t *) = VLC_TICK_FROM_MS(sys->pts_delay);
             return VLC_SUCCESS;
         case DEMUX_GET_META:
             return VLC_EGENERIC;



More information about the vlc-commits mailing list