dprintf clashes with POSIX.1-2008
Showing the changes to libavfilter (1 of 47 files). Show all
Unified · Split
| @@ -217,24 +217,24 @@ static char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms) · 216 unmodified lines | ||
| 217 | 217 | return buf; |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | −static void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end) | |
| 220 | +static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end) | |
| 221 | 221 | { |
| 222 | 222 | av_unused char buf[16]; |
| 223 | − dprintf(ctx, | |
| 223 | + av_dlog(ctx, | |
| 224 | 224 | "ref[%p buf:%p refcount:%d perms:%s data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64, |
| 225 | 225 | ref, ref->buf, ref->buf->refcount, ff_get_ref_perms_string(buf, sizeof(buf), ref->perms), ref->data[0], |
| 226 | 226 | ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3], |
| 227 | 227 | ref->pts, ref->pos); |
| 228 | 228 | |
| 229 | 229 | if (ref->video) { |
| 230 | − dprintf(ctx, " a:%d/%d s:%dx%d i:%c", | |
| 230 | + av_dlog(ctx, " a:%d/%d s:%dx%d i:%c", | |
| 231 | 231 | ref->video->pixel_aspect.num, ref->video->pixel_aspect.den, |
| 232 | 232 | ref->video->w, ref->video->h, |
| 233 | 233 | !ref->video->interlaced ? 'P' : /* Progressive */ |
| 234 | 234 | ref->video->top_field_first ? 'T' : 'B'); /* Top / Bottom */ |
| 235 | 235 | } |
| 236 | 236 | if (ref->audio) { |
| 237 | − dprintf(ctx, " cl:%"PRId64"d sn:%d s:%d sr:%d p:%d", | |
| 237 | + av_dlog(ctx, " cl:%"PRId64"d sn:%d s:%d sr:%d p:%d", | |
| 238 | 238 | ref->audio->channel_layout, |
| 239 | 239 | ref->audio->nb_samples, |
| 240 | 240 | ref->audio->size, |
| @@ -242,13 +242,13 @@ static void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end) · 1 unmodified line | ||
| 242 | 242 | ref->audio->planar); |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | − dprintf(ctx, "]%s", end ? "\n" : ""); | |
| 245 | + av_dlog(ctx, "]%s", end ? "\n" : ""); | |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | −static void ff_dprintf_link(void *ctx, AVFilterLink *link, int end) | |
| 248 | +static void ff_dlog_link(void *ctx, AVFilterLink *link, int end) | |
| 249 | 249 | { |
| 250 | 250 | if (link->type == AVMEDIA_TYPE_VIDEO) { |
| 251 | − dprintf(ctx, | |
| 251 | + av_dlog(ctx, | |
| 252 | 252 | "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s", |
| 253 | 253 | link, link->w, link->h, |
| 254 | 254 | av_pix_fmt_descriptors[link->format].name, |
| @@ -259,7 +259,7 @@ static void ff_dprintf_link(void *ctx, AVFilterLink *link, int end) · 4 unmodified lines | ||
| 259 | 259 | char buf[128]; |
| 260 | 260 | av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout); |
| 261 | 261 | |
| 262 | − dprintf(ctx, | |
| 262 | + av_dlog(ctx, | |
| 263 | 263 | "link[%p r:%"PRId64" cl:%s fmt:%-16s %-16s->%-16s]%s", |
| 264 | 264 | link, link->sample_rate, buf, |
| 265 | 265 | av_get_sample_fmt_name(link->format), |
| @@ -269,15 +269,15 @@ static void ff_dprintf_link(void *ctx, AVFilterLink *link, int end) · 3 unmodified lines | ||
| 269 | 269 | } |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | −#define FF_DPRINTF_START(ctx, func) dprintf(NULL, "%-16s: ", #func) | |
| 272 | +#define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func) | |
| 273 | 273 | |
| 274 | 274 | AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h) |
| 275 | 275 | { |
| 276 | 276 | AVFilterBufferRef *ret = NULL; |
| 277 | 277 | |
| 278 | 278 | av_unused char buf[16]; |
| 279 | − FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); | |
| 280 | − dprintf(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h); | |
| 279 | + FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); | |
| 280 | + av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h); | |
| 281 | 281 | |
| 282 | 282 | if (link->dstpad->get_video_buffer) |
| 283 | 283 | ret = link->dstpad->get_video_buffer(link, perms, w, h); |
| @@ -288,7 +288,7 @@ AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int · 4 unmodified lines | ||
| 288 | 288 | if (ret) |
| 289 | 289 | ret->type = AVMEDIA_TYPE_VIDEO; |
| 290 | 290 | |
| 291 | − FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); ff_dprintf_ref(NULL, ret, 1); | |
| 291 | + FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1); | |
| 292 | 292 | |
| 293 | 293 | return ret; |
| 294 | 294 | } |
| @@ -353,7 +353,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, · 58 unmodified lines | ||
| 353 | 353 | |
| 354 | 354 | int avfilter_request_frame(AVFilterLink *link) |
| 355 | 355 | { |
| 356 | − FF_DPRINTF_START(NULL, request_frame); ff_dprintf_link(NULL, link, 1); | |
| 356 | + FF_DPRINTF_START(NULL, request_frame); ff_dlog_link(NULL, link, 1); | |
| 357 | 357 | |
| 358 | 358 | if (link->srcpad->request_frame) |
| 359 | 359 | return link->srcpad->request_frame(link); |
| @@ -388,7 +388,7 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) · 28 unmodified lines | ||
| 388 | 388 | AVFilterPad *dst = link->dstpad; |
| 389 | 389 | int perms = picref->perms; |
| 390 | 390 | |
| 391 | − FF_DPRINTF_START(NULL, start_frame); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " "); ff_dprintf_ref(NULL, picref, 1); | |
| 391 | + FF_DPRINTF_START(NULL, start_frame); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " "); ff_dlog_ref(NULL, picref, 1); | |
| 392 | 392 | |
| 393 | 393 | if (!(start_frame = dst->start_frame)) |
| 394 | 394 | start_frame = avfilter_default_start_frame; |
| @@ -435,7 +435,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 40 unmodified lines | ||
| 435 | 435 | int i, j, vsub; |
| 436 | 436 | void (*draw_slice)(AVFilterLink *, int, int, int); |
| 437 | 437 | |
| 438 | − FF_DPRINTF_START(NULL, draw_slice); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " y:%d h:%d dir:%d\n", y, h, slice_dir); | |
| 438 | + FF_DPRINTF_START(NULL, draw_slice); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " y:%d h:%d dir:%d\n", y, h, slice_dir); | |
| 439 | 439 | |
| 440 | 440 | /* copy the slice if needed for permission reasons */ |
| 441 | 441 | if (link->src_buf) { |