Go to the documentation of this file.
21 #ifndef FFTOOLS_TEXTFORMAT_AVTEXTFORMAT_H
22 #define FFTOOLS_TEXTFORMAT_AVTEXTFORMAT_H
32 #define SECTION_MAX_NB_CHILDREN 11
45 #define AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER 1
46 #define AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY 2
47 #define AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS 4
49 #define AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE 8
50 #define AV_TEXTFORMAT_SECTION_FLAG_NUMBERING_BY_TYPE 16
51 #define AV_TEXTFORMAT_SECTION_FLAG_IS_SHAPE 32
52 #define AV_TEXTFORMAT_SECTION_FLAG_HAS_LINKS 64
53 #define AV_TEXTFORMAT_SECTION_PRINT_TAGS 128
54 #define AV_TEXTFORMAT_SECTION_FLAG_IS_SUBGRAPH 256
61 const char *(*get_type)(
const void *
data);
71 #define AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS 1
72 #define AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT 2
73 #define AV_TEXTFORMAT_FLAG_IS_DIAGRAM_FORMATTER 4
109 #define SECTION_MAX_NB_LEVELS 12
110 #define SECTION_MAX_NB_SECTIONS 100
155 #define AV_TEXTFORMAT_PRINT_STRING_OPTIONAL 1
156 #define AV_TEXTFORMAT_PRINT_STRING_VALIDATE 2
185 const char *
format,
int columns,
int bytes,
int offset_add);
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
AVDictionary * entries_to_show
@ AV_TEXTFORMAT_LINKTYPE_SRCDEST
@ AV_TEXTFORMAT_LINKTYPE_DESTSRC
unsigned int nb_item_type[SECTION_MAX_NB_LEVELS][SECTION_MAX_NB_SECTIONS]
const char * src_id_key
name of the key to be used as the source id for diagram connections
const char * context_type
const AVTextFormatter avtextformatter_compact
@ AV_TEXTFORMAT_STRING_VALIDATION_NB
char * name
name of this formatter instance
@ AV_TEXTFORMAT_LINKTYPE_ONETOMANY
void avtext_print_section_footer(AVTextFormatContext *tctx)
int id
unique id identifying a section
const AVTextFormatter avtextformatter_mermaid
@ AV_TEXTFORMAT_LINKTYPE_BIDIR
int level
current level, starting from 0
void avtext_print_integers(AVTextFormatContext *tctx, const char *key, uint8_t *data, int size, const char *format, int columns, int bytes, int offset_add)
@ AV_TEXTFORMAT_LINKTYPE_MANYTOONE
static double val(void *priv, double ch)
const AVTextFormatter * avtext_get_formatter_by_name(const char *name)
AVTextWriterContext * writer
the AVTextWriterContext
int avtext_context_close(AVTextFormatContext **tctx)
#define SECTION_MAX_NB_CHILDREN
const char * element_name
name of the contained element, if provided
const AVTextFormatter avtextformatter_default
void(* print_string)(AVTextFormatContext *tctx, const char *, const char *)
#define SECTION_MAX_NB_SECTIONS
const AVTextFormatter avtextformatter_ini
void * priv
private data for use by the filter
void avtext_print_section_header(AVTextFormatContext *tctx, const void *data, int section_id)
void avtext_print_time(AVTextFormatContext *tctx, const char *key, int64_t ts, const AVRational *time_base, int is_duration)
int priv_size
private size for the formatter context
int use_byte_value_binary_prefix
void avtext_print_rational(AVTextFormatContext *tctx, const char *key, AVRational q, char sep)
const char * unique_name
unique section name, in case the name is ambiguous
Describe the class of an AVClass context structure.
const AVTextFormatSection * section[SECTION_MAX_NB_LEVELS]
section per each level
New swscale design to change SwsGraph is what coordinates multiple passes These can include cascaded scaling error diffusion and so on Or we could have separate passes for the vertical and horizontal scaling In between each SwsPass lies a fully allocated image buffer Graph passes may have different levels of e g we can have a single threaded error diffusion pass following a multi threaded scaling pass SwsGraph is internally recreated whenever the image format
Rational number (pair of numerator and denominator).
@ AV_TEXTFORMAT_LINKTYPE_MANYTOMANY
void(* print_section_header)(AVTextFormatContext *tctx, const void *data)
@ AV_TEXTFORMAT_STRING_VALIDATION_IGNORE
const AVTextFormatter * formatter
the AVTextFormatter of which this is an instance
void avtext_print_integer(AVTextFormatContext *tctx, const char *key, int64_t val, int flags)
#define SECTION_MAX_NB_LEVELS
void avtext_print_data(AVTextFormatContext *tctx, const char *key, const uint8_t *data, int size)
void avtext_print_unit_int(AVTextFormatContext *tctx, const char *key, int value, const char *unit)
const AVTextFormatter avtextformatter_flat
@ AV_TEXTFORMAT_STRING_VALIDATION_FAIL
int use_value_sexagesimal_format
AVBPrint section_pbuf[SECTION_MAX_NB_LEVELS]
generic print buffer dedicated to each section, used by various formatters
int avtext_context_open(AVTextFormatContext **ptctx, const AVTextFormatter *formatter, AVTextWriterContext *writer_context, const char *args, const AVTextFormatSection *sections, int nb_sections, AVTextFormatOptions options, char *show_data_hash)
void avtext_print_ts(AVTextFormatContext *tctx, const char *key, int64_t ts, int is_duration)
int flags
a combination or AV_TEXTFORMAT__FLAG_*
const char * linktype_key
name of the key to be used as the link type for diagram connections (AVTextFormatLinkType)
const AVTextFormatSection * sections
array containing all sections
int avtext_print_string(AVTextFormatContext *tctx, const char *key, const char *val, int flags)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
const AVTextFormatter avtextformatter_xml
int(* uninit)(AVTextFormatContext *tctx)
unsigned int string_validation_utf8_flags
@ AV_TEXTFORMAT_LINKTYPE_ONETOONE
const AVTextFormatter avtextformatter_json
void(* print_section_footer)(AVTextFormatContext *tctx)
int use_value_sexagesimal_format
static struct AVTextFormatSection sections[]
void avtext_print_data_hash(AVTextFormatContext *tctx, const char *key, const uint8_t *data, int size)
const char * dest_id_key
name of the key to be used as the target id for diagram connections
const AVClass * priv_class
private class of the formatter, if any
void(* print_integer)(AVTextFormatContext *tctx, const char *, int64_t)
const int children_ids[SECTION_MAX_NB_CHILDREN+1]
list of children section IDS, terminated by -1
@ AV_TEXTFORMAT_LINKTYPE_HIDDEN
int(* init)(AVTextFormatContext *tctx)
const AVTextFormatter avtextformatter_csv
const char * id_key
name of the key to be used as the id
unsigned int nb_item[SECTION_MAX_NB_LEVELS]
number of the item printed in the given section, starting from 0
@ AV_TEXTFORMAT_STRING_VALIDATION_REPLACE
@ AV_TEXTFORMAT_LINKTYPE_NONDIR
static char * show_data_hash
const AVTextFormatter avtextformatter_mermaidhtml
int use_byte_value_binary_prefix
int nb_sections
number of sections
struct AVHashContext * hash
char * string_validation_replacement