#include <sys/time.h>
#include <time.h>
#include "config.h"
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/file.h"
#include "libavutil/eval.h"
#include "libavutil/opt.h"
#include "libavutil/random_seed.h"
#include "libavutil/parseutils.h"
#include "libavutil/timecode.h"
#include "libavutil/tree.h"
#include "libavutil/lfg.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include <ft2build.h>
#include <freetype/config/ftheader.h>
#include <FT_FREETYPE_H>
#include <FT_GLYPH_H>
#include <FT_ERRORS_H>
Go to the source code of this file.
Definition in file vf_drawtext.c.
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Definition at line 166 of file vf_drawtext.c.
#define FT_ERRMSG | ( | e | ) | ft_errors[e].err_msg |
Referenced by init(), and load_font_file().
#define FT_ERROR_END_LIST { 0, NULL } }; |
Definition at line 216 of file vf_drawtext.c.
#define FT_ERROR_START_LIST { |
Definition at line 214 of file vf_drawtext.c.
#define FT_ERRORDEF | ( | e, | |||
v, | |||||
s | ) | { (e), (s) }, |
Definition at line 215 of file vf_drawtext.c.
#define OFFSET | ( | x | ) | offsetof(DrawTextContext, x) |
Definition at line 165 of file vf_drawtext.c.
typedef double(* eval_func2)(void *, double a, double b) |
Definition at line 88 of file vf_drawtext.c.
enum var_name |
Definition at line 95 of file vf_drawtext.c.
AVFILTER_DEFINE_CLASS | ( | drawtext | ) |
static int command | ( | AVFilterContext * | ctx, | |
const char * | cmd, | |||
const char * | arg, | |||
char * | res, | |||
int | res_len, | |||
int | flags | |||
) | [static] |
Definition at line 568 of file vf_drawtext.c.
Referenced by cdg_decode_frame(), check_keyboard_interaction(), idcin_read_packet(), read_connect(), and send_invoke_response().
static int config_input | ( | AVFilterLink * | inlink | ) | [static] |
Definition at line 531 of file vf_drawtext.c.
static double drand | ( | void * | opaque, | |
double | min, | |||
double | max | |||
) | [static] |
Definition at line 83 of file vf_drawtext.c.
static int draw_glyphs | ( | DrawTextContext * | dtext, | |
AVFilterBufferRef * | picref, | |||
int | width, | |||
int | height, | |||
const uint8_t | rgbcolor[4], | |||
FFDrawColor * | color, | |||
int | x, | |||
int | y | |||
) | [static] |
static int draw_text | ( | AVFilterContext * | ctx, | |
AVFilterBufferRef * | picref, | |||
int | width, | |||
int | height | |||
) | [static] |
static int end_frame | ( | AVFilterLink * | inlink | ) | [static] |
Definition at line 787 of file vf_drawtext.c.
static int glyph_cmp | ( | void * | key, | |
const void * | b | |||
) | [static] |
Definition at line 237 of file vf_drawtext.c.
Referenced by draw_glyphs(), draw_text(), and load_glyph().
static int glyph_enu_free | ( | void * | opaque, | |
void * | elem | |||
) | [static] |
static av_cold int init | ( | AVFilterContext * | ctx, | |
const char * | args | |||
) | [static] |
Definition at line 383 of file vf_drawtext.c.
static int is_newline | ( | uint32_t | c | ) | [inline, static] |
static int load_font | ( | AVFilterContext * | ctx | ) | [static] |
static int load_font_file | ( | AVFilterContext * | ctx, | |
const char * | path, | |||
int | index, | |||
const char ** | error | |||
) | [static] |
static int load_glyph | ( | AVFilterContext * | ctx, | |
Glyph ** | glyph_ptr, | |||
uint32_t | code | |||
) | [static] |
Load glyphs corresponding to the UTF-32 codepoint code.
Definition at line 247 of file vf_drawtext.c.
Referenced by draw_text(), and init().
static int null_draw_slice | ( | AVFilterLink * | link, | |
int | y, | |||
int | h, | |||
int | slice_dir | |||
) | [static] |
Definition at line 782 of file vf_drawtext.c.
static int query_formats | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 490 of file vf_drawtext.c.
static av_cold void uninit | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 506 of file vf_drawtext.c.
Initial value:
{ .name = "drawtext", .description = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."), .priv_size = sizeof(DrawTextContext), .init = init, .uninit = uninit, .query_formats = query_formats, .inputs = (const AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_VIDEO, .get_video_buffer = ff_null_get_video_buffer, .start_frame = ff_null_start_frame, .draw_slice = null_draw_slice, .end_frame = end_frame, .config_props = config_input, .min_perms = AV_PERM_WRITE | AV_PERM_READ }, { .name = NULL}}, .outputs = (const AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, { .name = NULL}}, .process_command = command, .priv_class = &drawtext_class, }
Definition at line 813 of file vf_drawtext.c.
const AVOption drawtext_options[] [static] |
Definition at line 168 of file vf_drawtext.c.
const eval_func2 fun2[] [static] |
const char* const fun2_names[] [static] |
Initial value:
{
"rand"
}
Definition at line 79 of file vf_drawtext.c.
Referenced by config_input().
const char* const var_names[] [static] |
Initial value:
{ "dar", "hsub", "vsub", "line_h", "lh", "main_h", "h", "H", "main_w", "w", "W", "max_glyph_a", "ascent", "max_glyph_d", "descent", "max_glyph_h", "max_glyph_w", "n", "sar", "t", "text_h", "th", "text_w", "tw", "x", "y", NULL }
Definition at line 59 of file vf_drawtext.c.