| 
    FFmpeg
    
   | 
 
drawtext filter, based on the original vhook/drawtext.c filter by Gustavo Sverzut Barbieri More...
#include "config.h"#include <sys/types.h>#include <sys/stat.h>#include <time.h>#include <fenv.h>#include "libavutil/avstring.h"#include "libavutil/bprint.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/time_internal.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 <FT_FREETYPE_H>#include <FT_GLYPH_H>#include <FT_STROKER_H>#include <FT_ERRORS_H>Go to the source code of this file.
Data Structures | |
| struct | DrawTextContext | 
| struct | ft_error | 
| struct | drawtext_function | 
Macros | |
| #define | OFFSET(x) offsetof(DrawTextContext, x) | 
| #define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM | 
| #define | FT_ERROR_START_LIST { | 
| #define | FT_ERRORDEF(e, v, s) { (e), (s) }, | 
| #define | FT_ERROR_END_LIST { 0, NULL } }; | 
| #define | FT_ERRMSG(e) ft_errors[e].err_msg | 
Typedefs | |
| typedef double(* | eval_func2 )(void *, double a, double b) | 
Functions | |
| static double | drand (void *opaque, double min, double max) | 
| AVFILTER_DEFINE_CLASS (drawtext) | |
| static int | glyph_cmp (const void *key, const void *b) | 
| static int | load_glyph (AVFilterContext *ctx, Glyph **glyph_ptr, uint32_t code) | 
| Load glyphs corresponding to the UTF-32 codepoint code.  More... | |
| static av_cold int | set_fontsize (AVFilterContext *ctx, unsigned int fontsize) | 
| static av_cold int | parse_fontsize (AVFilterContext *ctx) | 
| static av_cold int | update_fontsize (AVFilterContext *ctx) | 
| static int | load_font_file (AVFilterContext *ctx, const char *path, int index) | 
| static int | load_font (AVFilterContext *ctx) | 
| static int | load_textfile (AVFilterContext *ctx) | 
| static int | is_newline (uint32_t c) | 
| static av_cold int | init (AVFilterContext *ctx) | 
| static int | query_formats (AVFilterContext *ctx) | 
| static int | glyph_enu_free (void *opaque, void *elem) | 
| static av_cold void | uninit (AVFilterContext *ctx) | 
| static int | config_input (AVFilterLink *inlink) | 
| static int | command (AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags) | 
| static int | func_pict_type (AVFilterContext *ctx, AVBPrint *bp, char *fct, unsigned argc, char **argv, int tag) | 
| static int | func_pts (AVFilterContext *ctx, AVBPrint *bp, char *fct, unsigned argc, char **argv, int tag) | 
| static int | func_frame_num (AVFilterContext *ctx, AVBPrint *bp, char *fct, unsigned argc, char **argv, int tag) | 
| static int | func_metadata (AVFilterContext *ctx, AVBPrint *bp, char *fct, unsigned argc, char **argv, int tag) | 
| static int | func_strftime (AVFilterContext *ctx, AVBPrint *bp, char *fct, unsigned argc, char **argv, int tag) | 
| static int | func_eval_expr (AVFilterContext *ctx, AVBPrint *bp, char *fct, unsigned argc, char **argv, int tag) | 
| static int | func_eval_expr_int_format (AVFilterContext *ctx, AVBPrint *bp, char *fct, unsigned argc, char **argv, int tag) | 
| static int | eval_function (AVFilterContext *ctx, AVBPrint *bp, char *fct, unsigned argc, char **argv) | 
| static int | expand_function (AVFilterContext *ctx, AVBPrint *bp, char **rtext) | 
| static int | expand_text (AVFilterContext *ctx, char *text, AVBPrint *bp) | 
| static int | draw_glyphs (DrawTextContext *s, AVFrame *frame, int width, int height, FFDrawColor *color, int x, int y, int borderw) | 
| static void | update_color_with_alpha (DrawTextContext *s, FFDrawColor *color, const FFDrawColor incolor) | 
| static void | update_alpha (DrawTextContext *s) | 
| static int | draw_text (AVFilterContext *ctx, AVFrame *frame, int width, int height) | 
| static int | filter_frame (AVFilterLink *inlink, AVFrame *frame) | 
Variables | |
| static const char *const | var_names [] | 
| static const char *const | fun2_names [] | 
| static const eval_func2 | fun2 [] | 
| static const AVOption | drawtext_options [] | 
| static const struct ft_error | ft_errors [] | 
| static const struct  drawtext_function  | functions [] | 
| static const AVFilterPad | avfilter_vf_drawtext_inputs [] | 
| static const AVFilterPad | avfilter_vf_drawtext_outputs [] | 
| AVFilter | ff_vf_drawtext | 
drawtext filter, based on the original vhook/drawtext.c filter by Gustavo Sverzut Barbieri
Definition in file vf_drawtext.c.
| #define OFFSET | ( | x | ) | offsetof(DrawTextContext, x) | 
Definition at line 202 of file vf_drawtext.c.
| #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM | 
Definition at line 203 of file vf_drawtext.c.
| #define FT_ERROR_START_LIST { | 
Definition at line 271 of file vf_drawtext.c.
Definition at line 272 of file vf_drawtext.c.
| #define FT_ERROR_END_LIST { 0, NULL } }; | 
Definition at line 273 of file vf_drawtext.c.
| #define FT_ERRMSG | ( | e | ) | ft_errors[e].err_msg | 
Referenced by init(), load_font_file(), and set_fontsize().
Definition at line 103 of file vf_drawtext.c.
| enum var_name | 
Definition at line 110 of file vf_drawtext.c.
| enum expansion_mode | 
| Enumerator | |
|---|---|
| EXP_NONE | |
| EXP_NORMAL | |
| EXP_STRFTIME | |
Definition at line 131 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 98 of file vf_drawtext.c.
| AVFILTER_DEFINE_CLASS | ( | drawtext | ) | 
Definition at line 296 of file vf_drawtext.c.
Referenced by draw_glyphs(), draw_text(), and load_glyph().
      
  | 
  static | 
