[FFmpeg-devel] [PATCH] eval: add function to access the current "wallclock" time.
Michael Niedermayer
michaelni at gmx.at
Wed Jan 23 20:23:36 CET 2013
On Tue, Jan 22, 2013 at 10:05:24PM +0100, Stefano Sabatini wrote:
> On date Sunday 2013-01-20 19:09:11 +0100, Michael Niedermayer encoded:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > libavutil/eval.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/libavutil/eval.c b/libavutil/eval.c
> > index 6687b64..6ea7504 100644
> > --- a/libavutil/eval.c
> > +++ b/libavutil/eval.c
> > @@ -32,6 +32,7 @@
> > #include "eval.h"
> > #include "log.h"
> > #include "mathematics.h"
> > +#include "time.h"
> >
> > typedef struct Parser {
> > const AVClass *class;
> > @@ -156,6 +157,11 @@ struct AVExpr {
> > double *var;
> > };
> >
> > +static double etime(double v)
> > +{
> > + return av_gettime() * 0.000001;
> > +}
> > +
> > static double eval_expr(Parser *p, AVExpr *e)
> > {
> > switch (e->type) {
> > @@ -377,6 +383,7 @@ static int parse_primary(AVExpr **e, Parser *p)
> > else if (strmatch(next, "exp" )) d->a.func0 = exp;
> > else if (strmatch(next, "log" )) d->a.func0 = log;
> > else if (strmatch(next, "abs" )) d->a.func0 = fabs;
> > + else if (strmatch(next, "time" )) d->a.func0 = etime;
> > else if (strmatch(next, "squish")) d->type = e_squish;
> > else if (strmatch(next, "gauss" )) d->type = e_gauss;
> > else if (strmatch(next, "mod" )) d->type = e_mod;
>
> Missing doc update (doc/eval.texi) and micro bump, should be good
> otherwise.
fixed, applied
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130123/e34f9586/attachment.asc>
More information about the ffmpeg-devel
mailing list