static int show_format(WriterContext *w, AVFormatContext *fmt_ctx)

{

    char val_str[128];

    int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1;

    int ret = 0;



    writer_print_section_header(w, SECTION_ID_FORMAT);

    print_str("filename",         fmt_ctx->filename);

    print_int("nb_streams",       fmt_ctx->nb_streams);

    print_int("nb_programs",      fmt_ctx->nb_programs);

    print_str("format_name",      fmt_ctx->iformat->name);

    if (!do_bitexact) {

        if (fmt_ctx->iformat->long_name) print_str    ("format_long_name", fmt_ctx->iformat->long_name);

        else                             print_str_opt("format_long_name", "unknown");

    }

    print_time("start_time",      fmt_ctx->start_time, &AV_TIME_BASE_Q);

    print_time("duration",        fmt_ctx->duration,   &AV_TIME_BASE_Q);

    if (size >= 0) print_val    ("size", size, unit_byte_str);

    else           print_str_opt("size", "N/A");

    if (fmt_ctx->bit_rate > 0) print_val    ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str);

    else                       print_str_opt("bit_rate", "N/A");

    print_int("probe_score", av_format_get_probe_score(fmt_ctx));

    ret = show_tags(w, fmt_ctx->metadata, SECTION_ID_FORMAT_TAGS);



    writer_print_section_footer(w);

    fflush(stdout);

    return ret;

}

static int show_format(WriterContext *w, AVFormatContext *fmt_ctx)

{

    char val_str[128];

    int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1;

    int ret = 0;



    writer_print_section_header(w, SECTION_ID_FORMAT);

    print_str("filename",         fmt_ctx->filename);

    print_int("nb_streams",       fmt_ctx->nb_streams);

    print_int("nb_programs",      fmt_ctx->nb_programs);

    print_str("format_name",      fmt_ctx->iformat->name);

    if (!do_bitexact) {

        if (fmt_ctx->iformat->long_name) print_str    ("format_long_name", fmt_ctx->iformat->long_name);

        else                             print_str_opt("format_long_name", "unknown");

    }

    print_time("start_time",      fmt_ctx->start_time, &AV_TIME_BASE_Q);

    print_time("duration",        fmt_ctx->duration,   &AV_TIME_BASE_Q);

    if (size >= 0) print_val    ("size", size, unit_byte_str);

    else           print_str_opt("size", "N/A");

    if (fmt_ctx->bit_rate > 0) print_val    ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str);

    else                       print_str_opt("bit_rate", "N/A");

    print_int("probe_score", av_format_get_probe_score(fmt_ctx));

    ret = show_tags(w, fmt_ctx->metadata, SECTION_ID_FORMAT_TAGS);



    writer_print_section_footer(w);

    fflush(stdout);

    return ret;

}

static int FUNC_0(WriterContext *VAR_0, AVFormatContext *VAR_1)

{

    char VAR_2[128];

    int64_t size = VAR_1->pb ? avio_size(VAR_1->pb) : -1;

    int VAR_3 = 0;



    writer_print_section_header(VAR_0, SECTION_ID_FORMAT);

    print_str("filename",         VAR_1->filename);

    print_int("nb_streams",       VAR_1->nb_streams);

    print_int("nb_programs",      VAR_1->nb_programs);

    print_str("format_name",      VAR_1->iformat->name);

    if (!do_bitexact) {

        if (VAR_1->iformat->long_name) print_str    ("format_long_name", VAR_1->iformat->long_name);

        else                             print_str_opt("format_long_name", "unknown");

    }

    print_time("start_time",      VAR_1->start_time, &AV_TIME_BASE_Q);

    print_time("duration",        VAR_1->duration,   &AV_TIME_BASE_Q);

    if (size >= 0) print_val    ("size", size, unit_byte_str);

    else           print_str_opt("size", "N/A");

    if (VAR_1->bit_rate > 0) print_val    ("bit_rate", VAR_1->bit_rate, unit_bit_per_second_str);

    else                       print_str_opt("bit_rate", "N/A");

    print_int("probe_score", av_format_get_probe_score(VAR_1));

    VAR_3 = show_tags(VAR_0, VAR_1->metadata, SECTION_ID_FORMAT_TAGS);



    writer_print_section_footer(VAR_0);

    fflush(stdout);

    return VAR_3;

}

static int FUNC_0(WriterContext *VAR_0, AVFormatContext *VAR_1)
{ char VAR_2[128]; int64_t size = VAR_1->pb ? avio_size(VAR_1->pb) : -1; int VAR_3 = 0; writer_print_section_header(VAR_0, SECTION_ID_FORMAT); print_str("filename",         VAR_1->filename); print_int("nb_streams",       VAR_1->nb_streams); print_int("nb_programs",      VAR_1->nb_programs); print_str("format_name",      VAR_1->iformat->name); if (!do_bitexact) { if (VAR_1->iformat->long_name) print_str    ("format_long_name", VAR_1->iformat->long_name); else                             print_str_opt("format_long_name", "unknown"); } print_time("start_time",      VAR_1->start_time, &AV_TIME_BASE_Q); print_time("duration",        VAR_1->duration,   &AV_TIME_BASE_Q); if (size >= 0) print_val    ("size", size, unit_byte_str); else           print_str_opt("size", "N/A"); if (VAR_1->bit_rate > 0) print_val    ("bit_rate", VAR_1->bit_rate, unit_bit_per_second_str); else                       print_str_opt("bit_rate", "N/A"); print_int("probe_score", av_format_get_probe_score(VAR_1)); VAR_3 = show_tags(VAR_0, VAR_1->metadata, SECTION_ID_FORMAT_TAGS); writer_print_section_footer(VAR_0); fflush(stdout); return VAR_3; }