[FFmpeg-devel] [PATCH] Replace all av_dlog() with av_log(AV_LOG_TRACE).

Ronald S. Bultje rsbultje at gmail.com
Mon Aug 17 18:00:21 CEST 2015


---
 ffmpeg.c                         | 15 ++++++++-------
 libavcodec/ccaption_dec.c        | 12 ++++++------
 libavcodec/libzvbi-teletextdec.c |  8 ++++----
 libavcodec/proresdec2.c          |  8 ++++----
 libavdevice/lavfi.c              |  6 +++---
 libavdevice/v4l.c                |  4 ++--
 libavfilter/src_movie.c          |  4 ++--
 libavfilter/vf_histeq.c          |  4 ++--
 libavfilter/vf_palettegen.c      | 10 ++++++----
 libavfilter/vf_paletteuse.c      |  4 ++--
 libavfilter/vsrc_cellauto.c      |  4 ++--
 libavfilter/vsrc_life.c          |  2 +-
 libavformat/avienc.c             |  4 ++--
 libavformat/ffmdec.c             | 10 +++++-----
 libavformat/ftp.c                | 18 +++++++++---------
 libavformat/mov.c                |  2 +-
 libavformat/mpegts.c             |  2 +-
 libavformat/segment.c            | 10 +++++-----
 libavformat/swfdec.c             |  4 ++--
 19 files changed, 67 insertions(+), 64 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 268ef57..f756b14 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1150,13 +1150,14 @@ static void do_video_out(AVFormatContext *s,
             ost->forced_keyframes_expr_const_values[FKF_T] = pts_time;
             res = av_expr_eval(ost->forced_keyframes_pexpr,
                                ost->forced_keyframes_expr_const_values, NULL);
-            av_dlog(NULL, "force_key_frame: n:%f n_forced:%f prev_forced_n:%f t:%f prev_forced_t:%f -> res:%f\n",
-                    ost->forced_keyframes_expr_const_values[FKF_N],
-                    ost->forced_keyframes_expr_const_values[FKF_N_FORCED],
-                    ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N],
-                    ost->forced_keyframes_expr_const_values[FKF_T],
-                    ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T],
-                    res);
+            av_log(NULL, AV_LOG_TRACE,
+                   "force_key_frame: n:%f n_forced:%f prev_forced_n:%f t:%f prev_forced_t:%f -> res:%f\n",
+                   ost->forced_keyframes_expr_const_values[FKF_N],
+                   ost->forced_keyframes_expr_const_values[FKF_N_FORCED],
+                   ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N],
+                   ost->forced_keyframes_expr_const_values[FKF_T],
+                   ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T],
+                   res);
             if (res) {
                 forced_keyframe = 1;
                 ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N] =
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 264d21c..2ee97d6 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -451,9 +451,9 @@ static void handle_char(CCaptionSubContext *ctx, char hi, char lo, int64_t pts)
     ctx->prev_cmd[0] = 0;
     ctx->prev_cmd[1] = 0;
     if (lo)
-       av_dlog(ctx, "(%c,%c)\n",hi,lo);
+       av_log(ctx, AV_LOG_TRACE, "(%c,%c)\n",hi,lo);
     else
-       av_dlog(ctx, "(%c)\n",hi);
+       av_log(ctx, AV_LOG_TRACE, "(%c)\n",hi);
 }
 
 static int process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint8_t lo)
