AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
{
    AVFilterBufferRef *ret = NULL;
    FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " perms:%d w:%d h:%d\n", perms, w, h);
    if (link_dpad(link).get_video_buffer)
        ret = link_dpad(link).get_video_buffer(link, perms, w, h);
    if (!ret)
        ret = avfilter_default_get_video_buffer(link, perms, w, h);
    if (ret)
        ret->type = AVMEDIA_TYPE_VIDEO;
    FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); ff_dprintf_ref(NULL, ret, 1);
    return ret;
}
['AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)\n{\n    AVFilterBufferRef *ret = NULL;\n    FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " perms:%d w:%d h:%d\\n", perms, w, h);\n    if (link_dpad(link).get_video_buffer)\n        ret = link_dpad(link).get_video_buffer(link, perms, w, h);\n    if (!ret)\n        ret = avfilter_default_get_video_buffer(link, perms, w, h);\n    if (ret)\n        ret->type = AVMEDIA_TYPE_VIDEO;\n    FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); ff_dprintf_ref(NULL, ret, 1);\n    return ret;\n}', 'void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)\n{\n    dprintf(ctx,\n            "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",\n            link, link->w, link->h,\n            av_pix_fmt_descriptors[link->format].name,\n            link->src ? link->src->filter->name : "",\n            link->dst ? link->dst->filter->name : "",\n            end ? "\\n" : "");\n}', 'void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end)\n{\n    dprintf(ctx,\n            "ref[%p buf:%p refcount:%d perms:0x%x data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64,\n            ref, ref->buf, ref->buf->refcount, ref->perms, ref->data[0],\n            ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3],\n            ref->pts, ref->pos);\n    if (ref->video) {\n        dprintf(ctx, " a:%d/%d s:%dx%d i:%c",\n                ref->video->pixel_aspect.num, ref->video->pixel_aspect.den,\n                ref->video->w, ref->video->h,\n                !ref->video->interlaced     ? \'P\' :\n                ref->video->top_field_first ? \'T\' : \'B\');\n    }\n    if (ref->audio) {\n        dprintf(ctx, " cl:%"PRId64"d sn:%d s:%d sr:%d p:%d",\n                ref->audio->channel_layout,\n                ref->audio->samples_nb,\n                ref->audio->size,\n                ref->audio->sample_rate,\n                ref->audio->planar);\n    }\n    dprintf(ctx, "]%s", end ? "\\n" : "");\n}']