Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-12-06 19:18:16 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-28 13:20:48 +0300
commit45259a0ee487aadb956f7e64c073e3f3437d609c (patch)
tree0d5e466fa3738966b78af402c62c428a5209e5dd /libavutil/eval.h
parent26f040bcb4a1db78d1311af2e69de6984ecb43e5 (diff)
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.h14
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);