24#ifndef AVFILTER_TEXTUTILS_H
25#define AVFILTER_TEXTUTILS_H
51 int (*
func)(
void *
ctx, AVBPrint *bp,
const char *function_name,
unsigned argc,
char **args);
121 const char *fmt,
const char *strftime_fmt);
138int ff_print_time(
void *log_ctx, AVBPrint *bp,
const char *strftime_fmt,
char localtime);
140typedef double (*ff_eval_func2)(
void *,
double a,
double b);
163 const char *
const *fun_names,
const ff_eval_func2 *fun_values,
164 const char *
const *
var_names,
const double *var_values,
198 const char *
const *fun_names,
const ff_eval_func2 *fun_values,
199 const char *
const *
var_names,
const double *var_values,
209static inline int ff_is_newline(uint32_t
c)
211 return c ==
'\n' ||
c ==
'\r' ||
c ==
'\f' ||
c ==
'\v';
227 unsigned char **text,
size_t *text_size);
static const char *const format[]
simple arithmetic expression evaluator
static const char *const var_names[]
Text expander context, used to encapsulate the logic to expand a given text template.
unsigned int functions_nb
number of functions
void * log_ctx
log context to pass to the function, used for logging and for accessing the context for the function
const FFExpandTextFunction * functions
list of functions to use to expand sequences in the format FUNCTION_NAME{PARAMS}
Function used to expand a template sequence in the format %{FUNCTION_NAME[:PARAMS]}...
int(* func)(void *ctx, AVBPrint *bp, const char *function_name, unsigned argc, char **args)
actual function used to perform the expansion
const char * name
name of the function
unsigned argc_min
minimum and maximum number of arguments accepted by the function in the PARAMS
static AVFormatContext * ctx
int ff_print_pts(void *log_ctx, AVBPrint *bp, double pts, const char *delta, const char *fmt, const char *strftime_fmt)
int ff_load_textfile(void *log_ctx, const char *textfile, unsigned char **text, size_t *text_size)
int ff_print_time(void *log_ctx, AVBPrint *bp, const char *strftime_fmt, char localtime)
int ff_print_formatted_eval_expr(void *log_ctx, AVBPrint *bp, const char *expr, const char *const *fun_names, const ff_eval_func2 *fun_values, const char *const *var_names, const double *var_values, void *eval_ctx, const char format, int positions)
int ff_print_eval_expr(void *log_ctx, AVBPrint *bp, const char *expr, const char *const *fun_names, const ff_eval_func2 *fun_values, const char *const *var_names, const double *var_values, void *eval_ctx)
int ff_expand_text(FFExpandTextContext *expand_text, const char *text, AVBPrint *bp)
Expand text template.
static const uint16_t positions[][14][3]