Skip to content

Commit

Permalink
Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'
Browse files Browse the repository at this point in the history
* commit '1a3eb042c704dea190c644def5b32c9cee8832b8':
  Replace av_dlog with normal av_log at trace level

Conflicts:
	ffplay.c
	libavdevice/fbdev_dec.c
	libavfilter/avfilter.c
	libavfilter/internal.h
	libavfilter/setpts.c
	libavfilter/src_movie.c
	libavfilter/vf_crop.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fieldorder.c
	libavformat/assdec.c
	libavformat/avidec.c
	libavformat/flvdec.c
	libavformat/http.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/mov.c
	libavformat/mpegenc.c
	libavformat/mpegts.c
	libavformat/mpegtsenc.c
	libavformat/mux.c
	libavformat/mxfdec.c
	libavformat/nsvdec.c
	libavformat/oggdec.c
	libavformat/r3d.c
	libavformat/rtspdec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Apr 20, 2015
2 parents 8e8219e + 1a3eb04 commit 40d552d
Show file tree
Hide file tree
Showing 39 changed files with 360 additions and 360 deletions.
4 changes: 2 additions & 2 deletions ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ static double compute_target_delay(double delay, VideoState *is)
}
}

av_dlog(NULL, "video: delay=%0.3f A-V=%f\n",
av_log(NULL, AV_LOG_TRACE, "video: delay=%0.3f A-V=%f\n",
delay, -diff);

return delay;
Expand Down Expand Up @@ -2408,7 +2408,7 @@ static int synchronize_audio(VideoState *is, int nb_samples)
max_nb_samples = ((nb_samples * (100 + SAMPLE_CORRECTION_PERCENT_MAX) / 100));
wanted_nb_samples = FFMIN(FFMAX(wanted_nb_samples, min_nb_samples), max_nb_samples);
}
av_dlog(NULL, "diff=%f adiff=%f sample_diff=%d apts=%0.3f %f\n",
av_log(NULL, AV_LOG_TRACE, "diff=%f adiff=%f sample_diff=%d apts=%0.3f %f\n",
diff, avg_diff, wanted_nb_samples - nb_samples,
is->audio_clock, is->audio_diff_threshold);
}
Expand Down
4 changes: 2 additions & 2 deletions libavdevice/dv1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static int dv1394_read_packet(AVFormatContext *context, AVPacket *pkt)
av_log(context, AV_LOG_ERROR, "Failed to get status: %s\n", strerror(errno));
return AVERROR(EIO);
}
av_dlog(context, "DV1394: status\n"
av_log(context, AV_LOG_TRACE, "DV1394: status\n"
"\tactive_frame\t%d\n"
"\tfirst_clear_frame\t%d\n"
"\tn_clear_frames\t%d\n"
Expand All @@ -181,7 +181,7 @@ static int dv1394_read_packet(AVFormatContext *context, AVPacket *pkt)
}
}

