[FFmpeg-devel] [PATCH] In graph2dot, print more specific audio information for audio links.

Michael Niedermayer michaelni
Tue Feb 15 13:59:58 CET 2011


On Tue, Feb 15, 2011 at 10:26:10AM +0100, Stefano Sabatini wrote:
> On date Monday 2011-02-14 11:08:20 +0100, Stefano Sabatini encoded:
> > On date Sunday 2011-02-13 17:23:25 -0500, Justin Ruggles encoded:
> > > On 02/13/2011 05:02 PM, Stefano Sabatini wrote:
> > > 
> > > > ---
> > > >  tools/graph2dot.c |   16 ++++++++++++----
> > > >  1 files changed, 12 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/tools/graph2dot.c b/tools/graph2dot.c
> > > > index 5e0da9a..850d481 100644
> > > > --- a/tools/graph2dot.c
> > > > +++ b/tools/graph2dot.c
> > > > @@ -22,6 +22,7 @@
> > > >  
> > > >  #undef HAVE_AV_CONFIG_H
> > > >  #include "libavutil/pixdesc.h"
> > > > +#include "libavcore/audioconvert.h"
> > > >  #include "libavfilter/avfiltergraph.h"
> > > >  
> > > >  static void usage(void)
> > > > @@ -67,10 +68,17 @@ static void print_digraph(FILE *outfile, AVFilterGraph *graph)
> > > >                           dst_filter_ctx->filter->name);
> > > >  
> > > >                  fprintf(outfile, "\"%s\" -> \"%s\"", filter_ctx_label, dst_filter_ctx_label);
> > > > -                fprintf(outfile, " [ label= \"fmt:%s w:%d h:%d tb:%d/%d\" ];\n",
> > > > -                        link->type == AVMEDIA_TYPE_VIDEO ? av_pix_fmt_descriptors[link->format].name :
> > > > -                        link->type == AVMEDIA_TYPE_AUDIO ? av_get_sample_fmt_name(link->format) : "unknown",
> > > > -                        link->w, link->h, link->time_base.num, link->time_base.den);
> > > > +                if (link->type == AVMEDIA_TYPE_VIDEO) {
> > > > +                    fprintf(outfile, " [ label= \"fmt:%s w:%d h:%d tb:%d/%d\" ];\n",
> > > > +                            av_pix_fmt_descriptors[link->format].name,
> > > > +                            link->w, link->h, link->time_base.num, link->time_base.den);
> > > > +                } else if (link->type == AVMEDIA_TYPE_AUDIO) {
> > > > +                    char buf[255];
> > > > +                    av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
> > > > +                    fprintf(outfile, " [ label= \"fmt:%s ar:%"PRId64" cl:%s\" ];\n",
> > > 
> > > 
> > > I prefer sr instead of ar to abbreviate sample rate.
> > 
> > Updated.
> 
> Ping.

you are author & maintainer of graph2dot.c, the final word what goes in is
yours, so you dont need to wait for a review or even send a patch unless you
want.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110215/a2354e66/attachment.pgp>



More information about the ffmpeg-devel mailing list