History

Replace dprintf with av_dlog

dprintf clashes with POSIX.1-2008

Luca Barbato committed 15 years ago

Commit dfd2a001 parent 243f82447 files · +312 −308Browse files

Showing the changes to libavfilter/avfilter.c (1 of 47 files). Show all

Unified · Split

libavfilter/avfilter.c+15−15
@@ -217,24 +217,24 @@ static char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms) · 216 unmodified lines
217217 return buf;
218218 }
219219
220−static void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end)
220+static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end)
221221 {
222222 av_unused char buf[16];
223− dprintf(ctx,
223+ av_dlog(ctx,
224224 "ref[%p buf:%p refcount:%d perms:%s data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64,
225225 ref, ref->buf, ref->buf->refcount, ff_get_ref_perms_string(buf, sizeof(buf), ref->perms), ref->data[0],
226226 ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3],
227227 ref->pts, ref->pos);
228228
229229 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",
231231 ref->video->pixel_aspect.num, ref->video->pixel_aspect.den,
232232 ref->video->w, ref->video->h,
233233 !ref->video->interlaced ? 'P' : /* Progressive */
234234 ref->video->top_field_first ? 'T' : 'B'); /* Top / Bottom */
235235 }
236236 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",
238238 ref->audio->channel_layout,
239239 ref->audio->nb_samples,
240240 ref->audio->size,
@@ -242,13 +242,13 @@ static void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end) · 1 unmodified line
242242 ref->audio->planar);
243243 }
244244
245− dprintf(ctx, "]%s", end ? "\n" : "");
245+ av_dlog(ctx, "]%s", end ? "\n" : "");
246246 }
247247
248−static void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)
248+static void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
249249 {
250250 if (link->type == AVMEDIA_TYPE_VIDEO) {
251− dprintf(ctx,
251+ av_dlog(ctx,
252252 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",
253253 link, link->w, link->h,
254254 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
259259 char buf[128];
260260 av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
261261
262− dprintf(ctx,
262+ av_dlog(ctx,
263263 "link[%p r:%"PRId64" cl:%s fmt:%-16s %-16s->%-16s]%s",
264264 link, link->sample_rate, buf,
265265 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
269269 }
270270 }
271271
272−#define FF_DPRINTF_START(ctx, func) dprintf(NULL, "%-16s: ", #func)
272+#define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func)
273273
274274 AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
275275 {
276276 AVFilterBufferRef *ret = NULL;
277277
278278 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);
281281
282282 if (link->dstpad->get_video_buffer)
283283 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
288288 if (ret)
289289 ret->type = AVMEDIA_TYPE_VIDEO;
290290
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);
292292
293293 return ret;
294294 }
@@ -353,7 +353,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, · 58 unmodified lines
353353
354354 int avfilter_request_frame(AVFilterLink *link)
355355 {
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);
357357
358358 if (link->srcpad->request_frame)
359359 return link->srcpad->request_frame(link);
@@ -388,7 +388,7 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) · 28 unmodified lines
388388 AVFilterPad *dst = link->dstpad;
389389 int perms = picref->perms;
390390
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);
392392
393393 if (!(start_frame = dst->start_frame))
394394 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
435435 int i, j, vsub;
436436 void (*draw_slice)(AVFilterLink *, int, int, int);
437437
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);
439439
440440 /* copy the slice if needed for permission reasons */
441441 if (link->src_buf) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t