[FFmpeg-devel] [PATCH] ffprobe: add support to video frame information printing
Stefano Sabatini
stefasab at gmail.com
Sat Jan 7 23:05:14 CET 2012
On date Saturday 2012-01-07 13:20:07 +0100, Clément Bœsch encoded:
> On Sat, Jan 07, 2012 at 11:26:39AM +0100, Stefano Sabatini wrote:
> [...]
> > static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx)
> > @@ -1400,13 +1491,28 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
> > static int probe_file(WriterContext *wctx, const char *filename)
> > {
> > AVFormatContext *fmt_ctx;
> > - int ret;
> > + int i, ret;
> >
> > ret = open_input_file(&fmt_ctx, filename);
> > if (ret >= 0) {
> > - PRINT_CHAPTER(packets);
> > + if (do_show_packets || do_show_frames) {
> > + const char *chapter;
> > + if (do_show_frames && do_show_packets &&
> > + wctx->writer->flags & WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER)
> > + chapter = "packets_and_frames";
> > + else if (do_show_packets && !do_show_frames)
> > + chapter = "packets";
> > + else // !do_show_packets && do_show_frames)
>
> You can remove the trailing ')' here.
>
> Otherwise patch LGTM, thanks.
Pushed.
Todo:
- support for frame metadata tags printing
- support for audio frames printing
- support for size information in video packets (that was a feature of
ffprobe/SF, useful for analyzing video compression)
--
FFmpeg = Freak Funny Mega Patchable Eager Ghost
More information about the ffmpeg-devel
mailing list