[FFmpeg-devel] [RFC] eval API review

Stefano Sabatini stefano.sabatini-lala
Mon Apr 5 21:46:31 CEST 2010


On date Monday 2010-04-05 21:16:59 +0200, Michael Niedermayer encoded:
> On Sun, Apr 04, 2010 at 05:03:03PM +0200, Stefano Sabatini wrote:
[...]
> > |typedef struct ff_expr_s AVEvalExpr;
> 
> why not AVExpr ?
> 
> and if so all the names might need to be adapted to that

Yes.

> [...]
> > |[...]
> > |double av_strtod(const char *numstr, char **tail);
> > 
> > I propose to replace this with a function:
> > int av_strtod2(double *res, const char *numstr, char **tail);
> > 
> > for consistency with the rest of the API.
> 
> libc strtod() has a widespread API, iam against us using a different one
> that is unless the widespread one has a shortcomming.

OK.

> > At the end the API should consist of the following functions:
> > av_parse_expr()      // parse an expression and create an AVEvalExpr
> > av_eval_expr()       // evaluate an already parsed expression
> 
> > av_parse_eval_expr() // parse and evaluate at once an expression
> 
> if you want to use long names then this is missing an "and"

That or av_parse_and_eval_expr() is fine by me.

I'll start to push patches for the transition soon.

Regards.
-- 
FFmpeg = Formidable and Frightening Mega Philosophical Experimenting Generator



More information about the ffmpeg-devel mailing list