| 63 | } |
| 64 | |
| 65 | static 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 | |
| 92 | static void default_print_section_footer(AVTextFormatContext *wctx) |
| 93 | { |
nothing calls this directly
no test coverage detected