MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / default_print_section_header

Function default_print_section_header

fftools/textformat/tf_default.c:65–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static void default_print_section_header(AVTextFormatContext *wctx, const void *data)
66{
67 DefaultContext *def = wctx->priv;
68 char buf[32];
69 const AVTextFormatSection *section = tf_get_section(wctx, wctx->level);
70 const AVTextFormatSection *parent_section = tf_get_parent_section(wctx, wctx->level);
71
72 if (!section)
73 return;
74
75 av_bprint_clear(&wctx->section_pbuf[wctx->level]);
76 if (parent_section &&
77 !(parent_section->flags & (AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER | AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY))) {
78 def->nested_section[wctx->level] = 1;
79 av_bprintf(&wctx->section_pbuf[wctx->level], "%s%s:",
80 wctx->section_pbuf[wctx->level - 1].str,
81 upcase_string(buf, sizeof(buf),
82 av_x_if_null(section->element_name, section->name)));
83 }
84
85 if (def->noprint_wrappers || def->nested_section[wctx->level])
86 return;
87
88 if (!(section->flags & (AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER | AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY)))
89 writer_printf(wctx, "[%s]\n", upcase_string(buf, sizeof(buf), section->name));
90}
91
92static void default_print_section_footer(AVTextFormatContext *wctx)
93{

Callers

nothing calls this directly

Calls 7

tf_get_sectionFunction · 0.85
tf_get_parent_sectionFunction · 0.85
av_bprint_clearFunction · 0.85
av_bprintfFunction · 0.85
av_x_if_nullFunction · 0.85
writer_printfFunction · 0.85
upcase_stringFunction · 0.70

Tested by

no test coverage detected