Unified · Split
| @@ -22,6 +22,7 @@ · 21 unmodified lines | ||
| 22 | 22 | |
| 23 | 23 | #undef HAVE_AV_CONFIG_H |
| 24 | 24 | #include "libavutil/pixdesc.h" |
| 25 | +#include "libavutil/audioconvert.h" | |
| 25 | 26 | #include "libavfilter/avfiltergraph.h" |
| 26 | 27 | |
| 27 | 28 | static void usage(void) |
| @@ -67,10 +68,18 @@ static void print_digraph(FILE *outfile, AVFilterGraph *graph) · 39 unmodified lines | ||
| 67 | 68 | dst_filter_ctx->filter->name); |
| 68 | 69 | |
| 69 | 70 | fprintf(outfile, "\"%s\" -> \"%s\"", filter_ctx_label, dst_filter_ctx_label); |
| 70 | − fprintf(outfile, " [ label= \"fmt:%s w:%d h:%d tb:%d/%d\" ];\n", | |
| 71 | − link->type == AVMEDIA_TYPE_VIDEO ? av_pix_fmt_descriptors[link->format].name : | |
| 72 | − link->type == AVMEDIA_TYPE_AUDIO ? av_get_sample_fmt_name(link->format) : "unknown", | |
| 73 | − link->w, link->h, link->time_base.num, link->time_base.den); | |
| 71 | + if (link->type == AVMEDIA_TYPE_VIDEO) { | |
| 72 | + fprintf(outfile, " [ label= \"fmt:%s w:%d h:%d tb:%d/%d\" ]", | |
| 73 | + av_pix_fmt_descriptors[link->format].name, | |
| 74 | + link->w, link->h, link->time_base.num, link->time_base.den); | |
| 75 | + } else if (link->type == AVMEDIA_TYPE_AUDIO) { | |
| 76 | + char buf[255]; | |
| 77 | + av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout); | |
| 78 | + fprintf(outfile, " [ label= \"fmt:%s sr:%"PRId64" cl:%s\" ]", | |
| 79 | + av_get_sample_fmt_name(link->format), | |
| 80 | + link->sample_rate, buf); | |
| 81 | + } | |
| 82 | + fprintf(outfile, ";\n"); | |
| 74 | 83 | } |
| 75 | 84 | } |
| 76 | 85 | } |