| @@ -191,11 +191,23 @@ int avfilter_config_links(AVFilterContext *filter) · 190 unmodified lines |
| 191 | return 0; | 191 | return 0; |
| 192 | } | 192 | } |
| 193 | | 193 | |
| | 194 | char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms) |
| | 195 | { |
| | 196 | snprintf(buf, buf_size, "%s%s%s%s%s", |
| | 197 | perms & AV_PERM_READ ? "r" : "", |
| | 198 | perms & AV_PERM_WRITE ? "w" : "", |
| | 199 | perms & AV_PERM_PRESERVE ? "p" : "", |
| | 200 | perms & AV_PERM_REUSE ? "r" : "", |
| | 201 | perms & AV_PERM_REUSE2 ? "R" : ""); |
| | 202 | return buf; |
| | 203 | } |
| | 204 | |
| 194 | void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end) | 205 | void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end) |
| 195 | { | 206 | { |
| | 207 | av_unused char buf[16]; |
| 196 | dprintf(ctx, | 208 | dprintf(ctx, |
| 197 | "ref[%p buf:%p refcount:%d perms:0x%x data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64, | 209 | "ref[%p buf:%p refcount:%d perms:%s data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64, |
| 198 | ref, ref->buf, ref->buf->refcount, ref->perms, ref->data[0], | 210 | ref, ref->buf, ref->buf->refcount, ff_get_ref_perms_string(buf, sizeof(buf), ref->perms), ref->data[0], |
| 199 | ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3], | 211 | ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3], |
| 200 | ref->pts, ref->pos); | 212 | ref->pts, ref->pos); |
| 201 | | 213 | |
| @@ -233,7 +245,9 @@ AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int · 31 unmodified lines |
| 233 | { | 245 | { |
| 234 | AVFilterBufferRef *ret = NULL; | 246 | AVFilterBufferRef *ret = NULL; |
| 235 | | 247 | |
| 236 | 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); | 248 | av_unused char buf[16]; |
| | 249 | FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); |
| | 250 | dprintf(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h); |
| 237 | | 251 | |
| 238 | if (link_dpad(link).get_video_buffer) | 252 | if (link_dpad(link).get_video_buffer) |
| 239 | ret = link_dpad(link).get_video_buffer(link, perms, w, h); | 253 | ret = link_dpad(link).get_video_buffer(link, perms, w, h); |