diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-06-24 22:53:53 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-06-26 11:34:38 +0200 |
commit | f054dbee6cc5195ba8f37823a494dab2d26e7cca (patch) | |
tree | 5262e89101e90d938d661a7c6fcb72f89b10d713 /tools | |
parent | 6eff2772843067b3dfb615b112744346d546ae40 (diff) | |
download | ffmpeg-streaming-f054dbee6cc5195ba8f37823a494dab2d26e7cca.zip ffmpeg-streaming-f054dbee6cc5195ba8f37823a494dab2d26e7cca.tar.gz |
tools/graph2dot: make dot graph representation a bit more compact
Diffstat (limited to 'tools')
-rw-r--r-- | tools/graph2dot.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/graph2dot.c b/tools/graph2dot.c index e3a12e2..9d42113 100644 --- a/tools/graph2dot.c +++ b/tools/graph2dot.c @@ -52,7 +52,7 @@ static void print_digraph(FILE *outfile, AVFilterGraph *graph) char filter_ctx_label[128]; const AVFilterContext *filter_ctx = graph->filters[i]; - snprintf(filter_ctx_label, sizeof(filter_ctx_label), "%s (%s)", + snprintf(filter_ctx_label, sizeof(filter_ctx_label), "%s\\n(%s)", filter_ctx->name, filter_ctx->filter->name); @@ -63,12 +63,13 @@ static void print_digraph(FILE *outfile, AVFilterGraph *graph) const AVFilterContext *dst_filter_ctx = link->dst; snprintf(dst_filter_ctx_label, sizeof(dst_filter_ctx_label), - "%s (%s)", + "%s\\n(%s)", dst_filter_ctx->name, dst_filter_ctx->filter->name); - fprintf(outfile, "\"%s\" -> \"%s\" [ label= \"inpad:%s ", - filter_ctx_label, dst_filter_ctx_label, link->srcpad->name); + fprintf(outfile, "\"%s\" -> \"%s\" [ label= \"inpad:%s -> outpad:%s\\n", + filter_ctx_label, dst_filter_ctx_label, + link->srcpad->name, link->dstpad->name); if (link->type == AVMEDIA_TYPE_VIDEO) { fprintf(outfile, @@ -86,8 +87,7 @@ static void print_digraph(FILE *outfile, AVFilterGraph *graph) link->sample_rate, buf, link->time_base.num, link->time_base.den); } - - fprintf(outfile, " outpad:%s\" ];\n", link->dstpad->name); + fprintf(outfile, "\n]"); } } } |