Go to the source code of this file.
Functions
Expand text template pointed to by *rtext.
More...
int ff_print_time (void *log_ctx, AVBPrint *bp, const char *strftime_fmt, char localtime)
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_load_textfile (void *log_ctx, const char *textfile, unsigned char **text, size_t *text_size)
Detailed Description
text expansion utilities
Definition in file textutils.c.
Function Documentation
◆ ff_expand_text_function_internal()
AVBPrint *
bp,
char *
name,
unsigned
argc,
char **
argv
)
static
◆ ff_expand_text_function()
AVBPrint *
bp,
char **
rtext
)
static
Expand text template pointed to by *rtext.
Expand text template defined in text using the logic defined in a text expander object.
This function expects the text to be in the format %{FUNCTION_NAME[:PARAMS]}, where PARAMS is a sequence of strings separated by : and represents the function arguments to use for the function evaluation.
- Parameters
-
text_expander TextExpander object used to expand the text
bp BPrint object where the expanded text is written to
rtext pointer to pointer to the text to expand, it is updated to point to the next part of the template to process
- Returns
- negative value corresponding to an AVERROR error code in case of errors, a non-negative value otherwise
Definition at line 81 of file textutils.c.
Referenced by ff_expand_text().
◆ ff_expand_text()
char *
text,
AVBPrint *
bp
)
Expand text template.
Expand text template defined in text using the logic defined in a text expander object.
- Parameters
-
expand_text text expansion context used to expand the text
text template text to expand
bp BPrint object where the expanded text is written to
- Returns
- negative value corresponding to an AVERROR error code in case of errors, a non-negative value otherwise
Definition at line 122 of file textutils.c.
Referenced by draw_qrcode(), and draw_text().
◆ ff_print_pts()
int ff_print_pts
(
void *
log_ctx,
AVBPrint *
bp,
const char *
delta,
const char *
fmt,
const char *
strftime_fmt
)
◆ ff_print_time()
int ff_print_time
(
void *
log_ctx,
AVBPrint *
bp,
const char *
strftime_fmt,
char
localtime
)
◆ ff_print_eval_expr()
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,
void *
eval_ctx
)
◆ ff_print_formatted_eval_expr()
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,
void *
eval_ctx,
const char
format,
)
◆ ff_load_textfile()
int ff_load_textfile
(
void *
log_ctx,
const char *
textfile,
unsigned char **
text,
size_t *
text_size
)