Commit 7986e34d authored by Stefano Sabatini's avatar Stefano Sabatini

Make ff_dprintf_link() print meaningful information for audio links.

Originally committed as revision 26378 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent b9af1540
...@@ -246,6 +246,7 @@ void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end) ...@@ -246,6 +246,7 @@ void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end)
void ff_dprintf_link(void *ctx, AVFilterLink *link, int end) void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)
{ {
if (link->type == AVMEDIA_TYPE_VIDEO) {
dprintf(ctx, dprintf(ctx,
"link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s", "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",
link, link->w, link->h, link, link->w, link->h,
...@@ -253,6 +254,18 @@ void ff_dprintf_link(void *ctx, AVFilterLink *link, int end) ...@@ -253,6 +254,18 @@ void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)
link->src ? link->src->filter->name : "", link->src ? link->src->filter->name : "",
link->dst ? link->dst->filter->name : "", link->dst ? link->dst->filter->name : "",
end ? "\n" : ""); end ? "\n" : "");
} else {
char buf[128];
av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
dprintf(ctx,
"link[%p r:%"PRId64" cl:%s fmt:%-16s %-16s->%-16s]%s",
link, link->sample_rate, buf,
av_get_sample_fmt_name(link->format),
link->src ? link->src->filter->name : "",
link->dst ? link->dst->filter->name : "",
end ? "\n" : "");
}
} }
AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h) AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment