[FFmpeg-devel] [PATCH 1/2] Add programs to ffprobe

Stefano Sabatini stefasab at gmail.com
Tue Jul 23 00:18:43 CEST 2013


On date Monday 2013-07-22 14:15:57 +0200, Florent Tribouilloy encoded:
> Option -show_programs for ffprobe will sort the output
> 
> Signed-off-by: Florent Tribouilloy <florent.tribouilloy at smartjog.com>
> ---
>  doc/ffprobe.texi               |   14 +++++++--
>  doc/ffprobe.xsd                |   26 +++++++++++++++
>  ffprobe.c                      |   68 +++++++++++++++++++++++++++++++++++-----
>  tests/ref/fate/ffprobe_compact |    2 +-
>  tests/ref/fate/ffprobe_csv     |    2 +-
>  tests/ref/fate/ffprobe_default |    1 +
>  tests/ref/fate/ffprobe_flat    |    1 +
>  tests/ref/fate/ffprobe_ini     |    1 +
>  tests/ref/fate/ffprobe_json    |    1 +
>  tests/ref/fate/ffprobe_xml     |    2 +-
>  10 files changed, 104 insertions(+), 14 deletions(-)
[...]
> +static void show_program(WriterContext *w, AVFormatContext *fmt_ctx, AVProgram *program)
> +{
> +    int i;
> +
> +    writer_print_section_header(w, SECTION_ID_PROGRAM);
> +    print_int("program_id", program->id);
> +    print_int("program_num", program->program_num);
> +    print_int("nb_streams", program->nb_stream_indexes);
> +    print_int("pmt_pid", program->pmt_pid);
> +    print_int("pcr_pid", program->pcr_pid);
> +    show_tags(w, program->metadata, SECTION_ID_PROGRAM_TAGS);
> +    for (i = 0; i < program->nb_stream_indexes; i++) {
> +        if (selected_streams[program->stream_index[i]])
> +            show_stream(w, fmt_ctx, program->stream_index[i], 1);
> +    }
> +    writer_print_section_footer(w);
> +}

Same note about start/end_time, should be good otherwise, thanks.
-- 
FFmpeg = Forgiving Free Mysterious Picky Ecumenical Goblin


More information about the ffmpeg-devel mailing list