[vlc-devel] [PATCH 08/17] es_out: use the input_clock as a master source of vlc_clock
thomas at gllm.fr
Fri Feb 19 08:38:09 UTC 2021
Thanks for this review, you raise an important point. Let me enumerate what my patch set is changing and what could be discussed.
- 1/ We add back the input (PCR) as clock master, disabled by default. This feature is likely to be used by advanced users.
- 2/ We now use the input clock to calculate the pts_delay for the Output. When converting the first PTS, the master ES will use the input clock to convert its PTS. Once the master ES is started, (the first vlc_clock_Update() is called), it won't use the input clock anymore.
The pts_delay calculated by this new way is now the same as what we were doing in VLC 3.0 (you can easily see it by comparing the starting differed logs in pulse audio). When we added the clock, we tried to emulate this calculation via vlc_clock_main_SetFirstPcr() and vlc_clock_main_SetInputDejitter() but the results are not exactly the same.
- 3/ If there is no master, the input clock is used as master (like in VLC 3.0).
I think the points 1/ and 2/ are valid. What do you think?
As for 3/, we can do it differently:
- All ES types can be the master (but the audio is in priority).
- Use to the current monotonic fallback when there is no audio by default. The "--clock-master" option will have 3 options: master_audio, input, monotonic.
Thanks for your time!
On Wed, Feb 17, 2021, at 20:52, Rémi Denis-Courmont wrote:
> Le maanantaina 15. helmikuuta 2021, 12.15.03 EET Thomas Guillem a écrit :
> > There is now always a master clock, the input one or the audio one.
> That assertion does not make much sense.
> The input can only provide a clock if it is paced, which is not usually the
> case, at least not for regular files. And even when it is, it might be much too
> coarse/irregular to be useful (though we can leave that later determination to
> the user).
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel