Go to the documentation of this file.
33 #define writer_w8(wctx_, b_) (wctx_)->writer->writer->writer_w8((wctx_)->writer, b_)
34 #define writer_put_str(wctx_, str_) (wctx_)->writer->writer->writer_put_str((wctx_)->writer, str_)
35 #define writer_printf(wctx_, fmt_, ...) (wctx_)->writer->writer->writer_printf((wctx_)->writer, fmt_, __VA_ARGS__)
37 #define DEFINE_FORMATTER_CLASS(name) \
38 static const char *name##_get_name(void *ctx) \
42 static const AVClass name##_class = { \
43 .class_name = #name, \
44 .item_name = name##_get_name, \
45 .option = name##_options \
58 #define OFFSET(x) offsetof(DefaultContext, x)
61 {
"noprint_wrappers",
"do not print headers and footers",
OFFSET(noprint_wrappers),
AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
74 for (
i = 0;
src[
i] &&
i < dst_size-1;
i++)
144 .priv_class = &default_class,
const struct AVTextFormatSection * section[SECTION_MAX_NB_LEVELS]
section per each level
static void default_print_str(AVTextFormatContext *wctx, const char *key, const char *value)
int level
current level, starting from 0
static char * upcase_string(char *dst, size_t dst_size, const char *src)
const char * element_name
name of the contained element, if provided
void * priv
private data for use by the filter
Describe the class of an AVClass context structure.
#define SECTION_MAX_NB_LEVELS
static void default_print_section_footer(AVTextFormatContext *wctx)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
const AVTextFormatter avtextformatter_default
AVBPrint section_pbuf[SECTION_MAX_NB_LEVELS]
generic print buffer dedicated to each section, used by various formatters
int nested_section[SECTION_MAX_NB_LEVELS]
#define i(width, name, range_min, range_max)
static void default_print_int(AVTextFormatContext *wctx, const char *key, int64_t value)
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
static av_const int av_toupper(int c)
Locale-independent conversion of ASCII characters to uppercase.
static void default_print_section_header(AVTextFormatContext *wctx, const void *data)
#define AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER
the section only contains other sections, but has no data at its own level
void av_bprintf(AVBPrint *buf, const char *fmt,...)
void av_bprint_clear(AVBPrint *buf)
Reset the string to "" but keep internal allocated data.
#define DEFINE_FORMATTER_CLASS(name)
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
static const AVOption default_options[]
#define AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS
#define AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY
the section contains an array of elements of the same type
#define writer_printf(wctx_, fmt_,...)
static void * av_x_if_null(const void *p, const void *x)
Return x default pointer in case p is NULL.