Load glyphs corresponding to the UTF-32 codepoint code.
Definition at line 310 of file vf_drawtext.c.
Referenced by draw_text(), and init().
      
  | 
  static | 
Definition at line 378 of file vf_drawtext.c.
Referenced by update_fontsize().
      
  | 
  static | 
Definition at line 394 of file vf_drawtext.c.
Referenced by update_fontsize().
      
  | 
  static | 
Definition at line 412 of file vf_drawtext.c.
Referenced by draw_text(), and init().
      
  | 
  static | 
Definition at line 448 of file vf_drawtext.c.
Referenced by load_font().
      
  | 
  static | 
Definition at line 548 of file vf_drawtext.c.
Referenced by init().
      
  | 
  static | 
Definition at line 565 of file vf_drawtext.c.
Referenced by filter_frame(), and init().
      
  | 
  inlinestatic | 
Definition at line 592 of file vf_drawtext.c.
Referenced by draw_text().
      
  | 
  static | 
Definition at line 685 of file vf_drawtext.c.
Referenced by command().
      
  | 
  static | 
Definition at line 781 of file vf_drawtext.c.
Definition at line 786 of file vf_drawtext.c.
Referenced by uninit().
      
  | 
  static | 
Definition at line 796 of file vf_drawtext.c.
Referenced by command().
      
  | 
  static | 
Definition at line 822 of file vf_drawtext.c.
Referenced by command().
      
  | 
  static | 
Definition at line 863 of file vf_drawtext.c.
Referenced by cdg_decode_frame(), check_keyboard_interaction(), decode_subframe_lpc(), ftp_abort(), ftp_current_dir(), ftp_delete(), ftp_file_size(), ftp_list_mlsd(), ftp_list_nlst(), ftp_move(), ftp_passive_mode(), ftp_passive_mode_epsv(), ftp_restart(), ftp_retrieve(), ftp_set_dir(), ftp_store(), ftp_type(), idcin_read_packet(), read_connect(), and send_invoke_response().
      
  | 
  static | 
Definition at line 881 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 890 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 950 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 959 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 972 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 988 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 1008 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 1087 of file vf_drawtext.c.
Referenced by expand_function().
      
  | 
  static | 
Definition at line 1114 of file vf_drawtext.c.
Referenced by expand_text().
      
  | 
  static | 
Definition at line 1154 of file vf_drawtext.c.
Referenced by draw_text().
      
  | 
  static | 
Definition at line 1177 of file vf_drawtext.c.
Referenced by draw_text().
      
  | 
  static | 
Definition at line 1222 of file vf_drawtext.c.
Referenced by draw_text().
      
  | 
  static | 
Definition at line 1229 of file vf_drawtext.c.
Referenced by draw_text().
      
  | 
  static | 
Definition at line 1244 of file vf_drawtext.c.
Referenced by filter_frame().
      
  | 
  static | 
Definition at line 1464 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 73 of file vf_drawtext.c.
Referenced by config_input(), func_eval_expr(), func_eval_expr_int_format(), and parse_fontsize().
      
  | 
  static | 
Definition at line 94 of file vf_drawtext.c.
Referenced by config_input(), func_eval_expr(), func_eval_expr_int_format(), and parse_fontsize().
      
  | 
  static | 
Definition at line 105 of file vf_drawtext.c.
Referenced by config_input(), func_eval_expr(), func_eval_expr_int_format(), and parse_fontsize().
      
  | 
  static | 
Definition at line 205 of file vf_drawtext.c.
      
  | 
  static | 
      
  | 
  static | 
Referenced by eval_function().
      
  | 
  static | 
Definition at line 1502 of file vf_drawtext.c.
      
  | 
  static | 
Definition at line 1513 of file vf_drawtext.c.
| AVFilter ff_vf_drawtext | 
Definition at line 1521 of file vf_drawtext.c.
 1.8.6