[FFmpeg-devel] [PATCH] lavd: Use av_gettime_relative()
george at nsup.org
Sun May 18 09:29:23 CEST 2014
Le tridi 23 floréal, an CCXXII, Olivier Langlois a écrit :
> Whenever av_gettime() is used to measure relative period of time,
> av_gettime_relative() is prefered as it guarantee monotonic time
> on supported platforms.
> Since v4l2 is compiled only on Linux where av_gettime_relative()
> is monotonic, a small wrapper function av_gettime_monotonic() is used
> (should be inlined the compiler) to put emphasis on that fact.
Since you leave the #if logic present, the clock is really monotonic, there
is really no doubt about it (except if broken on purpose). But the
explanations do no harm.
At a later point, I intend to rework that code to make better use of your
new API (use av_gettime_is_monotonic() and drop the #if logic; possibly make
the code usable by other devices).
But for now this patch looks plenty good enough to me.
Thanks for your efforts.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: Digital signature
More information about the ffmpeg-devel