* 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>tags/n2.7
@@ -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); | |||
} | |||
@@ -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, | |||
@@ -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) { | |||
@@ -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; | |||
@@ -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); | |||
@@ -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; | |||
@@ -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; | |||
@@ -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) { | |||
@@ -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); | |||
} | |||
} | |||
@@ -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]); | |||
} | |||
@@ -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) | |||
@@ -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; | |||
@@ -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); | |||
@@ -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; | |||
} | |||
@@ -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; | |||
} | |||
} | |||
@@ -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; | |||
@@ -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) | |||
@@ -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; | |||
@@ -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) | |||
@@ -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); | |||
} | |||
@@ -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 && | |||
@@ -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; | |||
} | |||
@@ -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) { | |||
@@ -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; | |||
@@ -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 h |