[FFmpeg-devel] [PATCH 3/3] avdevice: use av_gettime_relative() for timestamps

Kieran Kunhya kierank at obe.tv
Sun Feb 7 19:44:39 EET 2021


On Sun, 7 Feb 2021, 18:34 Nicolas George, <george at nsup.org> wrote:

> Kieran Kunhya (12021-02-07):
> > This time can jump forward or backwards. It is trivial to do this.
>
> Not on a correctly configured system, it does not.
>

NTP is allowed to jump when it wants for example. It's not trivial for the
user to guarantee this.

> The monotonic clock cannot do that.
>
> The monotonic clock cannot synchronize from different computers.
>
> Each has limitations the other has not, this is why we need both as
> options. Because YOU do not know if the user's computers are correctly
> synchronized, YOU do not know if the user needs to synchronise between
> different computers. But the users knows. Hence the option. For the
> user, because the user knows.
>

Exactly, so by default you must give the user a clock which is guaranteed
not to jump as you don't know. If they need to synchronise between PCs
using your naive process they can choose gettimeofday. Hopefully they
understand the consequences of that unlike you. It's still a flawed process
because of timestamp jitter etc.

Kieran


Regards,
>
> --
>   Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list