Go to the documentation of this file.
35 #define writer_w8(wctx_, b_) (wctx_)->writer->writer->writer_w8((wctx_)->writer, b_)
36 #define writer_put_str(wctx_, str_) (wctx_)->writer->writer->writer_put_str((wctx_)->writer, str_)
37 #define writer_printf(wctx_, fmt_, ...) (wctx_)->writer->writer->writer_printf((wctx_)->writer, fmt_, __VA_ARGS__)
39 #define DEFINE_FORMATTER_CLASS(name) \
40 static const char *name##_get_name(void *ctx) \
44 static const AVClass name##_class = { \
45 .class_name = #name, \
46 .item_name = name##_get_name, \
47 .option = name##_options \
61 #define OFFSET(x) offsetof(FlatContext, x)
66 {
"hierarchical",
"specify if the section specification should be hierarchical",
OFFSET(hierarchical),
AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
67 {
"h",
"specify if the section specification should be hierarchical",
OFFSET(hierarchical),
AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
77 if (strlen(
flat->sep_str) != 1) {
78 av_log(wctx,
AV_LOG_ERROR,
"Item separator '%s' specified, but must contain a single character\n",
91 for (p =
src; *p; p++) {
92 if (!((*p >=
'0' && *p <=
'9') ||
93 (*p >=
'a' && *p <=
'z') ||
94 (*p >=
'A' && *p <=
'Z')))
106 for (p =
src; *p; p++) {
134 if (
flat->hierarchical ||
173 .priv_class = &flat_class,
#define AV_BPRINT_SIZE_UNLIMITED
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 they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
const struct AVTextFormatSection * section[SECTION_MAX_NB_LEVELS]
section per each level
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
unsigned int nb_item_type[SECTION_MAX_NB_LEVELS][SECTION_MAX_NB_SECTIONS]
static void flat_print_str(AVTextFormatContext *wctx, const char *key, const char *value)
static const char * flat_escape_value_str(AVBPrint *dst, const char *src)
static void flat_print_int(AVTextFormatContext *wctx, const char *key, int64_t value)
int id
unique id identifying a section
int level
current level, starting from 0
#define AV_TEXTFORMAT_SECTION_FLAG_NUMBERING_BY_TYPE
the items in this array section should be numbered individually by type
#define writer_printf(wctx_, fmt_,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define writer_put_str(wctx_, str_)
void * priv
private data for use by the filter
static av_cold int flat_init(AVTextFormatContext *wctx)
Describe the class of an AVClass context structure.
int(* init)(AVBSFContext *ctx)
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
AVBPrint section_pbuf[SECTION_MAX_NB_LEVELS]
generic print buffer dedicated to each section, used by various formatters
static void flat_print_section_header(AVTextFormatContext *wctx, const void *data)
#define DEFINE_FORMATTER_CLASS(name)
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
#define AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT
static const char * flat_escape_key_str(AVBPrint *dst, const char *src, const char sep)
#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.
const AVTextFormatter avtextformatter_flat
unsigned int nb_item[SECTION_MAX_NB_LEVELS]
number of the item printed in the given section, starting from 0
static const AVOption flat_options[]
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
#define AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
#define AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY
the section contains an array of elements of the same type