@@ -493,21 +493,21 @@ static int process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint8
         ret = handle_edm(ctx, pts);
     } else if ( COR3(hi, 0x14, 0x15, 0x1C) && lo == 0x2D ) {
     /* carriage return */
-        av_dlog(ctx, "carriage return\n");
+        av_log(ctx, AV_LOG_TRACE, "carriage return\n");
         reap_screen(ctx, pts);
         roll_up(ctx);
         ctx->screen_changed = 1;
         ctx->cursor_column = 0;
     } else if ( COR3(hi, 0x14, 0x15, 0x1C) && lo == 0x2F ) {
     /* end of caption */
-        av_dlog(ctx, "handle_eoc\n");
+        av_log(ctx, AV_LOG_TRACE, "handle_eoc\n");
         ret = handle_eoc(ctx, pts);
     } else if (hi>=0x20) {
     /* Standard characters (always in pairs) */
         handle_char(ctx, hi, lo, pts);
     } else {
     /* Ignoring all other non data code */
-        av_dlog(ctx, "Unknown command 0x%hhx 0x%hhx\n", hi, lo);
+        av_log(ctx, AV_LOG_TRACE, "Unknown command 0x%hhx 0x%hhx\n", hi, lo);
     }
 
     /* set prev command */
@@ -553,7 +553,7 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
         {
             int start_time = av_rescale_q(ctx->start_time, avctx->time_base, (AVRational){ 1, 100 });
             int end_time = av_rescale_q(ctx->end_time, avctx->time_base, (AVRational){ 1, 100 });
-            av_dlog(ctx, "cdp writing data (%s)\n",ctx->buffer.str);
+            av_log(ctx, AV_LOG_TRACE, "cdp writing data (%s)\n",ctx->buffer.str);
             ret = ff_ass_add_rect_bprint(sub, &ctx->buffer, start_time, end_time - start_time);
             if (ret < 0)
                 return ret;
diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c
index 32d983c..ba32a49 100644
--- a/libavcodec/libzvbi-teletextdec.c
+++ b/libavcodec/libzvbi-teletextdec.c
@@ -274,7 +274,7 @@ static int gen_sub_bitmap(TeletextContext *ctx, AVSubtitleRect *sub_rect, vbi_pa
         b = VBI_B(page->color_map[ci]);
         a = VBI_A(page->color_map[ci]);
         ((uint32_t *)sub_rect->pict.data[1])[ci] = RGBA(r, g, b, a);
-        av_dlog(ctx, "palette %0x\n", ((uint32_t *)sub_rect->pict.data[1])[ci]);
+        av_log(ctx, AV_LOG_TRACE, "palette %0x\n", ((uint32_t *)sub_rect->pict.data[1])[ci]);
     }
     ((uint32_t *)sub_rect->pict.data[1])[cmax] = RGBA(0, 0, 0, 0);
     sub_rect->type = SUBTITLE_BITMAP;
@@ -427,8 +427,8 @@ static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *data_si
         if (data_identifier_is_teletext(*pkt->data)) {
             if ((lines = slice_to_vbi_lines(ctx, pkt->data + 1, pkt->size - 1)) < 0)
                 return lines;
-            av_dlog(avctx, "ctx=%p buf_size=%d lines=%u pkt_pts=%7.3f\n",
-                    ctx, pkt->size, lines, (double)pkt->pts/90000.0);
+            av_log(avctx, AV_LOG_TRACE, "ctx=%p buf_size=%d lines=%u pkt_pts=%7.3f\n",
+                   ctx, pkt->size, lines, (double)pkt->pts/90000.0);
             if (lines > 0) {
 #ifdef DEBUG
                 int i;
@@ -517,7 +517,7 @@ static int teletext_close_decoder(AVCodecContext *avctx)
 {
     TeletextContext *ctx = avctx->priv_data;
 
-    av_dlog(avctx, "lines_total=%u\n", ctx->lines_processed);
+    av_log(avctx, AV_LOG_TRACE, "lines_total=%u\n", ctx->lines_processed);
     while (ctx->nb_pages)
         subtitle_rect_free(&ctx->pages[--ctx->nb_pages].sub_rect);
     av_freep(&ctx->pages);
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 86c7b18..f2a0a23 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -70,14 +70,14 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
     const uint8_t *ptr;
 
     hdr_size = AV_RB16(buf);
-    av_dlog(avctx, "header size %d\n", hdr_size);
+    av_log(avctx, AV_LOG_TRACE, "header size %d\n", hdr_size);
     if (hdr_size > data_size) {
         av_log(avctx, AV_LOG_ERROR, "error, wrong header size\n");
         return AVERROR_INVALIDDATA;
     }
 
     version = AV_RB16(buf + 2);
-    av_dlog(avctx, "%.4s version %d\n", buf+4, version);
+    av_log(avctx, AV_LOG_TRACE, "%.4s version %d\n", buf+4, version);
     if (version > 1) {
         av_log(avctx, AV_LOG_ERROR, "unsupported version: %d\n", version);
         return AVERROR_PATCHWELCOME;
@@ -100,7 +100,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
     }
     if (avctx->skip_alpha) ctx->alpha_info = 0;
 
-    av_dlog(avctx, "frame type %d\n", ctx->frame_type);
+    av_log(avctx, AV_LOG_TRACE, "frame type %d\n", ctx->frame_type);
 
     if (ctx->frame_type == 0) {
         ctx->scan = ctx->progressive_scan; // permuted
@@ -118,7 +118,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
 
     ptr   = buf + 20;
     flags = buf[19];
-    av_dlog(avctx, "flags %x\n", flags);
+    av_log(avctx, AV_LOG_TRACE, "flags %x\n", flags);
 
     if (flags & 2) {
         if(buf + data_size - ptr < 64) {
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 126e5f6..897a23d 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -406,13 +406,13 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
         ret = av_buffersink_get_frame_flags(lavfi->sinks[i], frame,
                                             AV_BUFFERSINK_FLAG_PEEK);
         if (ret == AVERROR_EOF) {
-            av_dlog(avctx, "EOF sink_idx:%d\n", i);
+            av_log(avctx, AV_LOG_TRACE, "EOF sink_idx:%d\n", i);
             lavfi->sink_eof[i] = 1;
             continue;
         } else if (ret < 0)
             return ret;
         d = av_rescale_q_rnd(frame->pts, tb, AV_TIME_BASE_Q, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
-        av_dlog(avctx, "sink_idx:%d time:%f\n", i, d);
+        av_log(avctx, AV_LOG_TRACE, "sink_idx:%d time:%f\n", i, d);
         av_frame_unref(frame);
 
         if (d < min_pts) {
@@ -423,7 +423,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
     if (min_pts == DBL_MAX)
         return AVERROR_EOF;
 
-    av_dlog(avctx, "min_pts_sink_idx:%i\n", min_pts_sink_idx);
+    av_log(avctx, AV_LOG_TRACE, "min_pts_sink_idx:%i\n", min_pts_sink_idx);
 
     av_buffersink_get_frame_flags(lavfi->sinks[min_pts_sink_idx], frame, 0);
     stream_idx = lavfi->sink_stream_map[min_pts_sink_idx];
diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
index d33f714..d3a6d44 100644
--- a/libavdevice/v4l.c
+++ b/libavdevice/v4l.c
@@ -151,8 +151,8 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
     ioctl(video_fd, VIDIOCSAUDIO, &audio);
 
     ioctl(video_fd, VIDIOCGPICT, &pict);
-    av_dlog(s1, "v4l: colour=%d hue=%d brightness=%d constrast=%d whiteness=%d\n",
-            pict.colour, pict.hue, pict.brightness, pict.contrast, pict.whiteness);
+    av_log(s1, AV_LOG_TRACE, "v4l: colour=%d hue=%d brightness=%d constrast=%d whiteness=%d\n",
+           pict.colour, pict.hue, pict.brightness, pict.contrast, pict.whiteness);
     /* try to choose a suitable video format */
     pict.palette = desired_palette;
     pict.depth= desired_depth;
diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c
index 908c03e..1fcfd4e 100644
--- a/libavfilter/src_movie.c
+++ b/libavfilter/src_movie.c
@@ -536,8 +536,8 @@ static int movie_push_frame(AVFilterContext *ctx, unsigned out_id)
     }
 
     frame->pts = av_frame_get_best_effort_timestamp(frame);
-    av_dlog(ctx, "movie_push_frame(): file:'%s' %s\n", movie->file_name,
-            describe_frame_to_str((char[1024]){0}, 1024, frame, frame_type, outlink));
+    av_log(ctx, AV_LOG_TRACE, "movie_push_frame(): file:'%s' %s\n", movie->file_name,
+           describe_frame_to_str((char[1024]){0}, 1024, frame, frame_type, outlink));
 
     if (st->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         if (frame->format != outlink->format) {
diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c
index ce28afd..bbc9434 100644
--- a/libavfilter/vf_histeq.c
+++ b/libavfilter/vf_histeq.c
@@ -168,7 +168,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
 
 #ifdef DEBUG
     for (x = 0; x < 256; x++)
-        av_dlog(ctx, "in[%d]: %u\n", x, histeq->in_histogram[x]);
+        av_log(ctx, AV_LOG_TRACE, "in[%d]: %u\n", x, histeq->in_histogram[x]);
 #endif
 
     /* Calculate the lookup table. */
@@ -244,7 +244,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
     }
 #ifdef DEBUG
     for (x = 0; x < 256; x++)
-        av_dlog(ctx, "out[%d]: %u\n", x, histeq->out_histogram[x]);
+        av_log(ctx, AV_LOG_TRACE, "out[%d]: %u\n", x, histeq->out_histogram[x]);
 #endif
 
     av_frame_free(&inpic);
diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c
index 4b49058..16382fa 100644
--- a/libavfilter/vf_palettegen.c
+++ b/libavfilter/vf_palettegen.c
@@ -347,9 +347,10 @@ static AVFrame *get_palette_frame(AVFilterContext *ctx)
         if (rr >= gr && rr >= br) longest = 0;
         if (gr >= rr && gr >= br) longest = 1; // prefer green again
 
-        av_dlog(ctx, "box #%02X [%6d..%-6d] (%6d) w:%-6"PRIu64" ranges:[%2x %2x %2x] sort by %c (already sorted:%c) ",
-                box_id, box->start, box->start + box->len - 1, box->len, box_weight,
-                rr, gr, br, "rgb"[longest], box->sorted_by == longest ? 'y':'n');
+        av_log(ctx, AV_LOG_TRACE,
+               "box #%02X [%6d..%-6d] (%6d) w:%-6"PRIu64" ranges:[%2x %2x %2x] sort by %c (already sorted:%c) ",
+               box_id, box->start, box->start + box->len - 1, box->len, box_weight,
+               rr, gr, br, "rgb"[longest], box->sorted_by == longest ? 'y':'n');
 
         /* sort the range by its longest axis if it's not already sorted */
         if (box->sorted_by != longest) {
@@ -368,7 +369,8 @@ static AVFrame *get_palette_frame(AVFilterContext *ctx)
             if (box_weight > median)
                 break;
         }
-        av_dlog(ctx, "split @ i=%-6d with w=%-6"PRIu64" (target=%6"PRIu64")\n", i, box_weight, median);
+        av_log(ctx, AV_LOG_TRACE,
+               "split @ i=%-6d with w=%-6"PRIu64" (target=%6"PRIu64")\n", i, box_weight, median);
         split_box(s, box, i);
 
         box_id = get_next_box_id_to_split(s);
diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c
index 8835d8b..f53cdc1 100644
--- a/libavfilter/vf_paletteuse.c
+++ b/libavfilter/vf_paletteuse.c
@@ -875,8 +875,8 @@ static AVFrame *apply_palette(AVFilterLink *inlink, AVFrame *in)
         return NULL;
     }
 
-    av_dlog(ctx, "%dx%d rect: (%d;%d) -> (%d,%d) [area:%dx%d]\n",
-            w, h, x, y, x+w, y+h, in->width, in->height);
+    av_log(ctx, AV_LOG_TRACE, "%dx%d rect: (%d;%d) -> (%d,%d) [area:%dx%d]\n",
+           w, h, x, y, x+w, y+h, in->width, in->height);
 
     if (s->set_frame(s, out, in, x, y, w, h) < 0) {
         av_frame_free(&out);
diff --git a/libavfilter/vsrc_cellauto.c b/libavfilter/vsrc_cellauto.c
index 4f4b01c..6fe45e0 100644
--- a/libavfilter/vsrc_cellauto.c
+++ b/libavfilter/vsrc_cellauto.c
@@ -249,8 +249,8 @@ static void evolve(AVFilterContext *ctx)
             v|= i+1 < cellauto->w ? prev_row[i+1]    : 0;
         }
         row[i] = !!(cellauto->rule & (1<<v));
-        av_dlog(ctx, "i:%d context:%c%c%c -> cell:%d\n", i,
-                v&4?'@':' ', v&2?'@':' ', v&1?'@':' ', row[i]);
+        av_log(ctx, AV_LOG_TRACE, "i:%d context:%c%c%c -> cell:%d\n", i,
+               v&4?'@':' ', v&2?'@':' ', v&1?'@':' ', row[i]);
     }
 
     cellauto->generation++;
diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c
index 47630ad..a56b163 100644
--- a/libavfilter/vsrc_life.c
+++ b/libavfilter/vsrc_life.c
@@ -334,7 +334,7 @@ static void evolve(AVFilterContext *ctx)
             if (alive)     *newbuf = ALIVE_CELL; // new cell is alive
             else if (cell) *newbuf = cell - 1;   // new cell is dead and in the process of mold
             else           *newbuf = 0;          // new cell is definitely dead
-            av_dlog(ctx, "i:%d j:%d live_neighbors:%d cell:%d -> cell:%d\n", i, j, n, cell, *newbuf);
+            av_log(ctx, AV_LOG_TRACE, "i:%d j:%d live_neighbors:%d cell:%d -> cell:%d\n", i, j, n, cell, *newbuf);
             newbuf++;
         }
     }
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index e5609d9..2fccf29 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -618,7 +618,7 @@ static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts)
     AVIStream *avist    = s->streams[stream_index]->priv_data;
     AVCodecContext *enc = s->streams[stream_index]->codec;
 
-    av_dlog(s, "dts:%s packet_count:%d stream_index:%d\n", av_ts2str(dts), avist->packet_count, stream_index);
+    av_log(s, AV_LOG_TRACE, "dts:%s packet_count:%d stream_index:%d\n", av_ts2str(dts), avist->packet_count, stream_index);
     while (enc->block_align == 0 && dts != AV_NOPTS_VALUE &&
            dts > avist->packet_count && enc->codec_id != AV_CODEC_ID_XSUB && avist->packet_count) {
         AVPacket empty_packet;
@@ -633,7 +633,7 @@ static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts)
         empty_packet.data         = NULL;
         empty_packet.stream_index = stream_index;
         avi_write_packet(s, &empty_packet);
-        av_dlog(s, "dup dts:%s packet_count:%d\n", av_ts2str(dts), avist->packet_count);
+        av_log(s, AV_LOG_TRACE, "dup dts:%s packet_count:%d\n", av_ts2str(dts), avist->packet_count);
     }
 
     return 0;
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 7af1bd3..ba0ced6 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -160,7 +160,7 @@ static int64_t ffm_seek1(AVFormatContext *s, int64_t pos1)
 
     pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE);
     pos = FFMAX(pos, FFM_PACKET_SIZE);
-    av_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
+    av_log(s, AV_LOG_TRACE, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
     return avio_seek(pb, pos, SEEK_SET);
 }
 
@@ -172,7 +172,7 @@ static int64_t get_dts(AVFormatContext *s, int64_t pos)
     ffm_seek1(s, pos);
     avio_skip(pb, 4);
     dts = avio_rb64(pb);
-    av_dlog(s, "dts=%0.6f\n", dts / 1000000.0);
+    av_log(s, AV_LOG_TRACE, "dts=%0.6f\n", dts / 1000000.0);
     return dts;
 }
 
@@ -608,8 +608,8 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt)
         if ((ret = ffm_is_avail_data(s, FRAME_HEADER_SIZE+4)) < 0)
             return ret;
 