av_dlog(context, "index %d, avail %d, done %d\n", dv->index, dv->avail,
av_log(context, AV_LOG_TRACE, "index %d, avail %d, done %d\n", dv->index, dv->avail,
dv->done);

size = avpriv_dv_produce_packet(dv->dv_demux, pkt,
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/fbdev_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static int fbdev_read_packet(AVFormatContext *avctx, AVPacket *pkt)
while (1) {
curtime = av_gettime();
delay = fbdev->time_frame - curtime;
av_dlog(avctx,
av_log(avctx, AV_LOG_TRACE,
"time_frame:%"PRId64" curtime:%"PRId64" delay:%"PRId64"\n",
fbdev->time_frame, curtime, delay);
if (delay <= 0) {
Expand Down
8 changes: 4 additions & 4 deletions libavfilter/setpts.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,24 +177,24 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
d = av_expr_eval(setpts->expr, setpts->var_values, NULL);
frame->pts = D2TS(d);

av_dlog(inlink->dst,
av_log(inlink->dst, AV_LOG_TRACE,
"N:%"PRId64" PTS:%s T:%f POS:%s",
(int64_t)setpts->var_values[VAR_N],
d2istr(setpts->var_values[VAR_PTS]),
setpts->var_values[VAR_T],
d2istr(setpts->var_values[VAR_POS]));
switch (inlink->type) {
case AVMEDIA_TYPE_VIDEO:
av_dlog(inlink->dst, " INTERLACED:%"PRId64,
av_log(inlink->dst, AV_LOG_TRACE, " INTERLACED:%"PRId64,
(int64_t)setpts->var_values[VAR_INTERLACED]);
break;
case AVMEDIA_TYPE_AUDIO:
av_dlog(inlink->dst, " NB_SAMPLES:%"PRId64" NB_CONSUMED_SAMPLES:%"PRId64,
av_log(inlink->dst, AV_LOG_TRACE, " NB_SAMPLES:%"PRId64" NB_CONSUMED_SAMPLES:%"PRId64,
(int64_t)setpts->var_values[VAR_NB_SAMPLES],
(int64_t)setpts->var_values[VAR_NB_CONSUMED_SAMPLES]);
break;
}
av_dlog(inlink->dst, " -> PTS:%s T:%f\n", d2istr(d), TS2T(d, inlink->time_base));
av_log(inlink->dst, AV_LOG_TRACE, " -> PTS:%s T:%f\n", d2istr(d), TS2T(d, inlink->time_base));

if (inlink->type == AVMEDIA_TYPE_VIDEO) {
setpts->var_values[VAR_N] += 1.0;
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/vf_crop.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
s->x &= ~((1 << s->hsub) - 1);
s->y &= ~((1 << s->vsub) - 1);

av_dlog(ctx, "n:%d t:%f pos:%f x:%d y:%d x+w:%d y+h:%d\n",
av_log(ctx, AV_LOG_TRACE, "n:%d t:%f pos:%f x:%d y:%d x+w:%d y+h:%d\n",
(int)s->var_values[VAR_N], s->var_values[VAR_T], s->var_values[VAR_POS],
s->x, s->y, s->x+s->w, s->y+s->h);

Expand Down
2 changes: 1 addition & 1 deletion libavfilter/vf_fieldorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
av_frame_copy_props(out, frame);
}

av_dlog(ctx,
av_log(ctx, AV_LOG_TRACE,
"picture will move %s one line\n",
s->dst_tff ? "up" : "down");
h = frame->height;
Expand Down
22 changes: 11 additions & 11 deletions libavformat/asfdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static const ff_asf_guid stream_bitrate_guid = { /* (http://get.to/sdp) */

#define PRINT_IF_GUID(g, cmp) \
if (!ff_guidcmp(g, &cmp)) \
av_dlog(NULL, "(GUID: %s) ", # cmp)
av_log(NULL, AV_LOG_TRACE, "(GUID: %s) ", # cmp)

static void print_guid(ff_asf_guid *g)
{
Expand Down Expand Up @@ -141,10 +141,10 @@ static void print_guid(ff_asf_guid *g)
else PRINT_IF_GUID(g, stream_bitrate_guid);
else PRINT_IF_GUID(g, ff_asf_language_guid);
else
av_dlog(NULL, "(GUID: unknown) ");
av_log(NULL, AV_LOG_TRACE, "(GUID: unknown) ");
for (i = 0; i < 16; i++)
av_dlog(NULL, " 0x%02x,", (*g)[i]);
av_dlog(NULL, "}\n");
av_log(NULL, AV_LOG_TRACE, " 0x%02x,", (*g)[i]);
av_log(NULL, AV_LOG_TRACE, "}\n");
}
#undef PRINT_IF_GUID
#else
Expand Down Expand Up @@ -669,7 +669,7 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size)

if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len)
avio_skip(pb, name_len - ret);
av_dlog(s, "%d stream %d name_len %2d type %d len %4d <%s>\n",
av_log(s, AV_LOG_TRACE, "%d stream %d name_len %2d type %d len %4d <%s>\n",
i, stream_num, name_len, value_type, value_len, name);

if (!strcmp(name, "AspectRatioX")){
Expand Down Expand Up @@ -855,7 +855,7 @@ static int asf_read_header(AVFormatContext *s)
&st->sample_aspect_ratio.den,
asf->dar[0].num, asf->dar[0].den, INT_MAX);

av_dlog(s, "i=%d, st->codec->codec_type:%d, asf->dar %d:%d sar=%d:%d\n",
av_log(s, AV_LOG_TRACE, "i=%d, st->codec->codec_type:%d, asf->dar %d:%d sar=%d:%d\n",
i, st->codec->codec_type, asf->dar[i].num, asf->dar[i].den,
st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);

Expand Down Expand Up @@ -993,7 +993,7 @@ static int asf_get_packet(AVFormatContext *s, AVIOContext *pb)
if (packet_length < asf->hdr.min_pktsize)
padsize += asf->hdr.min_pktsize - packet_length;
asf->packet_padsize = padsize;
av_dlog(s, "packet: size=%d padsize=%d left=%d\n",
av_log(s, AV_LOG_TRACE, "packet: size=%d padsize=%d left=%d\n",
s->packet_size, asf->packet_padsize, asf->packet_size_left);
return 0;
}
Expand All @@ -1019,7 +1019,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb)
DO_2BITS(asf->packet_property >> 4, asf->packet_seq, 0);
DO_2BITS(asf->packet_property >> 2, asf->packet_frag_offset, 0);
DO_2BITS(asf->packet_property, asf->packet_replic_size, 0);
av_dlog(asf, "key:%d stream:%d seq:%d offset:%d replic_size:%d\n",
av_log(asf, AV_LOG_TRACE, "key:%d stream:%d seq:%d offset:%d replic_size:%d\n",
asf->packet_key_frame, asf->stream_index, asf->packet_seq,
asf->packet_frag_offset, asf->packet_replic_size);
if (rsize+(int64_t)asf->packet_replic_size > asf->packet_size_left) {
Expand Down Expand Up @@ -1178,7 +1178,7 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
av_assert0(asf_st);

if (!asf_st->frag_offset && asf->packet_frag_offset) {
av_dlog(s, "skipping asf data pkt with fragment offset for "
av_log(s, AV_LOG_TRACE, "skipping asf data pkt with fragment offset for "
"stream:%d, expected:%d but got %d from pkt)\n",
asf->stream_index, asf_st->frag_offset,
asf->packet_frag_offset);
Expand Down Expand Up @@ -1238,7 +1238,7 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
asf_st->palette_changed = 0;
}
}
av_dlog(asf, "new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n",
av_log(asf, AV_LOG_TRACE, "new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n",
asf->stream_index, asf->packet_key_frame,
asf_st->pkt.flags & AV_PKT_FLAG_KEY,
s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO,
Expand All @@ -1250,7 +1250,7 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
}

/* read data */
av_dlog(asf, "READ PACKET s:%d os:%d o:%d,%d l:%d DATA:%p\n",
av_log(asf, AV_LOG_TRACE, "READ PACKET s:%d os:%d o:%d,%d l:%d DATA:%p\n",
s->packet_size, asf_st->pkt.size, asf->packet_frag_offset,
asf_st->frag_offset, asf->packet_frag_size, asf_st->pkt.data);
asf->packet_size_left -= asf->packet_frag_size;
Expand Down
31 changes: 15 additions & 16 deletions libavformat/avidec.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static int avi_load_index(AVFormatContext *s);
static int guess_ni_flag(AVFormatContext *s);

#define print_tag(str, tag, size) \
av_dlog(NULL, "pos:%"PRIX64" %s: tag=%c%c%c%c size=0x%x\n", \
av_log(NULL, AV_LOG_TRACE, "pos:%"PRIX64" %s: tag=%c%c%c%c size=0x%x\n", \
avio_tell(pb), str, tag & 0xff, \
(tag >> 8) & 0xff, \
(tag >> 16) & 0xff, \
Expand Down Expand Up @@ -178,7 +178,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num)
int64_t last_pos = -1;
int64_t filesize = avi->fsize;

av_dlog(s,
av_log(s, AV_LOG_TRACE,
"longs_pre_entry:%d index_type:%d entries_in_use:%d "
"chunk_id:%X base:%16"PRIX64" frame_num:%d\n",
longs_pre_entry,
Expand Down Expand Up @@ -220,9 +220,8 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num)
int key = len >= 0;
len &= 0x7FFFFFFF;

#ifdef DEBUG_SEEK
av_log(s, AV_LOG_ERROR, "pos:%"PRId64", len:%X\n", pos, len);
#endif
av_log(s, AV_LOG_TRACE, "pos:%"PRId64", len:%X\n", pos, len);

if (avio_feof(pb))
return AVERROR_INVALIDDATA;

Expand Down Expand Up @@ -518,7 +517,7 @@ static int avi_read_header(AVFormatContext *s)
avi->movi_end = avi->movi_list + size + (size & 1);
else
avi->movi_end = avi->fsize;
av_dlog(NULL, "movi end=%"PRIx64"\n", avi->movi_end);
av_log(NULL, AV_LOG_TRACE, "movi end=%"PRIx64"\n", avi->movi_end);
goto end_of_header;
} else if (tag1 == MKTAG('I', 'N', 'F', 'O'))
ff_read_riff_info(s, size - 4);
Expand Down Expand Up @@ -668,7 +667,7 @@ static int avi_read_header(AVFormatContext *s)
}
ast->sample_size = avio_rl32(pb); /* sample ssize */
ast->cum_len *= FFMAX(1, ast->sample_size);
av_dlog(s, "%"PRIu32" %"PRIu32" %d\n",
av_log(s, AV_LOG_TRACE, "%"PRIu32" %"PRIu32" %d\n",
ast->rate, ast->scale, ast->sample_size);

switch (tag1) {
Expand Down Expand Up @@ -931,7 +930,7 @@ static int avi_read_header(AVFormatContext *s)
if (active_aspect.num && active_aspect.den &&
active.num && active.den) {
st->sample_aspect_ratio = av_div_q(active_aspect, active);
av_dlog(s, "vprp %d/%d %d/%d\n",
av_log(s, AV_LOG_TRACE, "vprp %d/%d %d/%d\n",
active_aspect.num, active_aspect.den,
active.num, active.den);
}
Expand Down Expand Up @@ -1151,7 +1150,7 @@ static int avi_sync(AVFormatContext *s, int exit_early)
size = d[4] + (d[5] << 8) + (d[6] << 16) + (d[7] << 24);

n = get_stream_idx(d + 2);
av_dlog(s, "%X %X %X %X %X %X %X %X %"PRId64" %u %d\n",
av_log(s, AV_LOG_TRACE, "%X %X %X %X %X %X %X %X %"PRId64" %u %d\n",
d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
if (i*(avi->io_fsize>0) + (uint64_t)size > avi->fsize || d[0] > 127)
continue;
Expand Down Expand Up @@ -1319,7 +1318,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
(AVRational) { FFMAX(1, ast->sample_size),
AV_TIME_BASE });

av_dlog(s, "%"PRId64" %d/%d %"PRId64"\n", ts,
av_log(s, AV_LOG_TRACE, "%"PRId64" %d/%d %"PRId64"\n", ts,
st->time_base.num, st->time_base.den, ast->frame_offset);
if (ts < best_ts) {
best_ts = ts;
Expand Down Expand Up @@ -1430,7 +1429,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
// pkt->dts += ast->start;
if (ast->sample_size)
pkt->dts /= ast->sample_size;
av_dlog(s,
av_log(s, AV_LOG_TRACE,
"dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d "
"base:%d st:%d size:%d\n",
pkt->dts,
Expand Down Expand Up @@ -1545,7 +1544,7 @@ static int avi_read_idx1(AVFormatContext *s, int size)
flags = avio_rl32(pb);
pos = avio_rl32(pb);
len = avio_rl32(pb);
av_dlog(s, "%d: tag=0x%x flags=0x%x pos=0x%x len=%d/",
av_log(s, AV_LOG_TRACE, "%d: tag=0x%x flags=0x%x pos=0x%x len=%d/",
i, tag, flags, pos, len);

index = ((tag & 0xff) - '0') * 10;
Expand All @@ -1561,7 +1560,7 @@ static int avi_read_idx1(AVFormatContext *s, int size)
}
pos += data_offset;

av_dlog(s, "%d cum_len=%"PRId64"\n", len, ast->cum_len);
av_log(s, AV_LOG_TRACE, "%d cum_len=%"PRId64"\n", len, ast->cum_len);

// even if we have only a single stream, we should
// switch to non-interleaved to get correct timestamps
Expand Down Expand Up @@ -1690,15 +1689,15 @@ static int avi_load_index(AVFormatContext *s)

if (avio_seek(pb, avi->movi_end, SEEK_SET) < 0)
goto the_end; // maybe truncated file
av_dlog(s, "movi_end=0x%"PRIx64"\n", avi->movi_end);
av_log(s, AV_LOG_TRACE, "movi_end=0x%"PRIx64"\n", avi->movi_end);
for (;;) {
tag = avio_rl32(pb);
size = avio_rl32(pb);
if (avio_feof(pb))
break;
next = avio_tell(pb) + size + (size & 1);

av_dlog(s, "tag=%c%c%c%c size=0x%x\n",
av_log(s, AV_LOG_TRACE, "tag=%c%c%c%c size=0x%x\n",
tag & 0xff,
(tag >> 8) & 0xff,
(tag >> 16) & 0xff,
Expand Down Expand Up @@ -1776,7 +1775,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index,
pos = st->index_entries[index].pos;
timestamp = st->index_entries[index].timestamp / FFMAX(ast->sample_size, 1);

av_dlog(s, "XX %"PRId64" %d %"PRId64"\n",
av_log(s, AV_LOG_TRACE, "XX %"PRId64" %d %"PRId64"\n",
timestamp, index, st->index_entries[index].timestamp);

if (CONFIG_DV_DEMUXER && avi->dv_demux) {
Expand Down
6 changes: 3 additions & 3 deletions libavformat/flvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
size = avio_rb24(s->pb);
dts = avio_rb24(s->pb);
dts |= avio_r8(s->pb) << 24;
av_dlog(s, "type:%d, size:%d, dts:%"PRId64" pos:%"PRId64"\n", type, size, dts, avio_tell(s->pb));
av_log(s, AV_LOG_TRACE, "type:%d, size:%d, dts:%"PRId64" pos:%"PRId64"\n", type, size, dts, avio_tell(s->pb));
if (avio_feof(s->pb))
return AVERROR_EOF;
avio_skip(s->pb, 3); /* stream id, always 0 */
Expand Down Expand Up @@ -888,7 +888,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(ENOMEM);

}
av_dlog(s, "%d %X %d \n", stream_type, flags, st->discard);
av_log(s, AV_LOG_TRACE, "%d %X %d \n", stream_type, flags, st->discard);

if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY ||
stream_type == FLV_STREAM_TYPE_AUDIO)
Expand Down Expand Up @@ -1017,7 +1017,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
st->codec->sample_rate = cfg.ext_sample_rate;
else
st->codec->sample_rate = cfg.sample_rate;
av_dlog(s, "mp4a config channels %d sample rate %d\n",
av_log(s, AV_LOG_TRACE, "mp4a config channels %d sample rate %d\n",
st->codec->channels, st->codec->sample_rate);
}
}
Expand Down
Loading

0 comments on commit 40d552d

Please sign in to comment.