Go to the documentation of this file.
21 #ifndef FFTOOLS_TEXTFORMAT_AVTEXTFORMAT_H
22 #define FFTOOLS_TEXTFORMAT_AVTEXTFORMAT_H
34 #define SECTION_MAX_NB_CHILDREN 11
41 #define AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER 1
42 #define AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY 2
43 #define AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS 4
45 #define AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE 8
46 #define AV_TEXTFORMAT_SECTION_FLAG_NUMBERING_BY_TYPE 16
53 const char *(* get_type)(
const void *
data);
59 #define AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS 1
60 #define AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT 2
85 #define SECTION_MAX_NB_LEVELS 12
86 #define SECTION_MAX_NB_SECTIONS 100
123 #define AV_TEXTFORMAT_PRINT_STRING_OPTIONAL 1
124 #define AV_TEXTFORMAT_PRINT_STRING_VALIDATE 2
159 const char *
format,
int columns,
int bytes,
int offset_add);
static int use_byte_value_binary_prefix
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
const struct AVTextFormatSection * section[SECTION_MAX_NB_LEVELS]
section per each level
unsigned int nb_item_type[SECTION_MAX_NB_LEVELS][SECTION_MAX_NB_SECTIONS]
const AVTextFormatter avtextformatter_compact
@ AV_TEXTFORMAT_STRING_VALIDATION_NB
char * name
name of this formatter instance
void avtext_print_section_footer(AVTextFormatContext *tctx)
int id
unique id identifying a section
int level
current level, starting from 0
static int show_optional_fields
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
const struct AVTextFormatSection * sections
array containing all sections
void(* print_string)(AVTextFormatContext *tctx, const char *, const char *)
#define SECTION_MAX_NB_SECTIONS
void avtext_print_data_hash(AVTextFormatContext *tctx, const char *name, const uint8_t *data, int size)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate. The lists are not just lists
void avtext_print_data(AVTextFormatContext *tctx, const char *name, const uint8_t *data, int size)
const AVTextFormatter avtextformatter_ini
void avtext_print_integers(AVTextFormatContext *tctx, const char *name, uint8_t *data, int size, const char *format, int columns, int bytes, int offset_add)
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.
Rational number (pair of numerator and denominator).
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
#define SECTION_MAX_NB_LEVELS
static int show_value_unit
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
static int use_value_prefix
void avtext_print_ts(AVTextFormatContext *tctx, const char *key, int64_t ts, int is_duration)
int flags
a combination or AV_TEXTFORMAT__FLAG_*
void(* print_rational)(AVTextFormatContext *tctx, AVRational *q, char *sep)
int avtext_print_string(AVTextFormatContext *tctx, const char *key, const char *val, int flags)
void avtext_print_integer(AVTextFormatContext *tctx, const char *key, int64_t val)
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
void(* uninit)(AVTextFormatContext *tctx)
unsigned int string_validation_utf8_flags
static int use_value_sexagesimal_format
const AVTextFormatter avtextformatter_json
void(* print_section_footer)(AVTextFormatContext *tctx)
static struct AVTextFormatSection sections[]
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
int(* init)(AVTextFormatContext *tctx)
const AVTextFormatter avtextformatter_csv
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
static char * show_data_hash
int nb_sections
number of sections
struct AVHashContext * hash
char * string_validation_replacement
int avtext_context_open(AVTextFormatContext **ptctx, const AVTextFormatter *formatter, AVTextWriterContext *writer_context, const char *args, const struct AVTextFormatSection *sections, int nb_sections, int show_value_unit, int use_value_prefix, int use_byte_value_binary_prefix, int use_value_sexagesimal_format, int show_optional_fields, char *show_data_hash)