Commit 1a3eb042 authored by Vittorio Giovara's avatar Vittorio Giovara

Replace av_dlog with normal av_log at trace level

This applies to every library where performance is not critical.
parent c253340a
......@@ -1065,7 +1065,7 @@ static double compute_target_time(double frame_current_pts, VideoState *is)
}
is->frame_timer += delay;
av_dlog(NULL, "video: delay=%0.3f pts=%0.3f A-V=%f\n",
av_log(NULL, AV_LOG_TRACE, "video: delay=%0.3f pts=%0.3f A-V=%f\n",
delay, frame_current_pts, -diff);
return is->frame_timer;
......@@ -1611,7 +1611,7 @@ static int video_thread(void *arg)
#if CONFIG_AVFILTER
if ( last_w != is->video_st->codec->width
|| last_h != is->video_st->codec->height) {
av_dlog(NULL, "Changing size %dx%d -> %dx%d\n", last_w, last_h,
av_log(NULL, AV_LOG_TRACE, "Changing size %dx%d -> %dx%d\n", last_w, last_h,
is->video_st->codec->width, is->video_st->codec->height);
avfilter_graph_free(&graph);
graph = avfilter_graph_alloc();
......@@ -1640,7 +1640,7 @@ static int video_thread(void *arg)
if (av_cmp_q(tb, is->video_st->time_base)) {
av_unused int64_t pts1 = pts_int;
pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base);
av_dlog(NULL, "video_thread(): "
av_log(NULL, AV_LOG_TRACE, "video_thread(): "
"tb:%d/%d pts:%"PRId64" -> tb:%d/%d pts:%"PRId64"\n",
tb.num, tb.den, pts1,
is->video_st->time_base.num, is->video_st->time_base.den, pts_int);
......@@ -1819,7 +1819,7 @@ static int synchronize_audio(VideoState *is, short *samples,
samples_size = wanted_size;
}
}
av_dlog(NULL, "diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n",
av_log(NULL, AV_LOG_TRACE, "diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n",
diff, avg_diff, samples_size - samples_size1,
is->audio_clock, is->video_clock, is->audio_diff_threshold);
}
......
......@@ -160,7 +160,7 @@ restart_poll:
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"
......@@ -181,7 +181,7 @@ restart_poll:
}
}
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,
......
......@@ -199,7 +199,7 @@ static int fbdev_read_packet(AVFormatContext *avctx, AVPacket *pkt)
/* wait based on the frame rate */
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) {
......
......@@ -225,7 +225,7 @@ int avfilter_config_links(AVFilterContext *filter)
void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
{
if (link->type == AVMEDIA_TYPE_VIDEO) {
av_dlog(ctx,
av_log(ctx, AV_LOG_TRACE,
"link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",
link, link->w, link->h,
av_get_pix_fmt_name(link->format),
......@@ -236,7 +236,7 @@ void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
char buf[128];
av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
av_dlog(ctx,
av_log(ctx, AV_LOG_TRACE,
"link[%p r:%d cl:%s fmt:%-16s %-16s->%-16s]%s",
link, link->sample_rate, buf,
av_get_sample_fmt_name(link->format),
......
......@@ -145,7 +145,7 @@ void ff_avfilter_default_free_buffer(AVFilterBuffer *buf);
/** Tell is a format is contained in the provided list terminated by -1. */
int ff_fmt_is_in(int fmt, const int *fmts);
#define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func)
#define FF_DPRINTF_START(ctx, func) av_log(NULL, AV_LOG_TRACE, "%-16s: ", #func)
void ff_dlog_link(void *ctx, AVFilterLink *link, int end);
......
......@@ -143,7 +143,7 @@ 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" interlaced:%d pts:%"PRId64" t:%f -> pts:%"PRId64" t:%f\n",
(int64_t)setpts->var_values[VAR_N],
(int)setpts->var_values[VAR_INTERLACED],
......
......@@ -265,7 +265,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 x:%d y:%d x+w:%d y+h:%d\n",
av_log(ctx, AV_LOG_TRACE, "n:%d t:%f x:%d y:%d x+w:%d y+h:%d\n",
(int)s->var_values[VAR_N], s->var_values[VAR_T], s->x,
s->y, s->x+s->w, s->y+s->h);
......
......@@ -927,7 +927,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
s->x &= ~((1 << s->hsub) - 1);
s->y &= ~((1 << s->vsub) - 1);
av_dlog(ctx, "n:%d t:%f x:%d y:%d x+w:%d y+h:%d\n",
av_log(ctx, AV_LOG_TRACE, "n:%d t:%f x:%d y:%d x+w:%d y+h:%d\n",
(int)s->var_values[VAR_N], s->var_values[VAR_T],
s->x, s->y, s->x+s->w, s->y+s->h);
......
......@@ -102,7 +102,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
return ff_filter_frame(outlink, 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;
......
......@@ -222,7 +222,7 @@ static int movie_get_frame(AVFilterLink *outlink)
if (frame_decoded) {
if (movie->frame->pkt_pts != AV_NOPTS_VALUE)
movie->frame->pts = movie->frame->pkt_pts;
av_dlog(outlink->src,
av_log(outlink->src, AV_LOG_TRACE,
"movie_get_frame(): file:'%s' pts:%"PRId64" time:%f aspect:%d/%d\n",
movie->file_name, movie->frame->pts,
(double)movie->frame->pts *
......
......@@ -114,7 +114,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)
{
......@@ -145,10 +145,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
......@@ -658,7 +658,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")){
......@@ -824,7 +824,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);
......@@ -962,7 +962,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;
}
......@@ -985,7 +985,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 (asf->packet_replic_size >= 8) {
......@@ -1112,7 +1112,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);
......@@ -1172,7 +1172,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,
......@@ -1184,7 +1184,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;
......
......@@ -63,7 +63,7 @@ static int64_t get_pts(const uint8_t *p)
if (sscanf(p, "%*[^,],%d:%d:%d%*c%d", &hour, &min, &sec, &hsec) != 4)
return AV_NOPTS_VALUE;
av_dlog(NULL, "%d %d %d %d [%s]\n", hour, min, sec, hsec, p);
av_log(NULL, AV_LOG_TRACE, "%d %d %d %d [%s]\n", hour, min, sec, hsec, p);
min += 60 * hour;
sec += 60 * min;
......
......@@ -95,7 +95,7 @@ static int avi_load_index(AVFormatContext *s);
static int guess_ni_flag(AVFormatContext *s);
#define print_tag(str, tag, size) \
av_dlog(NULL, "%s: tag=%c%c%c%c size=0x%x\n", \
av_log(NULL, AV_LOG_TRACE, "%s: tag=%c%c%c%c size=0x%x\n", \
str, tag & 0xff, \
(tag >> 8) & 0xff, \
(tag >> 16) & 0xff, \
......@@ -155,7 +155,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"\n",
longs_pre_entry,
......@@ -196,7 +196,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num)
int key = len >= 0;
len &= 0x7FFFFFFF;
av_dlog(s, "pos:%"PRId64", len:%X\n", pos, len);
av_log(s, AV_LOG_TRACE, "pos:%"PRId64", len:%X\n", pos, len);
if (pb->eof_reached)
return AVERROR_INVALIDDATA;
......@@ -405,7 +405,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);
......@@ -549,7 +549,7 @@ static int avi_read_header(AVFormatContext *s)
avio_rl32(pb); /* quality */
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) {
......@@ -769,7 +769,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);
}
......@@ -957,7 +957,7 @@ start_sync:
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 + (uint64_t)size > avi->fsize || d[0] > 127)
continue;
......@@ -1114,7 +1114,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;
......@@ -1224,7 +1224,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,
......@@ -1297,7 +1297,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;
......@@ -1313,7 +1313,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);
if (pb->eof_reached)
return AVERROR_INVALIDDATA;
......@@ -1433,13 +1433,13 @@ 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 (;;) {
if (pb->eof_reached)
break;
tag = avio_rl32(pb);
size = avio_rl32(pb);
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,
......@@ -1505,7 +1505,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) {
......@@ -1557,7 +1557,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index,
index++;
}
av_dlog(s, "%"PRId64" %d %"PRId64"\n",
av_log(s, AV_LOG_TRACE, "%"PRId64" %d %"PRId64"\n",
timestamp, index, st2->index_entries[index].timestamp);
/* extract the current frame number */
ast2->frame_offset = st2->index_entries[index].timestamp;
......
......@@ -750,7 +750,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"\n", type, size, dts);
av_log(s, AV_LOG_TRACE, "type:%d, size:%d, dts:%"PRId64"\n", type, size, dts);
if (s->pb->eof_reached)
return AVERROR_EOF;
avio_skip(s->pb, 3); /* stream id, always 0 */
......@@ -823,7 +823,7 @@ skip:
if (!st)
return AVERROR(ENOMEM);
}
av_dlog(s, "%d %X %d \n", is_audio, flags, st->discard);
av_log(s, AV_LOG_TRACE, "%d %X %d \n", is_audio, flags, st->discard);
if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY ||
is_audio)
......@@ -933,7 +933,7 @@ skip:
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);
}
......
......@@ -849,51 +849,51 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc)
hvcc->avgFrameRate = 0;
hvcc->constantFrameRate = 0;
av_dlog(NULL, "configurationVersion: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "configurationVersion: %"PRIu8"\n",
hvcc->configurationVersion);
av_dlog(NULL, "general_profile_space: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "general_profile_space: %"PRIu8"\n",
hvcc->general_profile_space);
av_dlog(NULL, "general_tier_flag: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "general_tier_flag: %"PRIu8"\n",
hvcc->general_tier_flag);
av_dlog(NULL, "general_profile_idc: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "general_profile_idc: %"PRIu8"\n",
hvcc->general_profile_idc);
av_dlog(NULL, "general_profile_compatibility_flags: 0x%08"PRIx32"\n",
av_log(NULL, AV_LOG_TRACE, "general_profile_compatibility_flags: 0x%08"PRIx32"\n",
hvcc->general_profile_compatibility_flags);
av_dlog(NULL, "general_constraint_indicator_flags: 0x%012"PRIx64"\n",
av_log(NULL, AV_LOG_TRACE, "general_constraint_indicator_flags: 0x%012"PRIx64"\n",
hvcc->general_constraint_indicator_flags);
av_dlog(NULL, "general_level_idc: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "general_level_idc: %"PRIu8"\n",
hvcc->general_level_idc);
av_dlog(NULL, "min_spatial_segmentation_idc: %"PRIu16"\n",
av_log(NULL, AV_LOG_TRACE, "min_spatial_segmentation_idc: %"PRIu16"\n",
hvcc->min_spatial_segmentation_idc);
av_dlog(NULL, "parallelismType: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "parallelismType: %"PRIu8"\n",
hvcc->parallelismType);
av_dlog(NULL, "chromaFormat: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "chromaFormat: %"PRIu8"\n",
hvcc->chromaFormat);
av_dlog(NULL, "bitDepthLumaMinus8: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "bitDepthLumaMinus8: %"PRIu8"\n",
hvcc->bitDepthLumaMinus8);
av_dlog(NULL, "bitDepthChromaMinus8: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "bitDepthChromaMinus8: %"PRIu8"\n",
hvcc->bitDepthChromaMinus8);
av_dlog(NULL, "avgFrameRate: %"PRIu16"\n",
av_log(NULL, AV_LOG_TRACE, "avgFrameRate: %"PRIu16"\n",
hvcc->avgFrameRate);
av_dlog(NULL, "constantFrameRate: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "constantFrameRate: %"PRIu8"\n",
hvcc->constantFrameRate);
av_dlog(NULL, "numTemporalLayers: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "numTemporalLayers: %"PRIu8"\n",
hvcc->numTemporalLayers);
av_dlog(NULL, "temporalIdNested: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "temporalIdNested: %"PRIu8"\n",
hvcc->temporalIdNested);
av_dlog(NULL, "lengthSizeMinusOne: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "lengthSizeMinusOne: %"PRIu8"\n",
hvcc->lengthSizeMinusOne);
av_dlog(NULL, "numOfArrays: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "numOfArrays: %"PRIu8"\n",
hvcc->numOfArrays);
for (i = 0; i < hvcc->numOfArrays; i++) {
av_dlog(NULL, "array_completeness[%"PRIu8"]: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "array_completeness[%"PRIu8"]: %"PRIu8"\n",
i, hvcc->array[i].array_completeness);
av_dlog(NULL, "NAL_unit_type[%"PRIu8"]: %"PRIu8"\n",
av_log(NULL, AV_LOG_TRACE, "NAL_unit_type[%"PRIu8"]: %"PRIu8"\n",
i, hvcc->array[i].NAL_unit_type);
av_dlog(NULL, "numNalus[%"PRIu8"]: %"PRIu16"\n",
av_log(NULL, AV_LOG_TRACE, "numNalus[%"PRIu8"]: %"PRIu16"\n",
i, hvcc->array[i].numNalus);
for (j = 0; j < hvcc->array[i].numNalus; j++)
av_dlog(NULL,
av_log(NULL, AV_LOG_TRACE,
"nalUnitLength[%"PRIu8"][%"PRIu16"]: %"PRIu16"\n",
i, j, hvcc->array[i].nalUnitLength[j]);
}
......
......@@ -460,7 +460,7 @@ static int process_line(URLContext *h, char *line, int line_count,
p++;
s->http_code = strtol(p, &end, 10);
av_dlog(NULL, "http_code=%d\n", s->http_code);
av_log(NULL, AV_LOG_TRACE, "http_code=%d\n", s->http_code);
if ((ret = check_http_code(h, s->http_code, end)) < 0)
return ret;
......@@ -535,7 +535,7 @@ static int http_read_header(URLContext *h, int *new_location)
if ((err = http_get_line(s, line, sizeof(line))) < 0)
return err;
av_dlog(NULL, "header='%s'\n", line);
av_log(NULL, AV_LOG_TRACE, "header='%s'\n", line);
err = process_line(h, line, s->line_count, new_location);
if (err < 0)
......@@ -775,7 +775,7 @@ static int http_read_stream(URLContext *h, uint8_t *buf, int size)
s->chunksize = strtoll(line, NULL, 16);
av_dlog(NULL, "Chunked encoding data size: %"PRId64"'\n",
av_log(NULL, AV_LOG_TRACE, "Chunked encoding data size: %"PRId64"'\n",
s->chunksize);
if (!s->chunksize)
......
This diff is collapsed.
......@@ -404,7 +404,7 @@ int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag)
int len;
*tag = avio_r8(pb);
len = ff_mp4_read_descr_len(pb);
av_dlog(fc, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);
av_log(fc, AV_LOG_TRACE, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);
return len;
}
......@@ -443,10 +443,10 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
avio_rb32(pb); /* avg bitrate */
st->codec->codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);
av_dlog(fc, "esds object type id 0x%02x\n", object_type_id);
av_log(fc, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id);
len = ff_mp4_read_descr(fc, pb, &tag);
if (tag == MP4DecSpecificDescrTag) {
av_dlog(fc, "Specific MPEG4 header len=%d\n", len);
av_log(fc, AV_LOG_TRACE, "Specific MPEG4 header len=%d\n", len);
if (!len || (uint64_t)len > (1<<30))
return -1;
av_free(st->codec->extradata);
......@@ -466,7 +466,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
st->codec->sample_rate = cfg.ext_sample_rate;
else
st->codec->sample_rate = cfg.sample_rate;
av_dlog(fc, "mp4a config channels %d obj %d ext obj %d "
av_log(fc, AV_LOG_TRACE, "mp4a config channels %d obj %d ext obj %d "
"sample rate %d ext sample rate %d\n", st->codec->channels,
cfg.object_type, cfg.ext_object_type,
cfg.sample_rate, cfg.ext_sample_rate);
......
......@@ -123,7 +123,7 @@ static int read_data_packet(MMSHContext *mmsh, const int len)
return AVERROR(EIO);
}
res = ffurl_read_complete(mms->mms_hd, mms->in_buffer, len);
av_dlog(NULL, "Data packet len = %d\n", len);
av_log(NULL, AV_LOG_TRACE, "Data packet len = %d\n", len);
if (res != len) {
av_log(NULL, AV_LOG_ERROR, "Read data packet failed!\n");
return AVERROR(EIO);
......@@ -157,7 +157,7 @@ static int get_http_header_data(MMSHContext *mmsh)
if (mms->asf_header) {
if (len != mms->asf_header_size) {
mms->asf_header_size = len;
av_dlog(NULL, "Header len changed from %d to %d\n",
av_log(NULL, AV_LOG_TRACE, "Header len changed from %d to %d\n",
mms->asf_header_size, len);
av_freep(&mms->asf_header);
}
......@@ -202,7 +202,7 @@ static int get_http_header_data(MMSHContext *mmsh)
av_log(NULL, AV_LOG_ERROR, "Read other chunk type data failed!\n");
return AVERROR(EIO);
} else {
av_dlog(NULL, "Skip chunk type %d \n", chunk_type);
av_log(NULL, AV_LOG_TRACE, "Skip chunk type %d \n", chunk_type);
continue;
}
}
......@@ -289,7 +289,7 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
av_log(NULL, AV_LOG_ERROR, "Build play request failed!\n");
goto fail;
}
av_dlog(NULL, "out_buffer is %s", headers);
av_log(NULL, AV_LOG_TRACE, "out_buffer is %s", headers);
av_opt_set(mms->mms_hd->priv_data, "headers", headers, 0);
err = ffurl_connect(mms->mms_hd, NULL);
......@@ -303,12 +303,12 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
goto fail;
}
av_dlog(NULL, "Connection successfully open\n");
av_log(NULL, AV_LOG_TRACE, "Connection successfully open\n");
return 0;
fail:
av_freep(&stream_selection);
mmsh_close(h);
av_dlog(NULL, "Connection failed with error %d\n", err);
av_log(NULL, AV_LOG_TRACE, "Connection failed with error %d\n", err);
return err;
}
......
......@@ -208,11 +208,11 @@ static int send_media_file_request(MMSTContext *mmst)
static void handle_packet_stream_changing_type(MMSTContext *mmst)
{
MMSContext *mms = &mmst->mms;
av_dlog(NULL, "Stream changing!\n");
av_log(NULL, AV_LOG_TRACE, "Stream changing!\n");
// 40 is the packet header size, 7 is the prefix size.
mmst->header_packet_id= AV_RL32(mms->in_buffer + 40 + 7);
av_dlog(NULL, "Changed header prefix to 0x%x", mmst->header_packet_id);
av_log(NULL, AV_LOG_TRACE, "Changed header prefix to 0x%x", mmst->header_packet_id);
}
static int send_keepalive_packet(MMSTContext *mmst)
......@@ -272,7 +272,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst)
}
length_remaining= AV_RL32(mms->in_buffer+8) + 4;
av_dlog(NULL, "Length remaining is %d\n", length_remaining);
av_log(NULL, AV_LOG_TRACE, "Length remaining is %d\n", length_remaining);
// read the rest of the packet.
if (length_remaining < 0
|| length_remaining > sizeof(mms->in_buffer) - 12) {
......@@ -351,7 +351,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst)
} else if(packet_id_type == mmst->packet_id) {
packet_type = SC_PKT_ASF_MEDIA;
} else {
av_dlog(NULL, "packet id type %d is old.", packet_id_type);
av_log(NULL, AV_LOG_TRACE, "packet id type %d is old.", packet_id_type);
continue;
}
}
......@@ -377,7 +377,7 @@ static int mms_safe_send_recv(MMSTContext *mmst,
if(send_fun) {
int ret = send_fun(mmst);
if (ret < 0) {
av_dlog(NULL, "Send Packet error before expecting recv packet %d\n", expect_type);
av_log(NULL, AV_LOG_TRACE, "Send Packet error before expecting recv packet %d\n", expect_type);
return ret;
}
}
......@@ -552,7 +552,7 @@ static int mms_open(URLContext *h, const char *uri, int flags)
}
err = ff_mms_asf_header_parser(mms);
if (err) {
av_dlog(NULL, "asf header parsed failed!\n");
av_log(NULL, AV_LOG_TRACE, "asf header parsed failed!\n");
goto fail;
}
mms->header_parsed = 1;
......@@ -569,11 +569,11 @@ static int mms_open(URLContext *h, const char *uri, int flags)
if (err) {
goto fail;
}
av_dlog(NULL, "Leaving open (success)\n");
av_log(NULL, AV_LOG_TRACE, "Leaving open (success)\n");
return 0;
fail:
mms_close(h);
av_dlog(NULL, "Leaving open (failure: %d)\n", err);
av_log(NULL, AV_LOG_TRACE, "Leaving open (failure: %d)\n", err);
return err;
}
......@@ -606,12 +606,12 @@ static int mms_read(URLContext *h, uint8_t *buf, int size)
// copy the data to the packet buffer.
result = ff_mms_read_data(mms, buf, size);
if (result == 0) {
av_dlog(NULL, "Read ASF media packet size is zero!\n");
av_log(NULL, AV_LOG_TRACE, "Read ASF media packet size is zero!\n");
break;
}
}
} else {
av_dlog(NULL, "read packet error!\n");
av_log(NULL, AV_LOG_TRACE, "read packet error!\n");
break;
}
}
......
This diff is collapsed.
......@@ -556,7 +556,7 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
bitmap = avio_rb32(pb);
num_descr = avio_rb32(pb);
av_dlog(s, "chan: layout=%u bitmap=%u num_descr=%u\n",
av_log(s, AV_LOG_TRACE, "chan: layout=%u bitmap=%u num_descr=%u\n",
layout_tag, bitmap, num_descr);
if (size < 12ULL + num_descr * 20ULL)
......
......@@ -530,7 +530,7 @@ found:
pkt->dts = dts;
pkt->pos = dummy_pos;
pkt->stream_index = st->index;
av_dlog(s, "%d: pts=%0.3f dts=%0.3f size=%d\n",
av_log(s, AV_LOG_TRACE, "%d: pts=%0.3f dts=%0.3f size=%d\n",
pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0,
pkt->size);
......@@ -550,7 +550,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
for (;;) {
len = mpegps_read_pes_header(s, &pos, &startcode, &pts, &dts);
if (len < 0) {
av_dlog(s, "none (ret=%d)\n", len);
av_log(s, AV_LOG_TRACE, "none (ret=%d)\n", len);
return AV_NOPTS_VALUE;
}
if (startcode == s->streams[stream_index]->id &&
......@@ -559,7 +559,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
}
avio_skip(s->pb, len);
}
av_dlog(s, "pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n",
av_log(s, AV_LOG_TRACE, "pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n",
pos, dts, dts / 90000.0);