| 2300 | } |
| 2301 | |
| 2302 | static int show_chapters(AVTextFormatContext *tfc, InputFile *ifile) |
| 2303 | { |
| 2304 | AVFormatContext *fmt_ctx = ifile->fmt_ctx; |
| 2305 | int i, ret = 0; |
| 2306 | |
| 2307 | avtext_print_section_header(tfc, NULL, SECTION_ID_CHAPTERS); |
| 2308 | for (i = 0; i < fmt_ctx->nb_chapters; i++) { |
| 2309 | AVChapter *chapter = fmt_ctx->chapters[i]; |
| 2310 | |
| 2311 | avtext_print_section_header(tfc, NULL, SECTION_ID_CHAPTER); |
| 2312 | print_int("id", chapter->id); |
| 2313 | print_q ("time_base", chapter->time_base, '/'); |
| 2314 | print_int("start", chapter->start); |
| 2315 | print_time("start_time", chapter->start, &chapter->time_base); |
| 2316 | print_int("end", chapter->end); |
| 2317 | print_time("end_time", chapter->end, &chapter->time_base); |
| 2318 | if (do_show_chapter_tags) |
| 2319 | ret = show_tags(tfc, chapter->metadata, SECTION_ID_CHAPTER_TAGS); |
| 2320 | avtext_print_section_footer(tfc); |
| 2321 | } |
| 2322 | avtext_print_section_footer(tfc); |
| 2323 | |
| 2324 | return ret; |
| 2325 | } |
| 2326 | |
| 2327 | static int show_format(AVTextFormatContext *tfc, InputFile *ifile) |
| 2328 | { |
no test coverage detected