[FFmpeg-devel] [PATCH 1/6 v2] lavu: add av_gettime_relative()

Michael Niedermayer michaelni at gmx.at
Sat May 17 15:40:30 CEST 2014


On Sat, May 17, 2014 at 01:42:07AM -0400, Olivier Langlois wrote:
[...]
> > > > https://ffmpeg.org/pipermail/ffmpeg-devel/2014-May/157346.html
> > > > 
> > > > If possible, someone could adapt av_gettime_relative() implementation to
> > > > make it monotonic on Windows or some other platforms as well.
> > > > 
> > > How about making these 2 ffmpeg features more robust even on platforms
> > > where av_gettime_relative() is not monotonic?
> > > 
> > > This could be done by using for the first time the new function
> > > av_gettime_relative_is_monotonic() and comparing that the second time is
> > > greater or equal before performing the substraction.
> > 
> > Assuming we are using 64 bit numbers I don't see why you'd need a
> > av_gettime_relative_is_monotonic.
> > Worst that can happen is that you mitigate actual bugs in the
> > monotonic clock implementation.
> 
> av_gettime_relative() will only be monotonic on POSIX platforms, in case
> that it is important for the user code to know beforehand,
> av_gettime_relative_is_monotonic() is there. This is to make the API
> more future proof and complete. This was a suggestion from Nicolas
> George that I accepted:
> 
> https://ffmpeg.org/pipermail/ffmpeg-devel/2014-April/157023.html
> 
> However after having considered to use it, I realise that since it is
> essentially a preprocessor defines driven function, it should either be
> implemented as a macro or as an inline function. I'll look in ffmpeg
> header files for similar functions to see what is the usual way to
> handle that type of functions.

i dont think it should be a macro or inline function as the existence
of the feature depends on libavutil.so and that could be recompiled
without the application using it being recompiled


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140517/aac5a93b/attachment.asc>


More information about the ffmpeg-devel mailing list