Revision edd259f9 libavcodec/eval.h

View differences:

libavcodec/eval.h
33 33
 * Note, this is significantly slower than ff_eval_expr().
34 34
 *
35 35
 * @param s expression as a zero terminated string for example "1+2^3+5*5+sin(2/3)"
36
 * @param func1 NULL terminated array of function pointers for functions which take 1 argument
37
 * @param func2 NULL terminated array of function pointers for functions which take 2 arguments
38 36
 * @param const_name NULL terminated array of zero terminated strings of constant identifers for example {"PI", "E", 0}
37
 * @param const_value a zero terminated array of values for the identifers from const_name
39 38
 * @param func1_name NULL terminated array of zero terminated strings of func1 identifers
39
 * @param func1 NULL terminated array of function pointers for functions which take 1 argument
40 40
 * @param func2_name NULL terminated array of zero terminated strings of func2 identifers
41
 * @param func2 NULL terminated array of function pointers for functions which take 2 arguments
41 42
 * @param error pointer to a char* which is set to an error message if something goes wrong
42
 * @param const_value a zero terminated array of values for the identifers from const_name
43 43
 * @param opaque a pointer which will be passed to all functions from func1 and func2
44 44
 * @return the value of the expression
45 45
 */
46
double ff_parse_and_eval_expr(const char *s, const double *const_value, const char * const *const_name,
47
               double (* const *func1)(void *, double), const char * const *func1_name,
48
               double (* const *func2)(void *, double, double), const char * const *func2_name,
46
double ff_parse_and_eval_expr(const char *s,
47
                              const char * const *const_name, const double *const_value,
48
                              const char * const *func1_name, double (* const *func1)(void *, double),
49
                              const char * const *func2_name, double (* const *func2)(void *, double, double),
49 50
               void *opaque, const char **error);
50 51

  
51 52
/**
52 53
 * Parses an expression.
53 54
 *
54 55
 * @param s expression as a zero terminated string for example "1+2^3+5*5+sin(2/3)"
55
 * @param func1 NULL terminated array of function pointers for functions which take 1 argument
56
 * @param func2 NULL terminated array of function pointers for functions which take 2 arguments
57 56
 * @param const_name NULL terminated array of zero terminated strings of constant identifers for example {"PI", "E", 0}
58 57
 * @param func1_name NULL terminated array of zero terminated strings of func1 identifers
58
 * @param func1 NULL terminated array of function pointers for functions which take 1 argument
59 59
 * @param func2_name NULL terminated array of zero terminated strings of func2 identifers
60
 * @param func2 NULL terminated array of function pointers for functions which take 2 arguments
60 61
 * @param error pointer to a char* which is set to an error message if something goes wrong
61 62
 * @return AVExpr which must be freed with ff_free_expr() by the user when it is not needed anymore
62 63
 *         NULL if anything went wrong
63 64
 */
64
AVExpr *ff_parse_expr(const char *s, const char * const *const_name,
65
               double (* const *func1)(void *, double), const char * const *func1_name,
66
               double (* const *func2)(void *, double, double), const char * const *func2_name,
65
AVExpr *ff_parse_expr(const char *s,
66
                      const char * const *const_name,
67
                      const char * const *func1_name, double (* const *func1)(void *, double),
68
                      const char * const *func2_name, double (* const *func2)(void *, double, double),
67 69
               const char **error);
68 70

  
69 71
/**

Also available in: Unified diff