diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-06 17:18:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-28 11:20:48 +0100 |
commit | 45259a0ee487aadb956f7e64c073e3f3437d609c (patch) | |
tree | 0d5e466fa3738966b78af402c62c428a5209e5dd /libavutil/eval.h | |
parent | 26f040bcb4a1db78d1311af2e69de6984ecb43e5 (diff) | |
download | ffmpeg-45259a0ee487aadb956f7e64c073e3f3437d609c.tar.gz |
avutil/eval: Add av_expr_count_func() similar to av_expr_count_vars()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/eval.h')
-rw-r--r-- | libavutil/eval.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavutil/eval.h b/libavutil/eval.h index 9bdb10cca2..068c62cdab 100644 --- a/libavutil/eval.h +++ b/libavutil/eval.h @@ -97,6 +97,20 @@ double av_expr_eval(AVExpr *e, const double *const_values, void *opaque); int av_expr_count_vars(AVExpr *e, unsigned *counter, int size); /** + * Track the presence of user provided functions and their number of occurrences + * in a parsed expression. + * + * @param counter a zero-initialized array where the count of each function will be stored + * if you passed 5 functions with 2 arguments to av_expr_parse() + * then for arg=2 this will use upto 5 entries. + * @param size size of array + * @param arg number of arguments the counted functions have + * @return 0 on success, a negative value indicates that no expression or array was passed + * or size was zero + */ +int av_expr_count_func(AVExpr *e, unsigned *counter, int size, int arg); + +/** * Free a parsed expression previously created with av_expr_parse(). */ void av_expr_free(AVExpr *e); |