49#define OFFSET(x) offsetof(INIContext, x)
52 {
"hierarchical",
"specify if the section specification should be hierarchical",
OFFSET(hierarchical),
AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1 },
53 {
"h",
"specify if the section specification should be hierarchical",
OFFSET(hierarchical),
AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1 },
64 while ((
c =
src[
i++])) {
78 if ((
unsigned char)
c < 32)
99 if (!parent_section) {
147 .priv_class = &ini_class,
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define SECTION_MAX_NB_LEVELS
const AVTextFormatter avtextformatter_ini
#define AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS
#define AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER
the section only contains other sections, but has no data at its own level
#define AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY
the section contains an array of elements of the same type
#define AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT
#define AV_TEXTFORMAT_SECTION_FLAG_NUMBERING_BY_TYPE
the items in this array section should be numbered individually by type
void av_bprintf(AVBPrint *buf, const char *fmt,...)
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define AV_BPRINT_SIZE_UNLIMITED
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
void av_bprint_clear(AVBPrint *buf)
Reset the string to "" but keep internal allocated data.
Macro definitions for various function/variable attributes.
Describe the class of an AVClass context structure.
unsigned int nb_item_type[SECTION_MAX_NB_LEVELS][SECTION_MAX_NB_SECTIONS]
void * priv
private data for use by the filter
const AVTextFormatSection * section[SECTION_MAX_NB_LEVELS]
section per each level
int level
current level, starting from 0
unsigned int nb_item[SECTION_MAX_NB_LEVELS]
number of the item printed in the given section, starting from 0
AVBPrint section_pbuf[SECTION_MAX_NB_LEVELS]
generic print buffer dedicated to each section, used by various formatters
int id
unique id identifying a section
int nested_section[SECTION_MAX_NB_LEVELS]
static const AVOption ini_options[]
static char * ini_escape_str(AVBPrint *dst, const char *src)
static void ini_print_section_header(AVTextFormatContext *wctx, const void *data)
static void ini_print_str(AVTextFormatContext *wctx, const char *key, const char *value)
static void ini_print_int(AVTextFormatContext *wctx, const char *key, int64_t value)
Internal utilities for text formatters.
static const AVTextFormatSection * tf_get_section(AVTextFormatContext *tfc, int level)
Safely validate and access a section at a given level.
static const AVTextFormatSection * tf_get_parent_section(AVTextFormatContext *tfc, int level)
Safely access the parent section.
#define DEFINE_FORMATTER_CLASS(name)
static void writer_w8(AVTextFormatContext *wctx, int b)
static void writer_printf(AVTextFormatContext *wctx, const char *fmt,...)
static void writer_put_str(AVTextFormatContext *wctx, const char *str)