|
|
|
@ -26,46 +26,6 @@ |
|
|
|
|
#include "internal.h" |
|
|
|
|
#include "video.h" |
|
|
|
|
|
|
|
|
|
static char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms) |
|
|
|
|
{ |
|
|
|
|
snprintf(buf, buf_size, "%s%s%s%s%s%s", |
|
|
|
|
perms & AV_PERM_READ ? "r" : "", |
|
|
|
|
perms & AV_PERM_WRITE ? "w" : "", |
|
|
|
|
perms & AV_PERM_PRESERVE ? "p" : "", |
|
|
|
|
perms & AV_PERM_REUSE ? "u" : "", |
|
|
|
|
perms & AV_PERM_REUSE2 ? "U" : "", |
|
|
|
|
perms & AV_PERM_NEG_LINESIZES ? "n" : ""); |
|
|
|
|
return buf; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end) |
|
|
|
|
{ |
|
|
|
|
av_unused char buf[16]; |
|
|
|
|
av_dlog(ctx, |
|
|
|
|
"ref[%p buf:%p refcount:%d perms:%s data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64, |
|
|
|
|
ref, ref->buf, ref->buf->refcount, ff_get_ref_perms_string(buf, sizeof(buf), ref->perms), ref->data[0], |
|
|
|
|
ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3], |
|
|
|
|
ref->pts, ref->pos); |
|
|
|
|
|
|
|
|
|
if (ref->video) { |
|
|
|
|
av_dlog(ctx, " a:%d/%d s:%dx%d i:%c iskey:%d type:%c", |
|
|
|
|
ref->video->sample_aspect_ratio.num, ref->video->sample_aspect_ratio.den, |
|
|
|
|
ref->video->w, ref->video->h, |
|
|
|
|
!ref->video->interlaced ? 'P' : /* Progressive */ |
|
|
|
|
ref->video->top_field_first ? 'T' : 'B', /* Top / Bottom */ |
|
|
|
|
ref->video->key_frame, |
|
|
|
|
av_get_picture_type_char(ref->video->pict_type)); |
|
|
|
|
} |
|
|
|
|
if (ref->audio) { |
|
|
|
|
av_dlog(ctx, " cl:%"PRId64"d n:%d r:%d", |
|
|
|
|
ref->audio->channel_layout, |
|
|
|
|
ref->audio->nb_samples, |
|
|
|
|
ref->audio->sample_rate); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
av_dlog(ctx, "]%s", end ? "\n" : ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
AVFilterBufferRef *ff_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h) |
|
|
|
|
{ |
|
|
|
|
return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); |
|
|
|
|