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

Function show_format

fftools/ffprobe.c:2327–2356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2325}
2326
2327static int show_format(AVTextFormatContext *tfc, InputFile *ifile)
2328{
2329 AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2330 int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1;
2331 int ret = 0;
2332
2333 avtext_print_section_header(tfc, NULL, SECTION_ID_FORMAT);
2334 print_str_validate("filename", fmt_ctx->url);
2335 print_int("nb_streams", fmt_ctx->nb_streams);
2336 print_int("nb_programs", fmt_ctx->nb_programs);
2337 print_int("nb_stream_groups", fmt_ctx->nb_stream_groups);
2338 print_str("format_name", fmt_ctx->iformat->name);
2339 if (!do_bitexact) {
2340 if (fmt_ctx->iformat->long_name) print_str ("format_long_name", fmt_ctx->iformat->long_name);
2341 else print_str_opt("format_long_name", "unknown");
2342 }
2343 print_time("start_time", fmt_ctx->start_time, &AV_TIME_BASE_Q);
2344 print_time("duration", fmt_ctx->duration, &AV_TIME_BASE_Q);
2345 if (size >= 0) print_val ("size", size, unit_byte_str);
2346 else print_str_opt("size", "N/A");
2347 if (fmt_ctx->bit_rate > 0) print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str);
2348 else print_str_opt("bit_rate", "N/A");
2349 print_int("probe_score", fmt_ctx->probe_score);
2350 if (do_show_format_tags)
2351 ret = show_tags(tfc, fmt_ctx->metadata, SECTION_ID_FORMAT_TAGS);
2352
2353 avtext_print_section_footer(tfc);
2354 fflush(stdout);
2355 return ret;
2356}
2357
2358static void show_error(AVTextFormatContext *tfc, int err)
2359{

Callers 1

probe_fileFunction · 0.85

Calls 4

avio_sizeFunction · 0.85
show_tagsFunction · 0.85

Tested by

no test coverage detected