summaryrefslogtreecommitdiff
path: root/tools/graph2dot.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-06-05 18:39:09 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-06-06 23:19:56 +0200
commit20689670c8af3862a4e13ba4192f3197fa42363b (patch)
treeba718b38a3ef16f7360093efa245c5e2c4a2ee45 /tools/graph2dot.c
parenteeba7c874b2c6895ea5a74a45e1fa6a987d8613b (diff)
tools/graph2dot: show input and output pad names in the link label
Diffstat (limited to 'tools/graph2dot.c')
-rw-r--r--tools/graph2dot.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/graph2dot.c b/tools/graph2dot.c
index c000c4ca3a..0b8dd03b83 100644
--- a/tools/graph2dot.c
+++ b/tools/graph2dot.c
@@ -71,19 +71,23 @@ static void print_digraph(FILE *outfile, AVFilterGraph *graph)
filter_ctx_label, dst_filter_ctx_label);
if (link->type == AVMEDIA_TYPE_VIDEO) {
fprintf(outfile,
- " [ label= \"fmt:%s w:%d h:%d tb:%d/%d\" ]",
+ " [ label= \"inpad:%s fmt:%s w:%d h:%d tb:%d/%d outpad:%s\" ]",
+ link->srcpad->name,
av_pix_fmt_descriptors[link->format].name,
link->w, link->h, link->time_base.num,
- link->time_base.den);
+ link->time_base.den,
+ link->dstpad->name);
} 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 sr:%"PRId64" cl:%s tb:%d/%d\" ]",
+ " [ label= \"inpad:%s fmt:%s sr:%"PRId64" cl:%s tb:%d/%d outpad:%s\" ]",
+ link->srcpad->name,
av_get_sample_fmt_name(link->format),
link->sample_rate, buf,
- link->time_base.num, link->time_base.den);
+ link->time_base.num, link->time_base.den,
+ link->dstpad->name);
}
fprintf(outfile, ";\n");
}