-        av_dlog(s, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n",
-               avio_tell(s->pb), s->pb->pos, ffm->write_index, ffm->file_size);
+        av_log(s, AV_LOG_TRACE, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n",
+              avio_tell(s->pb), s->pb->pos, ffm->write_index, ffm->file_size);
         if (ffm_read_data(s, ffm->header, FRAME_HEADER_SIZE, 1) !=
             FRAME_HEADER_SIZE)
             return -1;
@@ -666,7 +666,7 @@ static int ffm_seek(AVFormatContext *s, int stream_index, int64_t wanted_pts, in
     int64_t pts_min, pts_max, pts;
     double pos1;
 
-    av_dlog(s, "wanted_pts=%0.6f\n", wanted_pts / 1000000.0);
+    av_log(s, AV_LOG_TRACE, "wanted_pts=%0.6f\n", wanted_pts / 1000000.0);
     /* find the position using linear interpolation (better than
        dichotomy in typical cases) */
     if (ffm->write_index && ffm->write_index < ffm->file_size) {
diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index 27a172e..9d89d3a 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -266,7 +266,7 @@ static int ftp_passive_mode_epsv(FTPContext *s)
     end[-1] = '\0';
 
     s->server_data_port = atoi(start);
-    av_dlog(s, "Server data port: %d\n", s->server_data_port);
+    av_log(s, AV_LOG_TRACE, "Server data port: %d\n", s->server_data_port);
 
     av_free(res);
     return 0;
@@ -312,7 +312,7 @@ static int ftp_passive_mode(FTPContext *s)
     start = av_strtok(end, ",", &end);
     if (!start) goto fail;
     s->server_data_port += atoi(start);
-    av_dlog(s, "Server data port: %d\n", s->server_data_port);
+    av_log(s, AV_LOG_TRACE, "Server data port: %d\n", s->server_data_port);
 
     av_free(res);
     return 0;
@@ -579,7 +579,7 @@ static int ftp_open(URLContext *h, const char *url, int flags)
     size_t pathlen;
     FTPContext *s = h->priv_data;
 
-    av_dlog(h, "ftp protocol open\n");
+    av_log(h, AV_LOG_TRACE, "ftp protocol open\n");
 
     s->state = DISCONNECTED;
     s->filesize = -1;
@@ -642,7 +642,7 @@ static int64_t ftp_seek(URLContext *h, int64_t pos, int whence)
     int err;
     int64_t new_pos, fake_pos;
 
-    av_dlog(h, "ftp protocol seek %"PRId64" %d\n", pos, whence);
+    av_log(h, AV_LOG_TRACE, "ftp protocol seek %"PRId64" %d\n", pos, whence);
 
     switch(whence) {
     case AVSEEK_SIZE:
@@ -684,7 +684,7 @@ static int ftp_read(URLContext *h, unsigned char *buf, int size)
     FTPContext *s = h->priv_data;
     int read, err, retry_done = 0;
 
-    av_dlog(h, "ftp protocol read %d bytes\n", size);
+    av_log(h, AV_LOG_TRACE, "ftp protocol read %d bytes\n", size);
   retry:
     if (s->state == DISCONNECTED) {
         /* optimization */
@@ -742,7 +742,7 @@ static int ftp_write(URLContext *h, const unsigned char *buf, int size)
     FTPContext *s = h->priv_data;
     int written;
 
-    av_dlog(h, "ftp protocol write %d bytes\n", size);
+    av_log(h, AV_LOG_TRACE, "ftp protocol write %d bytes\n", size);
 
     if (s->state == DISCONNECTED) {
         if ((err = ftp_connect_data_connection(h)) < 0)
@@ -769,7 +769,7 @@ static int ftp_close(URLContext *h)
 {
     FTPContext *s = h->priv_data;
 
-    av_dlog(h, "ftp protocol close\n");
+    av_log(h, AV_LOG_TRACE, "ftp protocol close\n");
 
     ftp_close_both_connections(s);
     av_freep(&s->user);
@@ -784,7 +784,7 @@ static int ftp_get_file_handle(URLContext *h)
 {
     FTPContext *s = h->priv_data;
 
-    av_dlog(h, "ftp protocol get_file_handle\n");
+    av_log(h, AV_LOG_TRACE, "ftp protocol get_file_handle\n");
 
     if (s->conn_data)
         return ffurl_get_file_handle(s->conn_data);
@@ -796,7 +796,7 @@ static int ftp_shutdown(URLContext *h, int flags)
 {
     FTPContext *s = h->priv_data;
 
-    av_dlog(h, "ftp protocol shutdown\n");
+    av_log(h, AV_LOG_TRACE, "ftp protocol shutdown\n");
 
     if (s->conn_data)
         return ffurl_shutdown(s->conn_data, flags);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b20e142..2a73115 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1393,7 +1393,7 @@ static int mov_read_aclr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
                         av_log(c, AV_LOG_WARNING, "ignored unknown aclr value (%d)\n", range_value);
                         break;
                     }
-                    av_dlog(c, "color_range: %d\n", codec->color_range);
+                    av_log(c, AV_LOG_TRACE, "color_range: %d\n", codec->color_range);
                 } else {
                   /* For some reason the whole atom was not added to the extradata */
                   av_log(c, AV_LOG_ERROR, "aclr not decoded - incomplete atom\n");
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 3c1fcdd..a2522ef 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2458,7 +2458,7 @@ static int mpegts_probe(AVProbeData *p)
     sumscore = sumscore * CHECK_COUNT / check_count;
     maxscore = maxscore * CHECK_COUNT / CHECK_BLOCK;
 
-    av_dlog(0, "TS score: %d %d\n", sumscore, maxscore);
+    av_log(0, AV_LOG_TRACE, "TS score: %d %d\n", sumscore, maxscore);
 
     if      (sumscore > 6) return AVPROBE_SCORE_MAX   + sumscore - CHECK_COUNT;
     else if (maxscore > 6) return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 42471bb..0e97282 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -774,11 +774,11 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
         }
     }
 
-    av_dlog(s, "packet stream:%d pts:%s pts_time:%s duration_time:%s is_key:%d frame:%d\n",
-            pkt->stream_index, av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base),
-            av_ts2timestr(pkt->duration, &st->time_base),
-            pkt->flags & AV_PKT_FLAG_KEY,
-            pkt->stream_index == seg->reference_stream_index ? seg->frame_count : -1);
+    av_log(s, AV_LOG_TRACE, "packet stream:%d pts:%s pts_time:%s duration_time:%s is_key:%d frame:%d\n",
+           pkt->stream_index, av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base),
+           av_ts2timestr(pkt->duration, &st->time_base),
+           pkt->flags & AV_PKT_FLAG_KEY,
+           pkt->stream_index == seg->reference_stream_index ? seg->frame_count : -1);
 
     if (pkt->stream_index == seg->reference_stream_index &&
         (pkt->flags & AV_PKT_FLAG_KEY || seg->break_non_keyframes) &&
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index ce1ad8f..09b9755 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -342,8 +342,8 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
 
             out_len = colormapsize * colormapbpp + linesize * height;
 
-            av_dlog(s, "bitmap: ch=%d fmt=%d %dx%d (linesize=%d) len=%d->%ld pal=%d\n",
-                    ch_id, bmp_fmt, width, height, linesize, len, out_len, colormapsize);
+            av_log(s, AV_LOG_TRACE, "bitmap: ch=%d fmt=%d %dx%d (linesize=%d) len=%d->%ld pal=%d\n",
+                   ch_id, bmp_fmt, width, height, linesize, len, out_len, colormapsize);
 
             zbuf = av_malloc(len);
             buf  = av_malloc(out_len);
-- 
2.1.2



More information about the ffmpeg-devel mailing list