[FFmpeg-devel] [PATCH] lavd: Use av_gettime_relative()
michaelni at gmx.at
Sun May 18 16:15:10 CEST 2014
On Sun, May 18, 2014 at 09:29:23AM +0200, Nicolas George wrote:
> 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.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Old school: Use the lowest level language in which you can solve the problem
New school: Use the highest level language in which the latest supercomputer
can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel