[FFmpeg-devel] [PATCH] ffprobe: add support to video frame information printing

Clément Bœsch ubitux at gmail.com
Sat Jan 7 23:17:17 CET 2012


On Sat, Jan 07, 2012 at 11:05:14PM +0100, Stefano Sabatini wrote:
> 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)

Are you trying to replace {a,}showinfo filter? :)

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120107/cccd3bed/attachment.asc>


More information about the ffmpeg-devel mailing list