Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'

* 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 <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-04-20 03:19:29 +02:00
commit 40d552dae6
39 changed files with 360 additions and 360 deletions

View File

@ -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;
@ -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);
}

View File

@ -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,

View File

@ -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) {

View File

@ -177,7 +177,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" PTS:%s T:%f POS:%s",
(int64_t)setpts->var_values[VAR_N],
d2istr(setpts->var_values[VAR_PTS]),
@ -185,16 +185,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
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;

View File

@ -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);

View File

@ -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;

View File

@ -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)
{
@ -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
@ -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")){
@ -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);
@ -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;
}
@ -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) {
@ -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);
@ -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,
@ -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;

View File

@ -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, \
@ -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,
@ -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;
@ -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);
@ -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) {
@ -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);
}
@ -1151,7 +1150,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*(avi->io_fsize>0) + (uint64_t)size > avi->fsize || d[0] > 127)
continue;
@ -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;
@ -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,
@ -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;
@ -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
@ -1690,7 +1689,7 @@ 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);
@ -1698,7 +1697,7 @@ static int avi_load_index(AVFormatContext *s)
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,
@ -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) {

View File

@ -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 */
@ -888,7 +888,7 @@ skip:
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)
@ -1017,7 +1017,7 @@ retry_duration:
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);
}
}

View File

@ -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]);
}

View File

@ -559,7 +559,7 @@ static int process_line(URLContext *h, char *line, int line_count,
p++;
s->http_code = strtol(p, &end, 10);
av_log(h, AV_LOG_DEBUG, "http_code=%d\n", s->http_code);
av_log(h, AV_LOG_TRACE, "http_code=%d\n", s->http_code);
if ((ret = check_http_code(h, s->http_code, end)) < 0)
return ret;
@ -748,7 +748,7 @@ static int http_read_header(URLContext *h, int *new_location)
if ((err = http_get_line(s, line, sizeof(line))) < 0)
return err;
av_log(h, AV_LOG_DEBUG, "header='%s'\n", line);
av_log(h, AV_LOG_TRACE, "header='%s'\n", line);
err = process_line(h, line, s->line_count, new_location);
if (err < 0)
@ -1020,7 +1020,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)

View File

@ -147,7 +147,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
s->audio_frame_count +=
(s->audio_chunk_size - 6 - s->audio_channels) / s->audio_channels;
av_dlog(NULL, "sending audio frame with pts %"PRId64" (%d audio frames)\n",
av_log(NULL, AV_LOG_TRACE, "sending audio frame with pts %"PRId64" (%d audio frames)\n",
pkt->pts, s->audio_frame_count);
chunk_type = CHUNK_VIDEO;
@ -196,7 +196,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
pkt->stream_index = s->video_stream_index;
pkt->pts = s->video_pts;
av_dlog(NULL, "sending video frame with pts %"PRId64"\n", pkt->pts);
av_log(NULL, AV_LOG_TRACE, "sending video frame with pts %"PRId64"\n", pkt->pts);
s->video_pts += s->frame_pts_inc;
@ -245,36 +245,36 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
chunk_size = AV_RL16(&chunk_preamble[0]);
chunk_type = AV_RL16(&chunk_preamble[2]);
av_dlog(NULL, "chunk type 0x%04X, 0x%04X bytes: ", chunk_type, chunk_size);
av_log(NULL, AV_LOG_TRACE, "chunk type 0x%04X, 0x%04X bytes: ", chunk_type, chunk_size);
switch (chunk_type) {
case CHUNK_INIT_AUDIO:
av_dlog(NULL, "initialize audio\n");
av_log(NULL, AV_LOG_TRACE, "initialize audio\n");
break;
case CHUNK_AUDIO_ONLY:
av_dlog(NULL, "audio only\n");
av_log(NULL, AV_LOG_TRACE, "audio only\n");
break;
case CHUNK_INIT_VIDEO:
av_dlog(NULL, "initialize video\n");
av_log(NULL, AV_LOG_TRACE, "initialize video\n");
break;
case CHUNK_VIDEO:
av_dlog(NULL, "video (and audio)\n");
av_log(NULL, AV_LOG_TRACE, "video (and audio)\n");
break;
case CHUNK_SHUTDOWN:
av_dlog(NULL, "shutdown\n");
av_log(NULL, AV_LOG_TRACE, "shutdown\n");
break;
case CHUNK_END:
av_dlog(NULL, "end\n");
av_log(NULL, AV_LOG_TRACE, "end\n");
break;
default:
av_dlog(NULL, "invalid chunk\n");
av_log(NULL, AV_LOG_TRACE, "invalid chunk\n");
chunk_type = CHUNK_BAD;
break;
@ -300,29 +300,29 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
chunk_size -= OPCODE_PREAMBLE_SIZE;
chunk_size -= opcode_size;
if (chunk_size < 0) {
av_dlog(NULL, "chunk_size countdown just went negative\n");
av_log(NULL, AV_LOG_TRACE, "chunk_size countdown just went negative\n");
chunk_type = CHUNK_BAD;
break;
}
av_dlog(NULL, " opcode type %02X, version %d, 0x%04X bytes: ",
av_log(NULL, AV_LOG_TRACE, " opcode type %02X, version %d, 0x%04X bytes: ",
opcode_type, opcode_version, opcode_size);
switch (opcode_type) {
case OPCODE_END_OF_STREAM:
av_dlog(NULL, "end of stream\n");
av_log(NULL, AV_LOG_TRACE, "end of stream\n");
avio_skip(pb, opcode_size);
break;
case OPCODE_END_OF_CHUNK:
av_dlog(NULL, "end of chunk\n");
av_log(NULL, AV_LOG_TRACE, "end of chunk\n");
avio_skip(pb, opcode_size);
break;
case OPCODE_CREATE_TIMER:
av_dlog(NULL, "create timer\n");
av_log(NULL, AV_LOG_TRACE, "create timer\n");
if ((opcode_version > 0) || (opcode_size != 6)) {
av_dlog(NULL, "bad create_timer opcode\n");
av_log(NULL, AV_LOG_TRACE, "bad create_timer opcode\n");
chunk_type = CHUNK_BAD;
break;
}
@ -332,15 +332,15 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
break;
}
s->frame_pts_inc = ((uint64_t)AV_RL32(&scratch[0])) * AV_RL16(&scratch[4]);
av_dlog(NULL, " %.2f frames/second (timer div = %d, subdiv = %d)\n",
av_log(NULL, AV_LOG_TRACE, " %.2f frames/second (timer div = %d, subdiv = %d)\n",
1000000.0 / s->frame_pts_inc, AV_RL32(&scratch[0]),
AV_RL16(&scratch[4]));
break;
case OPCODE_INIT_AUDIO_BUFFERS:
av_dlog(NULL, "initialize audio buffers\n");
av_log(NULL, AV_LOG_TRACE, "initialize audio buffers\n");
if (opcode_version > 1 || opcode_size > 10 || opcode_size < 6) {
av_dlog(NULL, "bad init_audio_buffers opcode\n");
av_log(NULL, AV_LOG_TRACE, "bad init_audio_buffers opcode\n");
chunk_type = CHUNK_BAD;
break;
}
@ -362,7 +362,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
s->audio_type = AV_CODEC_ID_PCM_S16LE;
else
s->audio_type = AV_CODEC_ID_PCM_U8;
av_dlog(NULL, "audio: %d bits, %d Hz, %s, %s format\n",
av_log(NULL, AV_LOG_TRACE, "audio: %d bits, %d Hz, %s, %s format\n",
s->audio_bits, s->audio_sample_rate,
(s->audio_channels == 2) ? "stereo" : "mono",
(s->audio_type == AV_CODEC_ID_INTERPLAY_DPCM) ?
@ -370,16 +370,16 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
break;
case OPCODE_START_STOP_AUDIO:
av_dlog(NULL, "start/stop audio\n");
av_log(NULL, AV_LOG_TRACE, "start/stop audio\n");
avio_skip(pb, opcode_size);
break;
case OPCODE_INIT_VIDEO_BUFFERS:
av_dlog(NULL, "initialize video buffers\n");
av_log(NULL, AV_LOG_TRACE, "initialize video buffers\n");
if ((opcode_version > 2) || (opcode_size > 8) || opcode_size < 4
|| opcode_version == 2 && opcode_size < 8
) {
av_dlog(NULL, "bad init_video_buffers opcode\n");
av_log(NULL, AV_LOG_TRACE, "bad init_video_buffers opcode\n");
chunk_type = CHUNK_BAD;
break;
}
@ -403,7 +403,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
} else {
s->video_bpp = 16;
}
av_dlog(NULL, "video resolution: %d x %d\n",
av_log(NULL, AV_LOG_TRACE, "video resolution: %d x %d\n",
s->video_width, s->video_height);
break;
@ -414,17 +414,17 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
case OPCODE_UNKNOWN_13:
case OPCODE_UNKNOWN_14:
case OPCODE_UNKNOWN_15:
av_dlog(NULL, "unknown (but documented) opcode %02X\n", opcode_type);
av_log(NULL, AV_LOG_TRACE, "unknown (but documented) opcode %02X\n", opcode_type);
avio_skip(pb, opcode_size);
break;
case OPCODE_SEND_BUFFER:
av_dlog(NULL, "send buffer\n");
av_log(NULL, AV_LOG_TRACE, "send buffer\n");
avio_skip(pb, opcode_size);
break;
case OPCODE_AUDIO_FRAME:
av_dlog(NULL, "audio frame\n");
av_log(NULL, AV_LOG_TRACE, "audio frame\n");
/* log position and move on for now */
s->audio_chunk_offset = avio_tell(pb);
@ -433,26 +433,26 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
break;
case OPCODE_SILENCE_FRAME:
av_dlog(NULL, "silence frame\n");
av_log(NULL, AV_LOG_TRACE, "silence frame\n");
avio_skip(pb, opcode_size);
break;
case OPCODE_INIT_VIDEO_MODE:
av_dlog(NULL, "initialize video mode\n");
av_log(NULL, AV_LOG_TRACE, "initialize video mode\n");
avio_skip(pb, opcode_size);
break;
case OPCODE_CREATE_GRADIENT:
av_dlog(NULL, "create gradient\n");
av_log(NULL, AV_LOG_TRACE, "create gradient\n");
avio_skip(pb, opcode_size);
break;
case OPCODE_SET_PALETTE:
av_dlog(NULL, "set palette\n");
av_log(NULL, AV_LOG_TRACE, "set palette\n");
/* check for the logical maximum palette size
* (3 * 256 + 4 bytes) */
if (opcode_size > 0x304 || opcode_size < 4) {
av_dlog(NULL, "demux_ipmovie: set_palette opcode with invalid size\n");
av_log(NULL, AV_LOG_TRACE, "demux_ipmovie: set_palette opcode with invalid size\n");
chunk_type = CHUNK_BAD;
break;
}
@ -467,7 +467,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
/* sanity check (since they are 16 bit values) */
if ( (first_color > 0xFF) || (last_color > 0xFF)
|| (last_color - first_color + 1)*3 + 4 > opcode_size) {
av_dlog(NULL, "demux_ipmovie: set_palette indexes out of range (%d -> %d)\n",
av_log(NULL, AV_LOG_TRACE, "demux_ipmovie: set_palette indexes out of range (%d -> %d)\n",
first_color, last_color);
chunk_type = CHUNK_BAD;
break;
@ -486,12 +486,12 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
break;
case OPCODE_SET_PALETTE_COMPRESSED:
av_dlog(NULL, "set palette compressed\n");
av_log(NULL, AV_LOG_TRACE, "set palette compressed\n");
avio_skip(pb, opcode_size);
break;
case OPCODE_SET_DECODING_MAP:
av_dlog(NULL, "set decoding map\n");
av_log(NULL, AV_LOG_TRACE, "set decoding map\n");
/* log position and move on for now */
s->decode_map_chunk_offset = avio_tell(pb);
@ -500,7 +500,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
break;
case OPCODE_VIDEO_DATA:
av_dlog(NULL, "set video data\n");
av_log(NULL, AV_LOG_TRACE, "set video data\n");
/* log position and move on for now */
s->video_chunk_offset = avio_tell(pb);
@ -509,7 +509,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
break;
default:
av_dlog(NULL, "*** unknown opcode type\n");
av_log(NULL, AV_LOG_TRACE, "*** unknown opcode type\n");
chunk_type = CHUNK_BAD;
break;

View File

@ -415,7 +415,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;
}
@ -463,10 +463,10 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);
if (codec_id)
st->codec->codec_id= codec_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);
@ -483,7 +483,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);

View File

@ -124,7 +124,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);
@ -158,7 +158,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);
}
@ -203,7 +203,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;
}
}
@ -291,7 +291,7 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim
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);
@ -305,12 +305,12 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim
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;
}

