FFmpeg
|
#include <fenv.h>
#include <math.h>
#include <string.h>
#include "textutils.h"
#include "libavutil/avutil.h"
#include "libavutil/error.h"
#include "libavutil/file.h"
#include "libavutil/mem.h"
#include "libavutil/time.h"
#include "libavutil/time_internal.h"
Go to the source code of this file.
Functions | |
static int | ff_expand_text_function_internal (FFExpandTextContext *expand_text, AVBPrint *bp, char *name, unsigned argc, char **argv) |
static int | ff_expand_text_function (FFExpandTextContext *expand_text, AVBPrint *bp, const char **rtext) |
Expand text template pointed to by *rtext. More... | |
int | ff_expand_text (FFExpandTextContext *expand_text, const char *text, AVBPrint *bp) |
Expand text template. More... | |
int | ff_print_pts (void *log_ctx, AVBPrint *bp, double pts, const char *delta, const char *fmt, const char *strftime_fmt) |
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_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_load_textfile (void *log_ctx, const char *textfile, unsigned char **text, size_t *text_size) |
text expansion utilities
Definition in file textutils.c.
|
static |
Definition at line 36 of file textutils.c.
Referenced by ff_expand_text_function().
|
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.
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 |
Definition at line 83 of file textutils.c.
Referenced by ff_expand_text().
int ff_expand_text | ( | FFExpandTextContext * | expand_text, |
const char * | text, | ||
AVBPrint * | bp | ||
) |
Expand text template.
Expand text template defined in text using the logic defined in a text expander object.
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 |
Definition at line 124 of file textutils.c.
Referenced by draw_qrcode(), and draw_text().
int ff_print_pts | ( | void * | log_ctx, |
AVBPrint * | bp, | ||
double | pts, | ||
const char * | delta, | ||
const char * | fmt, | ||
const char * | strftime_fmt | ||
) |
Definition at line 150 of file textutils.c.
Referenced by func_pts().
int ff_print_time | ( | void * | log_ctx, |
AVBPrint * | bp, | ||
const char * | strftime_fmt, | ||
char | localtime | ||
) |
Definition at line 203 of file textutils.c.
Referenced by func_strftime().
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 | ||
) |
Definition at line 282 of file textutils.c.
Referenced by func_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, | ||
const double * | var_values, | ||
void * | eval_ctx, | ||
const char | format, | ||
int | positions | ||
) |
Definition at line 304 of file textutils.c.
Referenced by func_eval_expr_formatted().
int ff_load_textfile | ( | void * | log_ctx, |
const char * | textfile, | ||
unsigned char ** | text, | ||
size_t * | text_size | ||
) |
Definition at line 354 of file textutils.c.
Referenced by filter_frame(), and init().