View File

@ -215,11 +215,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)
@ -279,7 +279,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) {
@ -358,7 +358,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;
}
}
@ -384,7 +384,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;
}
}
@ -561,7 +561,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;
@ -578,11 +578,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;
}
@ -615,12 +615,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;
}
}

View File

@ -406,8 +406,8 @@ retry:
av_dict_set(&c->fc->metadata, key2, str, 0);
}
}
av_dlog(c->fc, "lang \"%3s\" ", language);
av_dlog(c->fc, "tag \"%s\" value \"%s\" atom \"%.4s\" %d %"PRId64"\n",
av_log(c->fc, AV_LOG_TRACE, "lang \"%3s\" ", language);
av_log(c->fc, AV_LOG_TRACE, "tag \"%s\" value \"%s\" atom \"%.4s\" %d %"PRId64"\n",
key, str, (char*)&atom.type, str_size_alloc, atom.size);
av_freep(&str);
@ -480,7 +480,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
dref->type = avio_rl32(pb);
avio_rb32(pb); // version + flags
av_dlog(c->fc, "type %.4s size %d\n", (char*)&dref->type, size);
av_log(c->fc, AV_LOG_TRACE, "type %.4s size %d\n", (char*)&dref->type, size);
if (dref->type == MKTAG('a','l','i','s') && size > 150) {
/* macintosh alias record */
@ -577,8 +577,8 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
ctype = avio_rl32(pb);
type = avio_rl32(pb); /* component subtype */
av_dlog(c->fc, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype);
av_dlog(c->fc, "stype= %.4s\n", (char*)&type);
av_log(c->fc, AV_LOG_TRACE, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype);
av_log(c->fc, AV_LOG_TRACE, "stype= %.4s\n", (char*)&type);
if (type == MKTAG('v','i','d','e'))
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
@ -838,7 +838,7 @@ static int mov_read_moof(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
}
c->fragment.moof_offset = c->fragment.implicit_offset = avio_tell(pb) - 8;
av_dlog(c->fc, "moof offset %"PRIx64"\n", c->fragment.moof_offset);
av_log(c->fc, AV_LOG_TRACE, "moof offset %"PRIx64"\n", c->fragment.moof_offset);
return mov_read_default(c, pb, atom);
}
@ -919,7 +919,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
mov_metadata_creation_time(&c->fc->metadata, creation_time);
c->time_scale = avio_rb32(pb); /* time scale */
av_dlog(c->fc, "time scale = %i\n", c->time_scale);
av_log(c->fc, AV_LOG_TRACE, "time scale = %i\n", c->time_scale);
c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */
// set the AVCodecContext duration because the duration of individual tracks
@ -954,7 +954,7 @@ static int mov_read_enda(MOVContext *c, AVIOContext *pb, MOVAtom atom)
st = c->fc->streams[c->fc->nb_streams-1];
little_endian = avio_rb16(pb) & 0xFF;
av_dlog(c->fc, "enda %d\n", little_endian);
av_log(c->fc, AV_LOG_TRACE, "enda %d\n", little_endian);
if (little_endian == 1) {
switch (st->codec->codec_id) {
case AV_CODEC_ID_PCM_S24BE:
@ -998,12 +998,13 @@ static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
color_trc = avio_rb16(pb);
color_matrix = avio_rb16(pb);
av_dlog(c->fc, "%s: pri %d trc %d matrix %d",
color_parameter_type, color_primaries, color_trc, color_matrix);
av_log(c->fc, AV_LOG_TRACE,
"%s: pri %d trc %d matrix %d",
color_parameter_type, color_primaries, color_trc, color_matrix);
if (!strncmp(color_parameter_type, "nclx", 4)) {
uint8_t color_range = avio_r8(pb) >> 7;
av_dlog(c->fc, " full %"PRIu8"", color_range);
av_log(c->fc, AV_LOG_TRACE, " full %"PRIu8"", color_range);
if (color_range)
st->codec->color_range = AVCOL_RANGE_JPEG;
else
@ -1040,7 +1041,7 @@ static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
case 7: st->codec->colorspace = AVCOL_SPC_SMPTE240M; break;
}
}
av_dlog(c->fc, "\n");
av_log(c->fc, AV_LOG_TRACE, "\n");
return 0;
}
@ -1497,7 +1498,7 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb,
st->codec->bits_per_coded_sample = avio_rb16(pb); /* depth */
color_table_id = avio_rb16(pb); /* colortable id */
av_dlog(c->fc, "depth %d, ctab id %d\n",
av_log(c->fc, AV_LOG_TRACE, "depth %d, ctab id %d\n",
st->codec->bits_per_coded_sample, color_table_id);
/* figure out the palette situation */
color_depth = st->codec->bits_per_coded_sample & 0x1F;
@ -1580,7 +1581,7 @@ static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb,
st->codec->channels = avio_rb16(pb); /* channel count */
st->codec->bits_per_coded_sample = avio_rb16(pb); /* sample size */
av_dlog(c->fc, "audio channels %d\n", st->codec->channels);
av_log(c->fc, AV_LOG_TRACE, "audio channels %d\n", st->codec->channels);
sc->audio_cid = avio_rb16(pb);
avio_rb16(pb); /* packet size = 0 */
@ -1588,7 +1589,7 @@ static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb,
st->codec->sample_rate = ((avio_rb32(pb) >> 16));
// Read QT version 1 fields. In version 0 these do not exist.
av_dlog(c->fc, "version =%d, isom =%d\n", version, c->isom);
av_log(c->fc, AV_LOG_TRACE, "version =%d, isom =%d\n", version, c->isom);
if (!c->isom ||
(compatible_brands && strstr(compatible_brands->value, "qt "))) {
@ -1918,7 +1919,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
id = mov_codec_id(st, format);
av_dlog(c->fc, "size=%"PRId64" 4CC= %c%c%c%c codec_type=%d\n", size,
av_log(c->fc, AV_LOG_TRACE, "size=%"PRId64" 4CC= %c%c%c%c codec_type=%d\n", size,
(format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,
(format >> 24) & 0xff, st->codec->codec_type);
@ -1980,7 +1981,7 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
entries = avio_rb32(pb);
av_dlog(c->fc, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);
av_log(c->fc, AV_LOG_TRACE, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);
if (!entries)
return 0;
@ -2030,7 +2031,7 @@ static int mov_read_stps(MOVContext *c, AVIOContext *pb, MOVAtom atom)
for (i = 0; i < entries && !pb->eof_reached; i++) {
sc->stps_data[i] = avio_rb32(pb);
//av_dlog(c->fc, "stps %d\n", sc->stps_data[i]);
//av_log(c->fc, AV_LOG_TRACE, "stps %d\n", sc->stps_data[i]);
}
sc->stps_count = i;
@ -2057,7 +2058,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
entries = avio_rb32(pb);
av_dlog(c->fc, "keyframe_count = %d\n", entries);
av_log(c->fc, AV_LOG_TRACE, "keyframe_count = %d\n", entries);
if (!entries)
{
@ -2078,7 +2079,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
for (i = 0; i < entries && !pb->eof_reached; i++) {
sc->keyframes[i] = avio_rb32(pb);
//av_dlog(c->fc, "keyframes[]=%d\n", sc->keyframes[i]);
//av_log(c->fc, AV_LOG_TRACE, "keyframes[]=%d\n", sc->keyframes[i]);
}
sc->keyframe_count = i;
@ -2118,7 +2119,7 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
entries = avio_rb32(pb);
av_dlog(c->fc, "sample_size = %d sample_count = %d\n", sc->sample_size, entries);
av_log(c->fc, AV_LOG_TRACE, "sample_size = %d sample_count = %d\n", sc->sample_size, entries);
sc->sample_count = entries;
if (sample_size)
@ -2188,7 +2189,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb24(pb); /* flags */
entries = avio_rb32(pb);
av_dlog(c->fc, "track[%i].stts.entries = %i\n",
av_log(c->fc, AV_LOG_TRACE, "track[%i].stts.entries = %i\n",
c->fc->nb_streams-1, entries);
if (sc->stts_data)
@ -2219,7 +2220,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc->stts_data[i].count= sample_count;
sc->stts_data[i].duration= sample_duration;
av_dlog(c->fc, "sample_count=%d, sample_duration=%d\n",
av_log(c->fc, AV_LOG_TRACE, "sample_count=%d, sample_duration=%d\n",
sample_count, sample_duration);
if ( i+1 == entries
@ -2269,7 +2270,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb24(pb); /* flags */
entries = avio_rb32(pb);
av_dlog(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);
av_log(c->fc, AV_LOG_TRACE, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);
if (!entries)
return 0;
@ -2286,7 +2287,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc->ctts_data[i].count = count;
sc->ctts_data[i].duration= duration;
av_dlog(c->fc, "count=%d, duration=%d\n",
av_log(c->fc, AV_LOG_TRACE, "count=%d, duration=%d\n",
count, duration);
if (FFABS(duration) > (1<<28) && i+2<entries) {
@ -2305,7 +2306,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (pb->eof_reached)
return AVERROR_EOF;
av_dlog(c->fc, "dts shift %d\n", sc->dts_shift);
av_log(c->fc, AV_LOG_TRACE, "dts shift %d\n", sc->dts_shift);
return 0;
}
@ -2484,7 +2485,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
e->size = sample_size;
e->min_distance = distance;
e->flags = keyframe ? AVINDEX_KEYFRAME : 0;
av_dlog(mov->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
av_log(mov->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
"size %d, distance %d, keyframe %d\n", st->index, current_sample,
current_offset, current_dts, sample_size, distance, keyframe);
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->nb_index_entries < 100)
@ -2535,7 +2536,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
total += chunk_count * count;
}
av_dlog(mov->fc, "chunk count %d\n", total);
av_log(mov->fc, AV_LOG_TRACE, "chunk count %d\n", total);
if (total >= UINT_MAX / sizeof(*st->index_entries) - st->nb_index_entries)
return;
if (av_reallocp_array(&st->index_entries,
@ -2582,7 +2583,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
e->size = size;
e->min_distance = 0;
e->flags = AVINDEX_KEYFRAME;
av_dlog(mov->fc, "AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", "
av_log(mov->fc, AV_LOG_TRACE, "AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", "
"size %d, duration %d\n", st->index, i, current_offset, current_dts,
size, samples);
@ -3044,7 +3045,7 @@ static int mov_read_tfhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
"%"PRId64"\n", frag->track_id, frag->implicit_offset);
}
}
av_dlog(c->fc, "frag flags 0x%x\n", frag->flags);
av_log(c->fc, AV_LOG_TRACE, "frag flags 0x%x\n", frag->flags);
return 0;
}
@ -3138,7 +3139,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_r8(pb); /* version */
flags = avio_rb24(pb);
entries = avio_rb32(pb);
av_dlog(c->fc, "flags 0x%x entries %d\n", flags, entries);
av_log(c->fc, AV_LOG_TRACE, "flags 0x%x entries %d\n", flags, entries);
/* Always assume the presence of composition time offsets.
* Without this assumption, for instance, we cannot deal with a track in fragmented movies that meet the following.
@ -3168,7 +3169,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
dts = sc->track_end - sc->time_offset;
offset = frag->base_data_offset + data_offset;
distance = 0;
av_dlog(c->fc, "first sample flags 0x%x\n", first_sample_flags);
av_log(c->fc, AV_LOG_TRACE, "first sample flags 0x%x\n", first_sample_flags);
for (i = 0; i < entries && !pb->eof_reached; i++) {
unsigned sample_size = frag->size;
int sample_flags = i ? frag->flags : first_sample_flags;
@ -3218,7 +3219,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (err < 0) {
av_log(c->fc, AV_LOG_ERROR, "Failed to add index entry\n");
}
av_dlog(c->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
av_log(c->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
"size %d, distance %d, keyframe %d\n", st->index, sc->sample_count+i,
offset, dts, sample_size, distance, keyframe);
distance++;
@ -3332,7 +3333,7 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (!sc->elst_data)
return AVERROR(ENOMEM);
av_dlog(c->fc, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count);
av_log(c->fc, AV_LOG_TRACE, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count);
for (i = 0; i < edit_count && !pb->eof_reached; i++) {
MOVElst *e = &sc->elst_data[i];
@ -3344,7 +3345,7 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
e->time = (int32_t)avio_rb32(pb); /* media time */
}
e->rate = avio_rb32(pb) / 65536.0;
av_dlog(c->fc, "duration=%"PRId64" time=%"PRId64" rate=%f\n",
av_log(c->fc, AV_LOG_TRACE, "duration=%"PRId64" time=%"PRId64" rate=%f\n",
e->duration, e->time, e->rate);
}
sc->elst_count = i;
@ -3576,7 +3577,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
total_size += 8;
}
}
av_dlog(c->fc, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n",
av_log(c->fc, AV_LOG_TRACE, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n",
a.type, (char*)&a.type, (char*)&atom.type, a.size, total_size, atom.size);
if (a.size == 0) {
a.size = atom.size - total_size + 8;
@ -4058,7 +4059,7 @@ static int mov_read_header(AVFormatContext *s)
mov_read_close(s);
return AVERROR_INVALIDDATA;
}
av_dlog(mov->fc, "on_parse_exit_offset=%"PRId64"\n", avio_tell(pb));
av_log(mov->fc, AV_LOG_TRACE, "on_parse_exit_offset=%"PRId64"\n", avio_tell(pb));
if (pb->seekable) {
if (mov->chapter_track > 0)
@ -4187,7 +4188,7 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
if (msc->pb && msc->current_sample < avst->nb_index_entries) {
AVIndexEntry *current_sample = &avst->index_entries[msc->current_sample];
int64_t dts = av_rescale(current_sample->timestamp, AV_TIME_BASE, msc->time_scale);
av_dlog(s, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts);
av_log(s, AV_LOG_TRACE, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts);
if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) ||
(s->pb->seekable &&
((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
@ -4221,7 +4222,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 ||
avio_feof(s->pb))
return AVERROR_EOF;
av_dlog(s, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb));
av_log(s, AV_LOG_TRACE, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb));
goto retry;
}
sc = st->priv_data;
@ -4288,7 +4289,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
goto retry;
pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? AV_PKT_FLAG_KEY : 0;
pkt->pos = sample->pos;
av_dlog(s, "stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n",
av_log(s, AV_LOG_TRACE, "stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n",
pkt->stream_index, pkt->pts, pkt->dts, pkt->pos, pkt->duration);
return 0;
}
@ -4300,13 +4301,13 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp,
int i;
sample = av_index_search_timestamp(st, timestamp, flags);
av_dlog(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample);
av_log(s, AV_LOG_TRACE, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample);
if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp)
sample = 0;
if (sample < 0) /* not sure what to do */
return AVERROR_INVALIDDATA;
sc->current_sample = sample;
av_dlog(s, "stream %d, found sample %d\n", st->index, sc->current_sample);
av_log(s, AV_LOG_TRACE, "stream %d, found sample %d\n", st->index, sc->current_sample);
/* adjust ctts index */
if (sc->ctts_data) {
time_sample = 0;

View File

@ -557,7 +557,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)

View File

@ -625,7 +625,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);
@ -645,7 +645,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 &&
@ -654,7 +654,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);
*ppos = pos;
return dts;

View File

@ -604,7 +604,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index,
id = stream->id;
av_dlog(ctx, "packet ID=%2x PTS=%0.3f\n", id, pts / 90000.0);
av_log(ctx, AV_LOG_TRACE, "packet ID=%2x PTS=%0.3f\n", id, pts / 90000.0);
buf_ptr = buffer;
@ -1012,7 +1012,7 @@ retry:
}
if (best_dts < INT64_MAX) {
av_dlog(ctx, "bumping scr, scr:%f, dts:%f\n",
av_log(ctx, AV_LOG_TRACE, "bumping scr, scr:%f, dts:%f\n",
scr / 90000.0, best_dts / 90000.0);
if (scr >= best_dts + 1 && !ignore_constraints) {
@ -1052,7 +1052,7 @@ retry:
}
if (timestamp_packet) {
av_dlog(ctx, "dts:%f pts:%f scr:%f stream:%d\n",
av_log(ctx, AV_LOG_TRACE, "dts:%f pts:%f scr:%f stream:%d\n",
timestamp_packet->dts / 90000.0,
timestamp_packet->pts / 90000.0,
scr / 90000.0, best_i);
@ -1132,7 +1132,7 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
if (dts != AV_NOPTS_VALUE) dts += preload;
if (pts != AV_NOPTS_VALUE) pts += preload;
av_dlog(ctx, "dts:%f pts:%f flags:%d stream:%d nopts:%d\n",
av_log(ctx, AV_LOG_TRACE, "dts:%f pts:%f flags:%d stream:%d nopts:%d\n",
dts / 90000.0, pts / 90000.0, pkt->flags,
pkt->stream_index, pts != AV_NOPTS_VALUE);
if (!stream->premux_packet)

View File

@ -435,7 +435,7 @@ static MpegTSFilter *mpegts_open_filter(MpegTSContext *ts, unsigned int pid,
{
MpegTSFilter *filter;
av_dlog(ts->stream, "Filter: pid=0x%x\n", pid);
av_log(ts->stream, AV_LOG_TRACE, "Filter: pid=0x%x\n", pid);
if (pid >= NB_PID_MAX || ts->pids[pid])
return NULL;
@ -556,7 +556,7 @@ static int get_packet_size(const uint8_t *buf, int size)
score = analyze(buf, size, TS_PACKET_SIZE, NULL, 0);
dvhs_score = analyze(buf, size, TS_DVHS_PACKET_SIZE, NULL, 0);
fec_score = analyze(buf, size, TS_FEC_PACKET_SIZE, NULL, 0);
av_dlog(NULL, "score: %d, dvhs_score: %d, fec_score: %d \n",
av_log(NULL, AV_LOG_TRACE, "score: %d, dvhs_score: %d, fec_score: %d \n",
score, dvhs_score, fec_score);
if (score > fec_score && score > dvhs_score)
@ -976,7 +976,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
pes->header[2] == 0x01) {
/* it must be an mpeg2 PES stream */
code = pes->header[3] | 0x100;
av_dlog(pes->stream, "pid=%x pes_code=%#x\n", pes->pid,
av_log(pes->stream, AV_LOG_TRACE, "pid=%x pes_code=%#x\n", pes->pid,
code);
if ((pes->st && pes->st->discard == AVDISCARD_ALL &&
@ -1015,7 +1015,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */
pes->state = MPEGTS_PESHEADER;
if (pes->st->codec->codec_id == AV_CODEC_ID_NONE && !pes->st->request_probe) {
av_dlog(pes->stream,
av_log(pes->stream, AV_LOG_TRACE,
"pid=%x stream_type=%x probing\n",
pes->pid,
pes->stream_type);
@ -1552,7 +1552,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
if (desc_end > desc_list_end)
return AVERROR_INVALIDDATA;
av_dlog(fc, "tag: 0x%02x len=%d\n", desc_tag, desc_len);
av_log(fc, AV_LOG_TRACE, "tag: 0x%02x len=%d\n", desc_tag, desc_len);
if ((st->codec->codec_id == AV_CODEC_ID_NONE || st->request_probe > 0) &&
stream_type == STREAM_TYPE_PRIVATE_DATA)
@ -1730,7 +1730,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
break;
case 0x05: /* registration descriptor */
st->codec->codec_tag = bytestream_get_le32(pp);
av_dlog(fc, "reg_desc=%.4s\n", (char *)&st->codec->codec_tag);
av_log(fc, AV_LOG_TRACE, "reg_desc=%.4s\n", (char *)&st->codec->codec_tag);
if (st->codec->codec_id == AV_CODEC_ID_NONE)
mpegts_find_stream_type(st, st->codec->codec_tag, REGD_types);
break;
@ -1799,7 +1799,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
Mp4Descr mp4_descr[MAX_MP4_DESCR_COUNT] = { { 0 } };
int i;
av_dlog(ts->stream, "PMT: len %i\n", section_len);
av_log(ts->stream, AV_LOG_TRACE, "PMT: len %i\n", section_len);
hex_dump_debug(ts->stream, section, section_len);
p_end = section + section_len - 4;
@ -1807,7 +1807,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (parse_section_header(h, &p, p_end) < 0)
return;
av_dlog(ts->stream, "sid=0x%x sec_num=%d/%d version=%d\n",
av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x sec_num=%d/%d version=%d\n",
h->id, h->sec_num, h->last_sec_num, h->version);
if (h->tid != PMT_TID)
@ -1825,7 +1825,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
add_pid_to_pmt(ts, h->id, pcr_pid);
set_pcr_pid(ts->stream, h->id, pcr_pid);
av_dlog(ts->stream, "pcr_pid=0x%x\n", pcr_pid);
av_log(ts->stream, AV_LOG_TRACE, "pcr_pid=0x%x\n", pcr_pid);
program_info_length = get16(&p, p_end);
if (program_info_length < 0)
@ -1836,7 +1836,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
tag = get8(&p, p_end);
len = get8(&p, p_end);
av_dlog(ts->stream, "program tag: 0x%02x len=%d\n", tag, len);
av_log(ts->stream, AV_LOG_TRACE, "program tag: 0x%02x len=%d\n", tag, len);
if (len > program_info_length - 2)
// something else is broken, exit the program_descriptors_loop
@ -1960,7 +1960,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
int sid, pmt_pid;
AVProgram *program;
av_dlog(ts->stream, "PAT:\n");
av_log(ts->stream, AV_LOG_TRACE, "PAT:\n");
hex_dump_debug(ts->stream, section, section_len);
p_end = section + section_len - 4;
@ -1987,7 +1987,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (pmt_pid == ts->current_pid)
break;
av_dlog(ts->stream, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
if (sid == 0x0000) {
/* NIT info */
@ -2032,7 +2032,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
int onid, val, sid, desc_list_len, desc_tag, desc_len, service_type;
char *name, *provider_name;
av_dlog(ts->stream, "SDT:\n");
av_log(ts->stream, AV_LOG_TRACE, "SDT:\n");
hex_dump_debug(ts->stream, section, section_len);
p_end = section + section_len - 4;
@ -2072,7 +2072,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (desc_len < 0 || desc_end > desc_list_end)
break;
av_dlog(ts->stream, "tag: 0x%02x len=%d\n",
av_log(ts->stream, AV_LOG_TRACE, "tag: 0x%02x len=%d\n",
desc_tag, desc_len);
switch (desc_tag) {
@ -2340,7 +2340,7 @@ static int handle_packets(MpegTSContext *ts, int64_t nb_packets)
if (avio_tell(s->pb) != ts->last_pos) {
int i;
av_dlog(ts->stream, "Skipping after seek\n");
av_log(ts->stream, AV_LOG_TRACE, "Skipping after seek\n");
/* seek detected, flush pes buffer */
for (i = 0; i < NB_PID_MAX; i++) {
if (ts->pids[i]) {
@ -2489,7 +2489,7 @@ static int mpegts_read_header(AVFormatContext *s)
ts->auto_guess = 1;
av_dlog(ts->stream, "tuning done\n");
av_log(ts->stream, AV_LOG_TRACE, "tuning done\n");
s->ctx_flags |= AVFMTCTX_NOHEADER;
} else {
@ -2540,7 +2540,7 @@ static int mpegts_read_header(AVFormatContext *s)
s->bit_rate = TS_PACKET_SIZE * 8 * 27e6 / ts->pcr_incr;
st->codec->bit_rate = s->bit_rate;
st->start_time = ts->cur_pcr;
av_dlog(ts->stream, "start=%0.3f pcr=%0.3f incr=%d\n",
av_log(ts->stream, AV_LOG_TRACE, "start=%0.3f pcr=%0.3f incr=%d\n",
st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr);
}

View File

@ -1281,7 +1281,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
do {
p = avpriv_find_start_code(p, buf_end, &state);
av_dlog(s, "nal %d\n", state & 0x1f);
av_log(s, AV_LOG_TRACE, "nal %d\n", state & 0x1f);
if ((state & 0x1f) == 7)
extradd = 0;
} while (p < buf_end && (state & 0x1f) != 9 &&

View File

@ -442,7 +442,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt)
int num, den, i;
int frame_size;
av_dlog(s, "compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
av_log(s, AV_LOG_TRACE, "compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), delay, pkt->size, pkt->stream_index);
if (pkt->duration < 0 && st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
@ -502,7 +502,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt)
return AVERROR(EINVAL);
}
av_dlog(s, "av_write_frame: pts2:%s dts2:%s\n",
av_log(s, AV_LOG_TRACE, "av_write_frame: pts2:%s dts2:%s\n",
av_ts2str(pkt->pts), av_ts2str(pkt->dts));
st->cur_dts = pkt->dts;
st->pts.val = pkt->dts;
@ -876,7 +876,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
if (pkt) {
AVStream *st = s->streams[pkt->stream_index];
av_dlog(s, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",
av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",
pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts));
if ((ret = compute_pkt_fields2(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
goto fail;
@ -886,7 +886,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
goto fail;
}
} else {
av_dlog(s, "av_interleaved_write_frame FLUSH\n");
av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame FLUSH\n");
flush = 1;
}

View File

@ -600,7 +600,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
}
}
av_dlog(mxf->fc,
av_log(mxf->fc, AV_LOG_TRACE,
"PartitionPack: ThisPartition = 0x%"PRIX64
", PreviousPartition = 0x%"PRIX64", "
"FooterPartition = 0x%"PRIX64", IndexSID = %i, BodySID = %i\n",
@ -910,32 +910,32 @@ static int mxf_read_index_table_segment(void *arg, AVIOContext *pb, int tag, int
switch(tag) {
case 0x3F05:
segment->edit_unit_byte_count = avio_rb32(pb);
av_dlog(NULL, "EditUnitByteCount %d\n", segment->edit_unit_byte_count);
av_log(NULL, AV_LOG_TRACE, "EditUnitByteCount %d\n", segment->edit_unit_byte_count);
break;
case 0x3F06:
segment->index_sid = avio_rb32(pb);
av_dlog(NULL, "IndexSID %d\n", segment->index_sid);
av_log(NULL, AV_LOG_TRACE, "IndexSID %d\n", segment->index_sid);
break;
case 0x3F07:
segment->body_sid = avio_rb32(pb);
av_dlog(NULL, "BodySID %d\n", segment->body_sid);
av_log(NULL, AV_LOG_TRACE, "BodySID %d\n", segment->body_sid);
break;
case 0x3F0A:
av_dlog(NULL, "IndexEntryArray found\n");
av_log(NULL, AV_LOG_TRACE, "IndexEntryArray found\n");
return mxf_read_index_entry_array(pb, segment);
case 0x3F0B:
segment->index_edit_rate.num = avio_rb32(pb);
segment->index_edit_rate.den = avio_rb32(pb);
av_dlog(NULL, "IndexEditRate %d/%d\n", segment->index_edit_rate.num,
av_log(NULL, AV_LOG_TRACE, "IndexEditRate %d/%d\n", segment->index_edit_rate.num,
segment->index_edit_rate.den);
break;
case 0x3F0C:
segment->index_start_position = avio_rb64(pb);
av_dlog(NULL, "IndexStartPosition %"PRId64"\n", segment->index_start_position);
av_log(NULL, AV_LOG_TRACE, "IndexStartPosition %"PRId64"\n", segment->index_start_position);
break;
case 0x3F0D:
segment->index_duration = avio_rb64(pb);
av_dlog(NULL, "IndexDuration %"PRId64"\n", segment->index_duration);
av_log(NULL, AV_LOG_TRACE, "IndexDuration %"PRId64"\n", segment->index_duration);
break;
}
return 0;
@ -949,7 +949,7 @@ static void mxf_read_pixel_layout(AVIOContext *pb, MXFDescriptor *descriptor)
do {
code = avio_r8(pb);
value = avio_r8(pb);
av_dlog(NULL, "pixel layout: code %#x\n", code);
av_log(NULL, AV_LOG_TRACE, "pixel layout: code %#x\n", code);
if (ofs <= 14) {
layout[ofs++] = code;
@ -1780,7 +1780,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
MXFPackage *material_package = NULL;
int i, j, k, ret;
av_dlog(mxf->fc, "metadata sets count %d\n", mxf->metadata_sets_count);
av_log(mxf->fc, AV_LOG_TRACE, "metadata sets count %d\n", mxf->metadata_sets_count);
/* TODO: handle multiple material packages (OP3x) */
for (i = 0; i < mxf->packages_count; i++) {
material_package = mxf_resolve_strong_ref(mxf, &mxf->packages_refs[i], MaterialPackage);
@ -1851,7 +1851,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
source_package = mxf_resolve_source_package(mxf, component->source_package_uid);
if (!source_package) {
av_dlog(mxf->fc, "material track %d: no corresponding source package found\n", material_track->track_id);
av_log(mxf->fc, AV_LOG_TRACE, "material track %d: no corresponding source package found\n", material_track->track_id);
break;
}
for (k = 0; k < source_package->tracks_count; k++) {
@ -2272,7 +2272,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
uint64_t next = avio_tell(pb) + size;
UID uid = {0};
av_dlog(mxf->fc, "local tag %#04x size %d\n", tag, size);
av_log(mxf->fc, AV_LOG_TRACE, "local tag %#04x size %d\n", tag, size);
if (!size) { /* ignore empty tag, needed for some files with empty UMID tag */
av_log(mxf->fc, AV_LOG_ERROR, "local tag %#04x with 0 size\n", tag);
continue;
@ -2283,7 +2283,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
int local_tag = AV_RB16(mxf->local_tags+i*18);
if (local_tag == tag) {
memcpy(uid, mxf->local_tags+i*18+2, 16);
av_dlog(mxf->fc, "local tag %#04x\n", local_tag);
av_log(mxf->fc, AV_LOG_TRACE, "local tag %#04x\n", local_tag);
PRINT_KEY(mxf->fc, "uid", uid);
}
}
@ -2379,7 +2379,7 @@ static int mxf_seek_to_previous_partition(MXFContext *mxf)
avio_seek(pb, mxf->run_in + mxf->current_partition->previous_partition, SEEK_SET);
mxf->current_partition = NULL;
av_dlog(mxf->fc, "seeking to previous partition\n");
av_log(mxf->fc, AV_LOG_TRACE, "seeking to previous partition\n");
/* Make sure this is actually a PartitionPack, and if so parse it.
* See deadlock2.mxf
@ -2423,11 +2423,11 @@ static int mxf_parse_handle_essence(MXFContext *mxf)
return mxf_seek_to_previous_partition(mxf);
} else {
if (!mxf->footer_partition) {
av_dlog(mxf->fc, "no FooterPartition\n");
av_log(mxf->fc, AV_LOG_TRACE, "no FooterPartition\n");
return 0;
}
av_dlog(mxf->fc, "seeking to FooterPartition\n");
av_log(mxf->fc, AV_LOG_TRACE, "seeking to FooterPartition\n");
/* remember where we were so we don't end up seeking further back than this */
mxf->last_forward_tell = avio_tell(pb);
@ -2680,7 +2680,7 @@ static int mxf_read_header(AVFormatContext *s)
}
PRINT_KEY(s, "read header", klv.key);
av_dlog(s, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
av_log(s, AV_LOG_TRACE, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) ||
IS_KLV_KEY(klv.key, mxf_essence_element_key) ||
IS_KLV_KEY(klv.key, mxf_avid_essence_element_key) ||
@ -2891,7 +2891,7 @@ static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt)
while ((ret = klv_read_packet(&klv, s->pb)) == 0) {
PRINT_KEY(s, "read packet", klv.key);
av_dlog(s, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
av_log(s, AV_LOG_TRACE, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) {
ret = mxf_decrypt_triplet(s, pkt, &klv);
if (ret < 0) {

View File

@ -2560,7 +2560,7 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket
}
*out = pktl->pkt;
av_dlog(s, "out st:%d dts:%"PRId64"\n", (*out).stream_index, (*out).dts);
av_log(s, AV_LOG_TRACE, "out st:%d dts:%"PRId64"\n", (*out).stream_index, (*out).dts);
s->internal->packet_buffer = pktl->next;
if(s->streams[pktl->pkt.stream_index]->last_in_packet_buffer == pktl)
s->streams[pktl->pkt.stream_index]->last_in_packet_buffer= NULL;

View File

@ -213,7 +213,7 @@ static const AVCodecTag nsv_codec_audio_tags[] = {
static int nsv_read_chunk(AVFormatContext *s, int fill_header);
#define print_tag(str, tag, size) \
av_dlog(NULL, "%s: tag=%c%c%c%c\n", \
av_log(NULL, AV_LOG_TRACE, "%s: tag=%c%c%c%c\n", \
str, tag & 0xff, \
(tag >> 8) & 0xff, \
(tag >> 16) & 0xff, \
@ -227,41 +227,41 @@ static int nsv_resync(AVFormatContext *s)
uint32_t v = 0;
int i;
av_dlog(s, "%s(), offset = %"PRId64", state = %d\n", __FUNCTION__, avio_tell(pb), nsv->state);
av_log(s, AV_LOG_TRACE, "%s(), offset = %"PRId64", state = %d\n", __FUNCTION__, avio_tell(pb), nsv->state);
//nsv->state = NSV_UNSYNC;
for (i = 0; i < NSV_MAX_RESYNC; i++) {
if (avio_feof(pb)) {
av_dlog(s, "NSV EOF\n");
av_log(s, AV_LOG_TRACE, "NSV EOF\n");
nsv->state = NSV_UNSYNC;
return -1;
}
v <<= 8;
v |= avio_r8(pb);
if (i < 8) {
av_dlog(s, "NSV resync: [%d] = %02x\n", i, v & 0x0FF);
av_log(s, AV_LOG_TRACE, "NSV resync: [%d] = %02x\n", i, v & 0x0FF);
}
if ((v & 0x0000ffff) == 0xefbe) { /* BEEF */
av_dlog(s, "NSV resynced on BEEF after %d bytes\n", i+1);
av_log(s, AV_LOG_TRACE, "NSV resynced on BEEF after %d bytes\n", i+1);
nsv->state = NSV_FOUND_BEEF;
return 0;
}
/* we read as big-endian, thus the MK*BE* */
if (v == TB_NSVF) { /* NSVf */
av_dlog(s, "NSV resynced on NSVf after %d bytes\n", i+1);
av_log(s, AV_LOG_TRACE, "NSV resynced on NSVf after %d bytes\n", i+1);
nsv->state = NSV_FOUND_NSVF;
return 0;
}
if (v == MKBETAG('N', 'S', 'V', 's')) { /* NSVs */
av_dlog(s, "NSV resynced on NSVs after %d bytes\n", i+1);
av_log(s, AV_LOG_TRACE, "NSV resynced on NSVs after %d bytes\n", i+1);
nsv->state = NSV_FOUND_NSVS;
return 0;
}
}
av_dlog(s, "NSV sync lost\n");
av_log(s, AV_LOG_TRACE, "NSV sync lost\n");
return -1;
}
@ -276,7 +276,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
int table_entries;
int table_entries_used;
av_dlog(s, "%s()\n", __FUNCTION__);
av_log(s, AV_LOG_TRACE, "%s()\n", __FUNCTION__);
nsv->state = NSV_UNSYNC; /* in case we fail */
@ -287,22 +287,22 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
//s->file_size = (uint32_t)avio_rl32(pb);
file_size = (uint32_t)avio_rl32(pb);
av_dlog(s, "NSV NSVf chunk_size %u\n", size);
av_dlog(s, "NSV NSVf file_size %u\n", file_size);
av_log(s, AV_LOG_TRACE, "NSV NSVf chunk_size %u\n", size);
av_log(s, AV_LOG_TRACE, "NSV NSVf file_size %u\n", file_size);
nsv->duration = duration = avio_rl32(pb); /* in ms */
av_dlog(s, "NSV NSVf duration %"PRId64" ms\n", duration);
av_log(s, AV_LOG_TRACE, "NSV NSVf duration %"PRId64" ms\n", duration);
// XXX: store it in AVStreams
strings_size = avio_rl32(pb);
table_entries = avio_rl32(pb);
table_entries_used = avio_rl32(pb);
av_dlog(s, "NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",
av_log(s, AV_LOG_TRACE, "NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",
strings_size, table_entries, table_entries_used);
if (avio_feof(pb))
return -1;
av_dlog(s, "NSV got header; filepos %"PRId64"\n", avio_tell(pb));
av_log(s, AV_LOG_TRACE, "NSV got header; filepos %"PRId64"\n", avio_tell(pb));
if (strings_size > 0) {
char *strings; /* last byte will be '\0' to play safe with str*() */
@ -331,7 +331,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
if (!p || p >= endp)
break;
*p++ = '\0';
av_dlog(s, "NSV NSVf INFO: %s='%s'\n", token, value);
av_log(s, AV_LOG_TRACE, "NSV NSVf INFO: %s='%s'\n", token, value);
av_dict_set(&s->metadata, token, value, 0);
}
av_free(strings);
@ -339,7 +339,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
if (avio_feof(pb))
return -1;
av_dlog(s, "NSV got infos; filepos %"PRId64"\n", avio_tell(pb));
av_log(s, AV_LOG_TRACE, "NSV got infos; filepos %"PRId64"\n", avio_tell(pb));
if (table_entries_used > 0) {
int i;
@ -364,7 +364,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
}
}
av_dlog(s, "NSV got index; filepos %"PRId64"\n", avio_tell(pb));
av_log(s, AV_LOG_TRACE, "NSV got index; filepos %"PRId64"\n", avio_tell(pb));
avio_seek(pb, nsv->base_offset + size, SEEK_SET); /* required for dumbdriving-271.nsv (2 extra bytes) */
@ -384,7 +384,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s)
int i;
AVStream *st;
NSVStream *nst;
av_dlog(s, "%s()\n", __FUNCTION__);
av_log(s, AV_LOG_TRACE, "%s()\n", __FUNCTION__);
vtag = avio_rl32(pb);
atag = avio_rl32(pb);
@ -392,7 +392,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s)
vheight = avio_rl16(pb);
i = avio_r8(pb);
av_dlog(s, "NSV NSVs framerate code %2x\n", i);
av_log(s, AV_LOG_TRACE, "NSV NSVs framerate code %2x\n", i);
if(i&0x80) { /* odd way of giving native framerates from docs */
int t=(i & 0x7F)>>2;
if(t<16) framerate = (AVRational){1, t+1};
@ -415,7 +415,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s)
print_tag("NSV NSVs vtag", vtag, 0);
print_tag("NSV NSVs atag", atag, 0);
av_dlog(s, "NSV NSVs vsize %dx%d\n", vwidth, vheight);
av_log(s, AV_LOG_TRACE, "NSV NSVs vsize %dx%d\n", vwidth, vheight);
/* XXX change to ap != NULL ? */
if (s->nb_streams == 0) { /* streams not yet published, let's do that */
@ -478,7 +478,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s)
}
} else {
if (nsv->vtag != vtag || nsv->atag != atag || nsv->vwidth != vwidth || nsv->vheight != vwidth) {
av_dlog(s, "NSV NSVs header values differ from the first one!!!\n");
av_log(s, AV_LOG_TRACE, "NSV NSVs header values differ from the first one!!!\n");
//return -1;
}
}
@ -496,8 +496,8 @@ static int nsv_read_header(AVFormatContext *s)
NSVContext *nsv = s->priv_data;
int i, err;
av_dlog(s, "%s()\n", __FUNCTION__);
av_dlog(s, "filename '%s'\n", s->filename);
av_log(s, AV_LOG_TRACE, "%s()\n", __FUNCTION__);
av_log(s, AV_LOG_TRACE, "filename '%s'\n", s->filename);
nsv->state = NSV_UNSYNC;
nsv->ahead[0].data = nsv->ahead[1].data = NULL;
@ -523,7 +523,7 @@ static int nsv_read_header(AVFormatContext *s)
/* now read the first chunk, so we can attempt to decode more info */
err = nsv_read_chunk(s, 1);
av_dlog(s, "parsed header\n");
av_log(s, AV_LOG_TRACE, "parsed header\n");
return err;
}
@ -541,7 +541,7 @@ static int nsv_read_chunk(AVFormatContext *s, int fill_header)
uint16_t auxsize;
int ret;
av_dlog(s, "%s(%d)\n", __FUNCTION__, fill_header);
av_log(s, AV_LOG_TRACE, "%s(%d)\n", __FUNCTION__, fill_header);
if (nsv->ahead[0].data || nsv->ahead[1].data)
return 0; //-1; /* hey! eat what you've in your plate first! */
@ -566,13 +566,13 @@ null_chunk_retry:
asize = avio_rl16(pb);
vsize = (vsize << 4) | (auxcount >> 4);
auxcount &= 0x0f;
av_dlog(s, "NSV CHUNK %d aux, %u bytes video, %d bytes audio\n", auxcount, vsize, asize);
av_log(s, AV_LOG_TRACE, "NSV CHUNK %d aux, %u bytes video, %d bytes audio\n", auxcount, vsize, asize);
/* skip aux stuff */
for (i = 0; i < auxcount; i++) {
uint32_t av_unused auxtag;
auxsize = avio_rl16(pb);
auxtag = avio_rl32(pb);
av_dlog(s, "NSV aux data: '%c%c%c%c', %d bytes\n",
av_log(s, AV_LOG_TRACE, "NSV aux data: '%c%c%c%c', %d bytes\n",
(auxtag & 0x0ff),
((auxtag >> 8) & 0x0ff),
((auxtag >> 16) & 0x0ff),
@ -604,7 +604,7 @@ null_chunk_retry:
pkt->dts = nst->frame_offset;
pkt->flags |= nsv->state == NSV_HAS_READ_NSVS ? AV_PKT_FLAG_KEY : 0; /* keyframe only likely on a sync frame */
for (i = 0; i < FFMIN(8, vsize); i++)
av_dlog(s, "NSV video: [%d] = %02x\n", i, pkt->data[i]);
av_log(s, AV_LOG_TRACE, "NSV video: [%d] = %02x\n", i, pkt->data[i]);
}
if(st[NSV_ST_VIDEO])
((NSVStream*)st[NSV_ST_VIDEO]->priv_data)->frame_offset++;
@ -624,11 +624,11 @@ null_chunk_retry:
if (!channels || !samplerate)
return AVERROR_INVALIDDATA;
asize-=4;
av_dlog(s, "NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate);
av_log(s, AV_LOG_TRACE, "NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate);
if (fill_header) {
st[NSV_ST_AUDIO]->need_parsing = AVSTREAM_PARSE_NONE; /* we know everything */
if (bps != 16) {
av_dlog(s, "NSV AUDIO bit/sample != 16 (%d)!!!\n", bps);
av_log(s, AV_LOG_TRACE, "NSV AUDIO bit/sample != 16 (%d)!!!\n", bps);
}
bps /= channels; // ???
if (bps == 8)
@ -637,7 +637,7 @@ null_chunk_retry:
channels = 1;
st[NSV_ST_AUDIO]->codec->channels = channels;
st[NSV_ST_AUDIO]->codec->sample_rate = samplerate;
av_dlog(s, "NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate);
av_log(s, AV_LOG_TRACE, "NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate);
}
}
if ((ret = av_get_packet(pb, pkt, asize)) < 0)
@ -649,7 +649,7 @@ null_chunk_retry:
pkt->dts = (((NSVStream*)st[NSV_ST_VIDEO]->priv_data)->frame_offset-1);
pkt->dts *= (int64_t)1000 * nsv->framerate.den;
pkt->dts += (int64_t)nsv->avsync * nsv->framerate.num;
av_dlog(s, "NSV AUDIO: sync:%d, dts:%"PRId64, nsv->avsync, pkt->dts);
av_log(s, AV_LOG_TRACE, "NSV AUDIO: sync:%d, dts:%"PRId64, nsv->avsync, pkt->dts);
}
nst->frame_offset++;
}
@ -664,7 +664,7 @@ static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt)
NSVContext *nsv = s->priv_data;
int i, err = 0;
av_dlog(s, "%s()\n", __FUNCTION__);
av_log(s, AV_LOG_TRACE, "%s()\n", __FUNCTION__);
/* in case we don't already have something to eat ... */
if (!nsv->ahead[0].data && !nsv->ahead[1].data)
@ -675,7 +675,7 @@ static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt)
/* now pick one of the plates */
for (i = 0; i < 2; i++) {
if (nsv->ahead[i].data) {
av_dlog(s, "%s: using cached packet[%d]\n", __FUNCTION__, i);
av_log(s, AV_LOG_TRACE, "%s: using cached packet[%d]\n", __FUNCTION__, i);
/* avoid the cost of new_packet + memcpy(->data) */
memcpy(pkt, &nsv->ahead[i], sizeof(AVPacket));
nsv->ahead[i].data = NULL; /* we ate that one */
@ -723,7 +723,7 @@ static int nsv_probe(AVProbeData *p)
{
int i, score = 0;
av_dlog(NULL, "nsv_probe(), buf_size %d\n", p->buf_size);
av_log(NULL, AV_LOG_TRACE, "nsv_probe(), buf_size %d\n", p->buf_size);
/* check file header */
/* streamed files might not have any header */
if (p->buf[0] == 'N' && p->buf[1] == 'S' &&

View File

@ -455,7 +455,7 @@ static int ogg_packet(AVFormatContext *s, int *sid, int *dstart, int *dsize,
int complete = 0;
int segp = 0, psize = 0;
av_dlog(s, "ogg_packet: curidx=%i\n", ogg->curidx);
av_log(s, AV_LOG_TRACE, "ogg_packet: curidx=%i\n", ogg->curidx);
if (sid)
*sid = -1;
@ -470,7 +470,7 @@ static int ogg_packet(AVFormatContext *s, int *sid, int *dstart, int *dsize,
os = ogg->streams + idx;
av_dlog(s, "ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n",
av_log(s, AV_LOG_TRACE, "ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n",
idx, os->pstart, os->psize, os->segp, os->nsegs);
if (!os->codec) {
@ -685,7 +685,7 @@ static int ogg_read_header(AVFormatContext *s)
return ret;
}
} while (!ogg->headers);
av_dlog(s, "found headers\n");
av_log(s, AV_LOG_TRACE, "found headers\n");
for (i = 0; i < ogg->nstreams; i++) {
struct ogg_stream *os = ogg->streams + i;

View File

@ -44,7 +44,7 @@ static int read_atom(AVFormatContext *s, Atom *atom)
if (atom->size < 8)
return -1;
atom->tag = avio_rl32(s->pb);
av_dlog(s, "atom %u %.4s offset %#"PRIx64"\n",
av_log(s, AV_LOG_TRACE, "atom %u %.4s offset %#"PRIx64"\n",
atom->size, (char*)&atom->tag, atom->offset);
return atom->size;
}
@ -64,16 +64,16 @@ static int r3d_read_red1(AVFormatContext *s)
tmp = avio_r8(s->pb); // major version
tmp2 = avio_r8(s->pb); // minor version
av_dlog(s, "version %d.%d\n", tmp, tmp2);
av_log(s, AV_LOG_TRACE, "version %d.%d\n", tmp, tmp2);
tmp = avio_rb16(s->pb); // unknown
av_dlog(s, "unknown1 %d\n", tmp);
av_log(s, AV_LOG_TRACE, "unknown1 %d\n", tmp);
tmp = avio_rb32(s->pb);
avpriv_set_pts_info(st, 32, 1, tmp);
tmp = avio_rb32(s->pb); // filenum
av_dlog(s, "filenum %d\n", tmp);
av_log(s, AV_LOG_TRACE, "filenum %d\n", tmp);
avio_skip(s->pb, 32); // unknown
@ -81,7 +81,7 @@ static int r3d_read_red1(AVFormatContext *s)
st->codec->height = avio_rb32(s->pb);
tmp = avio_rb16(s->pb); // unknown
av_dlog(s, "unknown2 %d\n", tmp);
av_log(s, AV_LOG_TRACE, "unknown2 %d\n", tmp);
framerate.num = avio_rb16(s->pb);
framerate.den = avio_rb16(s->pb);
@ -93,7 +93,7 @@ static int r3d_read_red1(AVFormatContext *s)
}
tmp = avio_r8(s->pb); // audio channels
av_dlog(s, "audio channels %d\n", tmp);
av_log(s, AV_LOG_TRACE, "audio channels %d\n", tmp);
if (tmp > 0) {
AVStream *ast = avformat_new_stream(s, NULL);
if (!ast)
@ -108,10 +108,10 @@ static int r3d_read_red1(AVFormatContext *s)
filename[sizeof(filename)-1] = 0;
av_dict_set(&st->metadata, "filename", filename, 0);
av_dlog(s, "filename %s\n", filename);
av_dlog(s, "resolution %dx%d\n", st->codec->width, st->codec->height);
av_dlog(s, "timescale %d\n", st->time_base.den);
av_dlog(s, "frame rate %d/%d\n",
av_log(s, AV_LOG_TRACE, "filename %s\n", filename);
av_log(s, AV_LOG_TRACE, "resolution %dx%d\n", st->codec->width, st->codec->height);
av_log(s, AV_LOG_TRACE, "timescale %d\n", st->time_base.den);
av_log(s, AV_LOG_TRACE, "frame rate %d/%d\n",
framerate.num, framerate.den);
return 0;
@ -134,14 +134,14 @@ static int r3d_read_rdvo(AVFormatContext *s, Atom *atom)
r3d->video_offsets_count = i;
break;
}
av_dlog(s, "video offset %d: %#x\n", i, r3d->video_offsets[i]);
av_log(s, AV_LOG_TRACE, "video offset %d: %#x\n", i, r3d->video_offsets[i]);
}
if (st->avg_frame_rate.num)
st->duration = av_rescale_q(r3d->video_offsets_count,
av_inv_q(st->avg_frame_rate),
st->time_base);
av_dlog(s, "duration %"PRId64"\n", st->duration);
av_log(s, AV_LOG_TRACE, "duration %"PRId64"\n", st->duration);
return 0;
}
@ -157,10 +157,10 @@ static void r3d_read_reos(AVFormatContext *s)
avio_rb32(s->pb); // rdas offset
tmp = avio_rb32(s->pb);
av_dlog(s, "num video chunks %d\n", tmp);
av_log(s, AV_LOG_TRACE, "num video chunks %d\n", tmp);
tmp = avio_rb32(s->pb);
av_dlog(s, "num audio chunks %d\n", tmp);
av_log(s, AV_LOG_TRACE, "num audio chunks %d\n", tmp);
avio_skip(s->pb, 6*4);
}
@ -186,7 +186,7 @@ static int r3d_read_header(AVFormatContext *s)
}
s->internal->data_offset = avio_tell(s->pb);
av_dlog(s, "data offset %#"PRIx64"\n", s->internal->data_offset);
av_log(s, AV_LOG_TRACE, "data offset %#"PRIx64"\n", s->internal->data_offset);
if (!s->pb->seekable)
return 0;
// find REOB/REOF/REOS to load index
@ -228,29 +228,29 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom)
dts = avio_rb32(s->pb);
tmp = avio_rb32(s->pb);
av_dlog(s, "frame num %d\n", tmp);
av_log(s, AV_LOG_TRACE, "frame num %d\n", tmp);
tmp = avio_r8(s->pb); // major version
tmp2 = avio_r8(s->pb); // minor version
av_dlog(s, "version %d.%d\n", tmp, tmp2);
av_log(s, AV_LOG_TRACE, "version %d.%d\n", tmp, tmp2);
tmp = avio_rb16(s->pb); // unknown
av_dlog(s, "unknown %d\n", tmp);
av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
if (tmp > 4) {
tmp = avio_rb16(s->pb); // unknown
av_dlog(s, "unknown %d\n", tmp);
av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
tmp = avio_rb16(s->pb); // unknown
av_dlog(s, "unknown %d\n", tmp);
av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
tmp = avio_rb32(s->pb);
av_dlog(s, "width %d\n", tmp);
av_log(s, AV_LOG_TRACE, "width %d\n", tmp);
tmp = avio_rb32(s->pb);
av_dlog(s, "height %d\n", tmp);
av_log(s, AV_LOG_TRACE, "height %d\n", tmp);
tmp = avio_rb32(s->pb);
av_dlog(s, "metadata len %d\n", tmp);
av_log(s, AV_LOG_TRACE, "metadata len %d\n", tmp);
}
tmp = atom->size - 8 - (avio_tell(s->pb) - pos);
if (tmp < 0)
@ -266,7 +266,7 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom)
if (st->avg_frame_rate.num)
pkt->duration = (uint64_t)st->time_base.den*
st->avg_frame_rate.den/st->avg_frame_rate.num;
av_dlog(s, "pkt dts %"PRId64" duration %d\n", pkt->dts, pkt->duration);
av_log(s, AV_LOG_TRACE, "pkt dts %"PRId64" duration %d\n", pkt->dts, pkt->duration);
return 0;
}
@ -291,17 +291,17 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
samples = avio_rb32(s->pb);
tmp = avio_rb32(s->pb);
av_dlog(s, "packet num %d\n", tmp);
av_log(s, AV_LOG_TRACE, "packet num %d\n", tmp);
tmp = avio_rb16(s->pb); // unknown
av_dlog(s, "unknown %d\n", tmp);
av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
tmp = avio_r8(s->pb); // major version
tmp2 = avio_r8(s->pb); // minor version
av_dlog(s, "version %d.%d\n", tmp, tmp2);
av_log(s, AV_LOG_TRACE, "version %d.%d\n", tmp, tmp2);
tmp = avio_rb32(s->pb); // unknown
av_dlog(s, "unknown %d\n", tmp);
av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
size = atom->size - 8 - (avio_tell(s->pb) - pos);
if (size < 0)
@ -316,7 +316,7 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
pkt->dts = dts;
if (st->codec->sample_rate)
pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate);
av_dlog(s, "pkt dts %"PRId64" duration %d samples %d sample rate %d\n",
av_log(s, AV_LOG_TRACE, "pkt dts %"PRId64" duration %d samples %d sample rate %d\n",
pkt->dts, pkt->duration, samples, st->codec->sample_rate);
return 0;
@ -373,7 +373,7 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i
frame_num = av_rescale_q(sample_time, st->time_base,
av_inv_q(st->avg_frame_rate));
av_dlog(s, "seek frame num %d timestamp %"PRId64"\n",
av_log(s, AV_LOG_TRACE, "seek frame num %d timestamp %"PRId64"\n",
frame_num, sample_time);
if (frame_num < r3d->video_offsets_count) {

View File

@ -391,7 +391,7 @@ int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb,
st->codec->codec_tag = avio_rl32(pb);
st->codec->codec_id = ff_codec_get_id(ff_rm_codec_tags,
st->codec->codec_tag);
av_dlog(s, "%X %X\n", st->codec->codec_tag, MKTAG('R', 'V', '2', '0'));
av_log(s, AV_LOG_TRACE, "%X %X\n", st->codec->codec_tag, MKTAG('R', 'V', '2', '0'));
if (st->codec->codec_id == AV_CODEC_ID_NONE)
goto fail1;
st->codec->width = avio_rb16(pb);
@ -532,7 +532,7 @@ static int rm_read_header(AVFormatContext *s)
tag = avio_rl32(pb);
tag_size = avio_rb32(pb);
avio_rb16(pb);
av_dlog(s, "tag=%c%c%c%c (%08x) size=%d\n",
av_log(s, AV_LOG_TRACE, "tag=%c%c%c%c (%08x) size=%d\n",
(tag ) & 0xff,
(tag >> 8) & 0xff,
(tag >> 16) & 0xff,
@ -1079,7 +1079,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
}
if((flags&2) && (seq&0x7F) == 1){
av_dlog(s, "%d %d-%d %"PRId64" %d\n",
av_log(s, AV_LOG_TRACE, "%d %d-%d %"PRId64" %d\n",
flags, stream_index2, stream_index, dts, seq);
av_add_index_entry(st, pos, dts, 0, 0, AVINDEX_KEYFRAME);
if(stream_index2 == stream_index)

View File

@ -2315,7 +2315,7 @@ static int rtmp_parse_result(URLContext *s, RTMPContext *rt, RTMPPacket *pkt)
switch (pkt->type) {
case RTMP_PT_BYTES_READ:
av_dlog(s, "received bytes read report\n");
av_log(s, AV_LOG_TRACE, "received bytes read report\n");
break;
case RTMP_PT_CHUNK_SIZE:
if ((ret = handle_chunk_size(s, pkt)) < 0)

View File

@ -362,9 +362,9 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, URLContext *fd,
len = avio_close_dyn_buf(pb, &buf);
if ((len > 0) && buf) {
int av_unused result;
av_dlog(s->ic, "sending %d bytes of RR\n", len);
av_log(s->ic, AV_LOG_TRACE, "sending %d bytes of RR\n", len);
result = ffurl_write(fd, buf, len);
av_dlog(s->ic, "result from ffurl_write: %d\n", result);
av_log(s->ic, AV_LOG_TRACE, "result from ffurl_write: %d\n", result);
av_free(buf);
}
return 0;

View File

@ -55,7 +55,7 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s,
/* profile-id: 0-31 */
if (!strcmp(attr, "profile-id")) {
hevc_data->profile_id = atoi(value);
av_dlog(s, "SDP: found profile-id: %d\n", hevc_data->profile_id);
av_log(s, AV_LOG_TRACE, "SDP: found profile-id: %d\n", hevc_data->profile_id);
}
/* tier-flag: 0-1 */
@ -106,7 +106,7 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s,
if (!strcmp(attr, "sprop-max-don-diff")) {
if (atoi(value) > 0)
hevc_data->using_donl_field = 1;
av_dlog(s, "Found sprop-max-don-diff in SDP, DON field usage is: %d\n",
av_log(s, AV_LOG_TRACE, "Found sprop-max-don-diff in SDP, DON field usage is: %d\n",
hevc_data->using_donl_field);
}
@ -114,7 +114,7 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s,
if (!strcmp(attr, "sprop-depack-buf-nalus")) {
if (atoi(value) > 0)
hevc_data->using_donl_field = 1;
av_dlog(s, "Found sprop-depack-buf-nalus in SDP, DON field usage is: %d\n",
av_log(s, AV_LOG_TRACE, "Found sprop-depack-buf-nalus in SDP, DON field usage is: %d\n",
hevc_data->using_donl_field);
}
@ -309,7 +309,7 @@ static int hevc_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_hevc_ctx
len -= RTP_HEVC_DONL_FIELD_SIZE;
}
av_dlog(ctx, " FU type %d with %d bytes\n", fu_type, len);
av_log(ctx, AV_LOG_TRACE, " FU type %d with %d bytes\n", fu_type, len);
/* sanity check for size of input packet: 1 byte payload at least */
if (len <= 0) {

View File

@ -262,7 +262,7 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time, int bye)
RTPMuxContext *s = s1->priv_data;
uint32_t rtp_ts;
av_dlog(s1, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp);
av_log(s1, AV_LOG_TRACE, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp);
s->last_rtcp_ntp_time = ntp_time;
rtp_ts = av_rescale_q(ntp_time - s->first_rtcp_ntp_time, (AVRational){1, 1000000},
@ -307,7 +307,7 @@ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
{
RTPMuxContext *s = s1->priv_data;
av_dlog(s1, "rtp_send_data size=%d\n", len);
av_log(s1, AV_LOG_TRACE, "rtp_send_data size=%d\n", len);
/* build the RTP header */
avio_w8(s1->pb, RTP_VERSION << 6);
@ -495,7 +495,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
int rtcp_bytes;
int size= pkt->size;
av_dlog(s1, "%d: write len=%d\n", pkt->stream_index, size);
av_log(s1, AV_LOG_TRACE, "%d: write len=%d\n", pkt->stream_index, size);
rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) /
RTCP_TX_RATIO_DEN;

View File

@ -385,7 +385,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
struct sockaddr_storage sdp_ip;
int ttl;
av_dlog(s, "sdp: %c='%s'\n", letter, buf);
av_log(s, AV_LOG_TRACE, "sdp: %c='%s'\n", letter, buf);
p = buf;
if (s1->skip_media && letter != 'm')
@ -1113,7 +1113,7 @@ void ff_rtsp_skip_packet(AVFormatContext *s)
return;
len = AV_RB16(buf + 1);
av_dlog(s, "skipping RTP packet len=%d\n", len);
av_log(s, AV_LOG_TRACE, "skipping RTP packet len=%d\n", len);
/* skip payload */
while (len > 0) {
@ -1150,7 +1150,7 @@ start:
q = buf;
for (;;) {
ret = ffurl_read_complete(rt->rtsp_hd, &ch, 1);
av_dlog(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);
av_log(s, AV_LOG_TRACE, "ret=%d c=%02x [%c]\n", ret, ch, ch);
if (ret != 1)
return AVERROR_EOF;
if (ch == '\n')
@ -1168,7 +1168,7 @@ start:
}
*q = '\0';
av_dlog(s, "line='%s'\n", buf);
av_log(s, AV_LOG_TRACE, "line='%s'\n", buf);
/* test if last line */
if (buf[0] == '\0')
@ -1320,7 +1320,7 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s,
out_buf = base64buf;
}
av_dlog(s, "Sending:\n%s--\n", buf);
av_log(s, AV_LOG_TRACE, "Sending:\n%s--\n", buf);
ffurl_write(rt->rtsp_hd_out, out_buf, strlen(out_buf));
if (send_content_length > 0 && send_content) {

View File

@ -113,7 +113,7 @@ static int rtsp_send_reply(AVFormatContext *s, enum RTSPStatusCode code,
if (extracontent)
av_strlcat(message, extracontent, sizeof(message));
av_strlcat(message, "\r\n", sizeof(message));
av_dlog(s, "Sending response:\n%s", message);
av_log(s, AV_LOG_TRACE, "Sending response:\n%s", message);
ffurl_write(rt->rtsp_hd_out, message, strlen(message));
return 0;
@ -149,7 +149,7 @@ static inline int rtsp_read_request(AVFormatContext *s,
if (ret)
return ret;
if (rbuflen > 1) {
av_dlog(s, "Parsing[%d]: %s\n", rbuflen, rbuf);
av_log(s, AV_LOG_TRACE, "Parsing[%d]: %s\n", rbuflen, rbuf);
ff_rtsp_parse_line(request, rbuf, rt, method);
}
} while (rbuflen > 0);
@ -292,7 +292,7 @@ static int rtsp_read_setup(AVFormatContext *s, char* host, char *controlurl)
snprintf(buf, sizeof(buf), "%d", rt->buffer_size);
av_dict_set(&opts, "buffer_size", buf, 0);
ff_url_join(url, sizeof(url), "rtp", NULL, host, localport, NULL);
av_dlog(s, "Opening: %s", url);
av_log(s, AV_LOG_TRACE, "Opening: %s", url);
ret = ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
&s->interrupt_callback, &opts);
av_dict_free(&opts);
@ -304,7 +304,7 @@ static int rtsp_read_setup(AVFormatContext *s, char* host, char *controlurl)
return ret;
}
av_dlog(s, "Listening on: %d",
av_log(s, AV_LOG_TRACE, "Listening on: %d",
ff_rtp_get_local_rtp_port(rtsp_st->rtp_handle));
if ((ret = ff_rtsp_open_transport_ctx(s, rtsp_st))) {
rtsp_send_reply(s, RTSP_STATUS_TRANSPORT, NULL, request.seq);
@ -753,7 +753,7 @@ int ff_rtsp_tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
int id, len, i, ret;
RTSPStream *rtsp_st;
av_dlog(s, "tcp_read_packet:\n");
av_log(s, AV_LOG_TRACE, "tcp_read_packet:\n");
redo:
for (;;) {
RTSPMessageHeader reply;
@ -772,7 +772,7 @@ redo:
return -1;
id = buf[0];
len = AV_RB16(buf + 1);
av_dlog(s, "id=%d len=%d\n", id, len);
av_log(s, AV_LOG_TRACE, "id=%d len=%d\n", id, len);
if (len > buf_size || len < 8)
goto redo;
/* get the data */

View File

@ -1085,7 +1085,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
pkt->pts > pkt->dts)
presentation_delayed = 1;
av_dlog(NULL,
av_log(NULL, AV_LOG_TRACE,
"IN delayed:%d pts:%s, dts:%s cur_dts:%s st:%d pc:%p duration:%d delay:%d onein_oneout:%d\n",
presentation_delayed, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts),
pkt->stream_index, pc, pkt->duration, delay, onein_oneout);
@ -1151,7 +1151,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
if (pkt->dts > st->cur_dts)
st->cur_dts = pkt->dts;
av_dlog(NULL, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n",
av_log(NULL, AV_LOG_TRACE, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n",
presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts));
/* update flags */
@ -1798,7 +1798,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index,
if (stream_index < 0)
return -1;
av_dlog(s, "read_seek: %d %s\n", stream_index, av_ts2str(target_ts));
av_log(s, AV_LOG_TRACE, "read_seek: %d %s\n", stream_index, av_ts2str(target_ts));
ts_max =
ts_min = AV_NOPTS_VALUE;
@ -1818,7 +1818,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index,
if (e->timestamp <= target_ts || e->pos == e->min_distance) {
pos_min = e->pos;
ts_min = e->timestamp;
av_dlog(s, "using cached pos_min=0x%"PRIx64" dts_min=%s\n",
av_log(s, AV_LOG_TRACE, "using cached pos_min=0x%"PRIx64" dts_min=%s\n",
pos_min, av_ts2str(ts_min));
} else {
av_assert1(index == 0);
@ -1833,7 +1833,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index,
pos_max = e->pos;
ts_max = e->timestamp;
pos_limit = pos_max - e->min_distance;
av_dlog(s, "using cached pos_max=0x%"PRIx64" pos_limit=0x%"PRIx64
av_log(s, AV_LOG_TRACE, "using cached pos_max=0x%"PRIx64" pos_limit=0x%"PRIx64
" dts_max=%s\n", pos_max, pos_limit, av_ts2str(ts_max));
}
}
@ -1903,7 +1903,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts,
int no_change;
int ret;
av_dlog(s, "gen_seek: %d %s\n", stream_index, av_ts2str(target_ts));
av_log(s, AV_LOG_TRACE, "gen_seek: %d %s\n", stream_index, av_ts2str(target_ts));
if (ts_min == AV_NOPTS_VALUE) {
pos_min = s->internal->data_offset;
@ -1932,7 +1932,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts,
no_change = 0;
while (pos_min < pos_limit) {
av_dlog(s,
av_log(s, AV_LOG_TRACE,
"pos_min=0x%"PRIx64" pos_max=0x%"PRIx64" dts_min=%s dts_max=%s\n",
pos_min, pos_max, av_ts2str(ts_min), av_ts2str(ts_max));
av_assert0(pos_limit <= pos_max);
@ -1963,7 +1963,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts,
no_change++;
else
no_change = 0;
av_dlog(s, "%"PRId64" %"PRId64" %"PRId64" / %s %s %s"
av_log(s, AV_LOG_TRACE, "%"PRId64" %"PRId64" %"PRId64" / %s %s %s"
" target:%s limit:%"PRId64" start:%"PRId64" noc:%d\n",
pos_min, pos, pos_max,
av_ts2str(ts_min), av_ts2str(ts), av_ts2str(ts_max), av_ts2str(target_ts),
@ -1990,7 +1990,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts,
ts_min = ff_read_timestamp(s, stream_index, &pos_min, INT64_MAX, read_timestamp);
pos_min++;
ts_max = ff_read_timestamp(s, stream_index, &pos_min, INT64_MAX, read_timestamp);
av_dlog(s, "pos=0x%"PRIx64" %s<=%s<=%s\n",
av_log(s, AV_LOG_TRACE, "pos=0x%"PRIx64" %s<=%s<=%s\n",
pos, av_ts2str(ts_min), av_ts2str(target_ts), av_ts2str(ts_max));
#endif
*ts_ret = ts;
@ -2544,11 +2544,11 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
AVStream av_unused *st;
for (i = 0; i < ic->nb_streams; i++) {
st = ic->streams[i];
av_dlog(ic, "%d: start_time: %0.3f duration: %0.3f\n", i,
av_log(ic, AV_LOG_TRACE, "%d: start_time: %0.3f duration: %0.3f\n", i,
(double) st->start_time / AV_TIME_BASE,
(double) st->duration / AV_TIME_BASE);
}
av_dlog(ic,
av_log(ic, AV_LOG_TRACE,
"stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n",
(double) ic->start_time / AV_TIME_BASE,
(double) ic->duration / AV_TIME_BASE,
@ -3731,7 +3731,7 @@ AVProgram *av_new_program(AVFormatContext *ac, int id)
AVProgram *program = NULL;
int i;
av_dlog(ac, "new_program: id=0x%04x\n", id);
av_log(ac, AV_LOG_TRACE, "new_program: id=0x%04x\n", id);
for (i = 0; i < ac->nb_programs; i++)
if (ac->programs[i]->id == id)

View File

@ -319,7 +319,7 @@ int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in)
if (ac->dc) {
/* dithered conversion */
av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\n",
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n",
len, av_get_sample_fmt_name(ac->in_fmt),
av_get_sample_fmt_name(ac->out_fmt));
@ -337,7 +337,7 @@ int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in)
use_generic = 0;
}
}
av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (%s)\n", len,
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\n", len,
av_get_sample_fmt_name(ac->in_fmt),
av_get_sample_fmt_name(ac->out_fmt),
use_generic ? ac->func_descr_generic : ac->func_descr);

View File

@ -441,7 +441,7 @@ int ff_audio_mix(AudioMix *am, AudioData *src)
use_generic = 0;
}
}
av_dlog(am->avr, "audio_mix: %d samples - %d to %d channels (%s)\n",
av_log(am->avr, AV_LOG_TRACE, "audio_mix: %d samples - %d to %d channels (%s)\n",
src->nb_samples, am->in_channels, am->out_channels,
use_generic ? am->func_descr_generic : am->func_descr);

View File

@ -485,7 +485,7 @@ int ff_audio_resample(ResampleContext *c, AudioData *dst, AudioData *src)
ff_audio_data_drain(c->buffer, consumed);
c->initial_padding_samples = FFMAX(c->initial_padding_samples - consumed, 0);
av_dlog(c->avr, "resampled %d in + %d leftover to %d out + %d leftover\n",
av_log(c->avr, AV_LOG_TRACE, "resampled %d in + %d leftover to %d out + %d leftover\n",
in_samples, in_leftover, out_samples, c->buffer->nb_samples);
dst->nb_samples = out_samples;

View File

@ -127,46 +127,46 @@ int avresample_open(AVAudioResampleContext *avr)
if (avr->use_channel_map) {
if (avr->in_copy_needed) {
avr->remap_point = REMAP_IN_COPY;
av_dlog(avr, "remap channels during in_copy\n");
av_log(avr, AV_LOG_TRACE, "remap channels during in_copy\n");
} else if (avr->in_convert_needed) {
avr->remap_point = REMAP_IN_CONVERT;
av_dlog(avr, "remap channels during in_convert\n");
av_log(avr, AV_LOG_TRACE, "remap channels during in_convert\n");
} else if (avr->out_convert_needed) {
avr->remap_point = REMAP_OUT_CONVERT;
av_dlog(avr, "remap channels during out_convert\n");
av_log(avr, AV_LOG_TRACE, "remap channels during out_convert\n");
} else {
avr->remap_point = REMAP_OUT_COPY;
av_dlog(avr, "remap channels during out_copy\n");
av_log(avr, AV_LOG_TRACE, "remap channels during out_copy\n");
}
#ifdef DEBUG
{
int ch;
av_dlog(avr, "output map: ");
av_log(avr, AV_LOG_TRACE, "output map: ");
if (avr->ch_map_info.do_remap)
for (ch = 0; ch < avr->in_channels; ch++)
av_dlog(avr, " % 2d", avr->ch_map_info.channel_map[ch]);
av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_map[ch]);
else
av_dlog(avr, "n/a");
av_dlog(avr, "\n");
av_dlog(avr, "copy map: ");
av_log(avr, AV_LOG_TRACE, "n/a");
av_log(avr, AV_LOG_TRACE, "\n");
av_log(avr, AV_LOG_TRACE, "copy map: ");
if (avr->ch_map_info.do_copy)
for (ch = 0; ch < avr->in_channels; ch++)
av_dlog(avr, " % 2d", avr->ch_map_info.channel_copy[ch]);
av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_copy[ch]);
else
av_dlog(avr, "n/a");
av_dlog(avr, "\n");
av_dlog(avr, "zero map: ");
av_log(avr, AV_LOG_TRACE, "n/a");
av_log(avr, AV_LOG_TRACE, "\n");
av_log(avr, AV_LOG_TRACE, "zero map: ");
if (avr->ch_map_info.do_zero)
for (ch = 0; ch < avr->in_channels; ch++)
av_dlog(avr, " % 2d", avr->ch_map_info.channel_zero[ch]);
av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_zero[ch]);
else
av_dlog(avr, "n/a");
av_dlog(avr, "\n");
av_dlog(avr, "input map: ");
av_log(avr, AV_LOG_TRACE, "n/a");
av_log(avr, AV_LOG_TRACE, "\n");
av_log(avr, AV_LOG_TRACE, "input map: ");
for (ch = 0; ch < avr->in_channels; ch++)
av_dlog(avr, " % 2d", avr->ch_map_info.input_map[ch]);
av_dlog(avr, "\n");
av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.input_map[ch]);
av_log(avr, AV_LOG_TRACE, "\n");
}
#endif
} else
@ -295,7 +295,7 @@ static int handle_buffered_output(AVAudioResampleContext *avr,
/* if there are any samples in the output FIFO or if the
user-supplied output buffer is not large enough for all samples,
we add to the output FIFO */
av_dlog(avr, "[FIFO] add %s to out_fifo\n", converted->name);
av_log(avr, AV_LOG_TRACE, "[FIFO] add %s to out_fifo\n", converted->name);
ret = ff_audio_data_add_to_fifo(avr->out_fifo, converted, 0,
converted->nb_samples);
if (ret < 0)
@ -305,25 +305,25 @@ static int handle_buffered_output(AVAudioResampleContext *avr,
/* if the user specified an output buffer, read samples from the output
FIFO to the user output */
if (output && output->allocated_samples > 0) {
av_dlog(avr, "[FIFO] read from out_fifo to output\n");
av_dlog(avr, "[end conversion]\n");
av_log(avr, AV_LOG_TRACE, "[FIFO] read from out_fifo to output\n");
av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
return ff_audio_data_read_from_fifo(avr->out_fifo, output,
output->allocated_samples);
}
} else if (converted) {
/* copy directly to output if it is large enough or there is not any
data in the output FIFO */
av_dlog(avr, "[copy] %s to output\n", converted->name);
av_log(avr, AV_LOG_TRACE, "[copy] %s to output\n", converted->name);
output->nb_samples = 0;
ret = ff_audio_data_copy(output, converted,
avr->remap_point == REMAP_OUT_COPY ?
&avr->ch_map_info : NULL);
if (ret < 0)
return ret;
av_dlog(avr, "[end conversion]\n");
av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
return output->nb_samples;
}
av_dlog(avr, "[end conversion]\n");
av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
return 0;
}
@ -354,7 +354,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
avr->out_buffer->allocated_channels);
}
av_dlog(avr, "[start conversion]\n");
av_log(avr, AV_LOG_TRACE, "[start conversion]\n");
/* initialize output_buffer with output data */
direct_output = output && av_audio_fifo_size(avr->out_fifo) == 0;
@ -380,7 +380,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
!avr->out_convert_needed && direct_output && out_samples >= in_samples) {
/* in some rare cases we can copy input to output and upmix
directly in the output buffer */
av_dlog(avr, "[copy] %s to output\n", current_buffer->name);
av_log(avr, AV_LOG_TRACE, "[copy] %s to output\n", current_buffer->name);
ret = ff_audio_data_copy(&output_buffer, current_buffer,
avr->remap_point == REMAP_OUT_COPY ?
&avr->ch_map_info : NULL);
@ -392,7 +392,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
/* if remapping channels during output copy, we may need to
* use an intermediate buffer in order to remap before adding
* samples to the output fifo */
av_dlog(avr, "[copy] %s to out_buffer\n", current_buffer->name);
av_log(avr, AV_LOG_TRACE, "[copy] %s to out_buffer\n", current_buffer->name);
ret = ff_audio_data_copy(avr->out_buffer, current_buffer,
&avr->ch_map_info);
if (ret < 0)
@ -406,13 +406,13 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
current_buffer->nb_samples);
if (ret < 0)
return ret;
av_dlog(avr, "[convert] %s to in_buffer\n", current_buffer->name);
av_log(avr, AV_LOG_TRACE, "[convert] %s to in_buffer\n", current_buffer->name);
ret = ff_audio_convert(avr->ac_in, avr->in_buffer,
current_buffer);
if (ret < 0)
return ret;
} else {
av_dlog(avr, "[copy] %s to in_buffer\n", current_buffer->name);
av_log(avr, AV_LOG_TRACE, "[copy] %s to in_buffer\n", current_buffer->name);
ret = ff_audio_data_copy(avr->in_buffer, current_buffer,
avr->remap_point == REMAP_IN_COPY ?
&avr->ch_map_info : NULL);
@ -421,7 +421,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
}
ff_audio_data_set_channels(avr->in_buffer, avr->in_channels);
if (avr->downmix_needed) {
av_dlog(avr, "[downmix] in_buffer\n");
av_log(avr, AV_LOG_TRACE, "[downmix] in_buffer\n");
ret = ff_audio_mix(avr->am, avr->in_buffer);
if (ret < 0)
return ret;
@ -443,7 +443,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
resample_out = &output_buffer;
else
resample_out = avr->resample_out_buffer;
av_dlog(avr, "[resample] %s to %s\n",
av_log(avr, AV_LOG_TRACE, "[resample] %s to %s\n",
current_buffer ? current_buffer->name : "null",
resample_out->name);
ret = ff_audio_resample(avr->resample, resample_out,
@ -453,7 +453,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
/* if resampling did not produce any samples, just return 0 */
if (resample_out->nb_samples == 0) {
av_dlog(avr, "[end conversion]\n");
av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
return 0;
}
@ -461,7 +461,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
}
if (avr->upmix_needed) {
av_dlog(avr, "[upmix] %s\n", current_buffer->name);
av_log(avr, AV_LOG_TRACE, "[upmix] %s\n", current_buffer->name);
ret = ff_audio_mix(avr->am, current_buffer);
if (ret < 0)
return ret;
@ -469,26 +469,26 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
/* if we resampled or upmixed directly to output, return here */
if (current_buffer == &output_buffer) {
av_dlog(avr, "[end conversion]\n");
av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
return current_buffer->nb_samples;
}
if (avr->out_convert_needed) {
if (direct_output && out_samples >= current_buffer->nb_samples) {
/* convert directly to output */
av_dlog(avr, "[convert] %s to output\n", current_buffer->name);
av_log(avr, AV_LOG_TRACE, "[convert] %s to output\n", current_buffer->name);
ret = ff_audio_convert(avr->ac_out, &output_buffer, current_buffer);
if (ret < 0)
return ret;
av_dlog(avr, "[end conversion]\n");
av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
return output_buffer.nb_samples;
} else {
ret = ff_audio_data_realloc(avr->out_buffer,
current_buffer->nb_samples);
if (ret < 0)
return ret;
av_dlog(avr, "[convert] %s to out_buffer\n", current_buffer->name);
av_log(avr, AV_LOG_TRACE, "[convert] %s to out_buffer\n", current_buffer->name);
ret = ff_audio_convert(avr->ac_out, avr->out_buffer,
current_buffer);
if (ret < 0)