This applies to every library where performance is not critical.
}
is->frame_timer += delay;
- av_dlog(NULL, "video: delay=%0.3f pts=%0.3f A-V=%f\n",
+ av_log(NULL, AV_LOG_TRACE, "video: delay=%0.3f pts=%0.3f A-V=%f\n",
delay, frame_current_pts, -diff);
return is->frame_timer;
#if CONFIG_AVFILTER
if ( last_w != is->video_st->codec->width
|| last_h != is->video_st->codec->height) {
- av_dlog(NULL, "Changing size %dx%d -> %dx%d\n", last_w, last_h,
+ av_log(NULL, AV_LOG_TRACE, "Changing size %dx%d -> %dx%d\n", last_w, last_h,
is->video_st->codec->width, is->video_st->codec->height);
avfilter_graph_free(&graph);
graph = avfilter_graph_alloc();
if (av_cmp_q(tb, is->video_st->time_base)) {
av_unused int64_t pts1 = pts_int;
pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base);
- av_dlog(NULL, "video_thread(): "
+ av_log(NULL, AV_LOG_TRACE, "video_thread(): "
"tb:%d/%d pts:%"PRId64" -> tb:%d/%d pts:%"PRId64"\n",
tb.num, tb.den, pts1,
is->video_st->time_base.num, is->video_st->time_base.den, pts_int);
samples_size = wanted_size;
}
}
- av_dlog(NULL, "diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n",
+ av_log(NULL, AV_LOG_TRACE, "diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n",
diff, avg_diff, samples_size - samples_size1,
is->audio_clock, is->video_clock, is->audio_diff_threshold);
}
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"
}
}
- 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,
/* wait based on the frame rate */
curtime = av_gettime();
delay = fbdev->time_frame - curtime;
- av_dlog(avctx,
+ av_log(avctx, AV_LOG_TRACE,
"time_frame:%"PRId64" curtime:%"PRId64" delay:%"PRId64"\n",
fbdev->time_frame, curtime, delay);
if (delay > 0) {
void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
{
if (link->type == AVMEDIA_TYPE_VIDEO) {
- av_dlog(ctx,
+ av_log(ctx, AV_LOG_TRACE,
"link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",
link, link->w, link->h,
av_get_pix_fmt_name(link->format),
char buf[128];
av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
- av_dlog(ctx,
+ av_log(ctx, AV_LOG_TRACE,
"link[%p r:%d cl:%s fmt:%-16s %-16s->%-16s]%s",
link, link->sample_rate, buf,
av_get_sample_fmt_name(link->format),
/** Tell is a format is contained in the provided list terminated by -1. */
int ff_fmt_is_in(int fmt, const int *fmts);
-#define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func)
+#define FF_DPRINTF_START(ctx, func) av_log(NULL, AV_LOG_TRACE, "%-16s: ", #func)
void ff_dlog_link(void *ctx, AVFilterLink *link, int end);
d = av_expr_eval(setpts->expr, setpts->var_values, NULL);
frame->pts = D2TS(d);
- av_dlog(inlink->dst,
+ av_log(inlink->dst, AV_LOG_TRACE,
"n:%"PRId64" interlaced:%d pts:%"PRId64" t:%f -> pts:%"PRId64" t:%f\n",
(int64_t)setpts->var_values[VAR_N],
(int)setpts->var_values[VAR_INTERLACED],
s->x &= ~((1 << s->hsub) - 1);
s->y &= ~((1 << s->vsub) - 1);
- av_dlog(ctx, "n:%d t:%f x:%d y:%d x+w:%d y+h:%d\n",
+ av_log(ctx, AV_LOG_TRACE, "n:%d t:%f x:%d y:%d x+w:%d y+h:%d\n",
(int)s->var_values[VAR_N], s->var_values[VAR_T], s->x,
s->y, s->x+s->w, s->y+s->h);
s->x &= ~((1 << s->hsub) - 1);
s->y &= ~((1 << s->vsub) - 1);
- av_dlog(ctx, "n:%d t:%f x:%d y:%d x+w:%d y+h:%d\n",
+ av_log(ctx, AV_LOG_TRACE, "n:%d t:%f x:%d y:%d x+w:%d y+h:%d\n",
(int)s->var_values[VAR_N], s->var_values[VAR_T],
s->x, s->y, s->x+s->w, s->y+s->h);
return ff_filter_frame(outlink, frame);
}
- av_dlog(ctx,
+ av_log(ctx, AV_LOG_TRACE,
"picture will move %s one line\n",
s->dst_tff ? "up" : "down");
h = frame->height;
if (frame_decoded) {
if (movie->frame->pkt_pts != AV_NOPTS_VALUE)
movie->frame->pts = movie->frame->pkt_pts;
- av_dlog(outlink->src,
+ av_log(outlink->src, AV_LOG_TRACE,
"movie_get_frame(): file:'%s' pts:%"PRId64" time:%f aspect:%d/%d\n",
movie->file_name, movie->frame->pts,
(double)movie->frame->pts *
#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)
{
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
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")){
&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);
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;
}
DO_2BITS(asf->packet_property >> 4, asf->packet_seq, 0);
DO_2BITS(asf->packet_property >> 2, asf->packet_frag_offset, 0);
DO_2BITS(asf->packet_property, asf->packet_replic_size, 0);
- av_dlog(asf, "key:%d stream:%d seq:%d offset:%d replic_size:%d\n",
+ av_log(asf, AV_LOG_TRACE, "key:%d stream:%d seq:%d offset:%d replic_size:%d\n",
asf->packet_key_frame, asf->stream_index, asf->packet_seq,
asf->packet_frag_offset, asf->packet_replic_size);
if (asf->packet_replic_size >= 8) {
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);
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,
}
/* 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;
if (sscanf(p, "%*[^,],%d:%d:%d%*c%d", &hour, &min, &sec, &hsec) != 4)
return AV_NOPTS_VALUE;
- av_dlog(NULL, "%d %d %d %d [%s]\n", hour, min, sec, hsec, p);
+ av_log(NULL, AV_LOG_TRACE, "%d %d %d %d [%s]\n", hour, min, sec, hsec, p);
min += 60 * hour;
sec += 60 * min;
static int guess_ni_flag(AVFormatContext *s);
#define print_tag(str, tag, size) \
- av_dlog(NULL, "%s: tag=%c%c%c%c size=0x%x\n", \
+ av_log(NULL, AV_LOG_TRACE, "%s: tag=%c%c%c%c size=0x%x\n", \
str, tag & 0xff, \
(tag >> 8) & 0xff, \
(tag >> 16) & 0xff, \
int64_t last_pos = -1;
int64_t filesize = avi->fsize;
- av_dlog(s,
+ av_log(s, AV_LOG_TRACE,
"longs_pre_entry:%d index_type:%d entries_in_use:%d "
"chunk_id:%X base:%16"PRIX64"\n",
longs_pre_entry,
int key = len >= 0;
len &= 0x7FFFFFFF;
- av_dlog(s, "pos:%"PRId64", len:%X\n", pos, len);
+ av_log(s, AV_LOG_TRACE, "pos:%"PRId64", len:%X\n", pos, len);
if (pb->eof_reached)
return AVERROR_INVALIDDATA;
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);
avio_rl32(pb); /* quality */
ast->sample_size = avio_rl32(pb); /* sample ssize */
ast->cum_len *= FFMAX(1, ast->sample_size);
- av_dlog(s, "%"PRIu32" %"PRIu32" %d\n",
+ av_log(s, AV_LOG_TRACE, "%"PRIu32" %"PRIu32" %d\n",
ast->rate, ast->scale, ast->sample_size);
switch (tag1) {
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);
}
size = d[4] + (d[5] << 8) + (d[6] << 16) + (d[7] << 24);
n = get_stream_idx(d + 2);
- av_dlog(s, "%X %X %X %X %X %X %X %X %"PRId64" %u %d\n",
+ av_log(s, AV_LOG_TRACE, "%X %X %X %X %X %X %X %X %"PRId64" %u %d\n",
d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
if (i + (uint64_t)size > avi->fsize || d[0] > 127)
continue;
(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;
// 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,
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;
}
pos += data_offset;
- av_dlog(s, "%d cum_len=%"PRId64"\n", len, ast->cum_len);
+ av_log(s, AV_LOG_TRACE, "%d cum_len=%"PRId64"\n", len, ast->cum_len);
if (pb->eof_reached)
return AVERROR_INVALIDDATA;
if (avio_seek(pb, avi->movi_end, SEEK_SET) < 0)
goto the_end; // maybe truncated file
- av_dlog(s, "movi_end=0x%"PRIx64"\n", avi->movi_end);
+ av_log(s, AV_LOG_TRACE, "movi_end=0x%"PRIx64"\n", avi->movi_end);
for (;;) {
if (pb->eof_reached)
break;
tag = avio_rl32(pb);
size = avio_rl32(pb);
- av_dlog(s, "tag=%c%c%c%c size=0x%x\n",
+ av_log(s, AV_LOG_TRACE, "tag=%c%c%c%c size=0x%x\n",
tag & 0xff,
(tag >> 8) & 0xff,
(tag >> 16) & 0xff,
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) {
index++;
}
- av_dlog(s, "%"PRId64" %d %"PRId64"\n",
+ av_log(s, AV_LOG_TRACE, "%"PRId64" %d %"PRId64"\n",
timestamp, index, st2->index_entries[index].timestamp);
/* extract the current frame number */
ast2->frame_offset = st2->index_entries[index].timestamp;
size = avio_rb24(s->pb);
dts = avio_rb24(s->pb);
dts |= avio_r8(s->pb) << 24;
- av_dlog(s, "type:%d, size:%d, dts:%"PRId64"\n", type, size, dts);
+ av_log(s, AV_LOG_TRACE, "type:%d, size:%d, dts:%"PRId64"\n", type, size, dts);
if (s->pb->eof_reached)
return AVERROR_EOF;
avio_skip(s->pb, 3); /* stream id, always 0 */
if (!st)
return AVERROR(ENOMEM);
}
- av_dlog(s, "%d %X %d \n", is_audio, flags, st->discard);
+ av_log(s, AV_LOG_TRACE, "%d %X %d \n", is_audio, flags, st->discard);
if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY ||
is_audio)
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);
}
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]);
}
p++;
s->http_code = strtol(p, &end, 10);
- av_dlog(NULL, "http_code=%d\n", s->http_code);
+ av_log(NULL, AV_LOG_TRACE, "http_code=%d\n", s->http_code);
if ((ret = check_http_code(h, s->http_code, end)) < 0)
return ret;
if ((err = http_get_line(s, line, sizeof(line))) < 0)
return err;
- av_dlog(NULL, "header='%s'\n", line);
+ av_log(NULL, AV_LOG_TRACE, "header='%s'\n", line);
err = process_line(h, line, s->line_count, new_location);
if (err < 0)
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)
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;
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;
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;
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;
}
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)) {
- 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;
}
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) ?
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)) {
- 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;
}
} 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;
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);
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) {
- av_dlog(NULL, "demux_ipmovie: set_palette opcode too large\n");
+ av_log(NULL, AV_LOG_TRACE, "demux_ipmovie: set_palette opcode too large\n");
chunk_type = CHUNK_BAD;
break;
}
last_color = first_color + AV_RL16(&scratch[2]) - 1;
/* sanity check (since they are 16 bit values) */
if ((first_color > 0xFF) || (last_color > 0xFF)) {
- 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;
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);
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);
break;
default:
- av_dlog(NULL, "*** unknown opcode type\n");
+ av_log(NULL, AV_LOG_TRACE, "*** unknown opcode type\n");
chunk_type = CHUNK_BAD;
break;
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;
}
avio_rb32(pb); /* avg bitrate */
st->codec->codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);
- av_dlog(fc, "esds object type id 0x%02x\n", object_type_id);
+ av_log(fc, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id);
len = ff_mp4_read_descr(fc, pb, &tag);
if (tag == MP4DecSpecificDescrTag) {
- av_dlog(fc, "Specific MPEG4 header len=%d\n", len);
+ av_log(fc, AV_LOG_TRACE, "Specific MPEG4 header len=%d\n", len);
if (!len || (uint64_t)len > (1<<30))
return -1;
av_free(st->codec->extradata);
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);
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);
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);
}
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;
}
}
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);
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;
}
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)
}
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) {
} 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;
}
}
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;
}
}
}
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;
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;
}
// 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;
}
}
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);
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 */
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;
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);
}
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 */
avio_rb32(pb); /* preferred scale */
st->codec->extradata_size = 0x5a + atom.size;
memcpy(st->codec->extradata, "SVQ3", 4); // fake
avio_read(pb, st->codec->extradata + 0x5a, atom.size);
- av_dlog(c->fc, "Reading SMI %"PRId64" %s\n", atom.size, st->codec->extradata + 0x5a);
+ av_log(c->fc, AV_LOG_TRACE, "Reading SMI %"PRId64" %s\n", atom.size, st->codec->extradata + 0x5a);
return 0;
}
st = c->fc->streams[c->fc->nb_streams-1];
little_endian = !!avio_rb16(pb);
- 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:
color_trc = avio_rb16(pb);
color_matrix = avio_rb16(pb);
- av_dlog(c->fc, "%s: pri %"PRIu16" trc %"PRIu16" matrix %"PRIu16"",
- color_parameter_type, color_primaries, color_trc, color_matrix);
+ av_log(c->fc, AV_LOG_TRACE,
+ "%s: pri %"PRIu16" trc %"PRIu16" matrix %"PRIu16"",
+ 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
case 7: st->codec->colorspace = AVCOL_SPC_SMPTE240M; break;
}
}
- av_dlog(c->fc, "\n");
+ av_log(c->fc, AV_LOG_TRACE, "\n");
return 0;
}
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;
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 */
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) {
if (version == 1) {
sc->samples_per_frame = avio_rb32(pb);
id = mov_codec_id(st, format);
- av_dlog(c->fc, "size=%"PRIu32" 4CC= %"PRIu8"%"PRIu8"%"PRIu8"%"PRIu8" codec_type=%d\n", size,
+ av_log(c->fc, AV_LOG_TRACE, "size=%"PRIu32" 4CC= %"PRIu8"%"PRIu8"%"PRIu8"%"PRIu8" codec_type=%d\n", size,
(format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,
(format >> 24) & 0xff, st->codec->codec_type);
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;
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;
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)
{
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;
}
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)
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 (!entries)
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);
duration+=(int64_t)sample_duration*sample_count;
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;
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;
}
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);
}
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,
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);
avio_rb32(pb) : trex->size;
frag->flags = flags & MOV_TFHD_DEFAULT_FLAGS ?
avio_rb32(pb) : trex->flags;
- 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;
}
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.
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;
distance = 0;
av_add_index_entry(st, offset, dts, sample_size, distance,
keyframe ? AVINDEX_KEYFRAME : 0);
- 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++;
av_log(c->fc, AV_LOG_WARNING, "multiple edit list entries, "
"a/v desync might occur, patch welcome\n");
- 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);
return 0;
}
a.size = avio_rb32(pb);
a.type = avio_rl32(pb);
}
- 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);
total_size += 8;
if (a.size == 1) { /* 64 bit extended size */
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 && mov->chapter_track > 0)
mov_read_chapters(s);
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 &&
if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 ||
s->pb->eof_reached)
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;
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;
}
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;
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)
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);
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 &&
}
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;
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;
best_dts = pkt_desc->dts;
}
- 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 (best_dts == INT64_MAX)
return 0;
}
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);
dts += 2 * 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)
MpegTSFilter *filter;
MpegTSSectionFilter *sec;
- 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;
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)
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 &&
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) {
- av_dlog(pes->stream,
+ av_log(pes->stream, AV_LOG_TRACE,
"pid=%x stream_type=%x probing\n",
pes->pid,
pes->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 &&
stream_type == STREAM_TYPE_PRIVATE_DATA)
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;
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;
if (parse_section_header(h, &p, p_end) < 0)
return;
- av_dlog(ts->stream, "sid=0x%x sec_num=%d/%d\n",
+ av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x sec_num=%d/%d\n",
h->id, h->sec_num, h->last_sec_num);
if (h->tid != PMT_TID)
pcr_pid &= 0x1fff;
add_pid_to_pmt(ts, 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)
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
const uint8_t *p, *p_end;
int sid, pmt_pid;
- 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;
break;
pmt_pid &= 0x1fff;
- 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 */
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;
if (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) {
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]) {
TS_DVHS_PACKET_SIZE, NULL, 1) * CHECK_COUNT / check_count;
fec_score = analyze(p->buf, TS_FEC_PACKET_SIZE * check_count,
TS_FEC_PACKET_SIZE, NULL, 1) * CHECK_COUNT / check_count;
- 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);
/* we need a clear definition for the returned score otherwise
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 {
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);
}
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);
} while (p < buf_end && (state & 0x1f) != 9 &&
(state & 0x1f) != 5 && (state & 0x1f) != 1);
int delay = FFMAX(st->codec->has_b_frames, !!st->codec->max_b_frames);
int num, den, i;
- av_dlog(s, "compute_pkt_fields2: pts:%" PRId64 " dts:%" PRId64 " cur_dts:%" PRId64 " b:%d size:%d st:%d\n",
+ av_log(s, AV_LOG_TRACE, "compute_pkt_fields2: pts:%" PRId64 " dts:%" PRId64 " cur_dts:%" PRId64 " b:%d size:%d st:%d\n",
pkt->pts, pkt->dts, st->cur_dts, delay, pkt->size, pkt->stream_index);
/* if(pkt->pts == AV_NOPTS_VALUE && pkt->dts == AV_NOPTS_VALUE)
return AVERROR(EINVAL);
}
- av_dlog(s, "av_write_frame: pts2:%"PRId64" dts2:%"PRId64"\n",
+ av_log(s, AV_LOG_TRACE, "av_write_frame: pts2:%"PRId64" dts2:%"PRId64"\n",
pkt->pts, pkt->dts);
st->cur_dts = pkt->dts;
if (pkt) {
AVStream *st = s->streams[pkt->stream_index];
- av_dlog(s, "av_interleaved_write_frame size:%d dts:%" PRId64 " pts:%" PRId64 "\n",
+ av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame size:%d dts:%" PRId64 " pts:%" PRId64 "\n",
pkt->size, pkt->dts, pkt->pts);
if ((ret = compute_pkt_fields2(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
goto fail;
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;
}
}
}
- 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",
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;
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;
MXFPackage *temp_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);
}
}
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++) {
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;
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);
}
}
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");
return 1;
}
: mxf->last_partition;
if (!offset) {
- av_dlog(mxf->fc, "no last partition\n");
+ av_log(mxf->fc, AV_LOG_TRACE, "no last partition\n");
return 0;
}
- av_dlog(mxf->fc, "seeking to last partition\n");
+ av_log(mxf->fc, AV_LOG_TRACE, "seeking to last partition\n");
/* remember where we were so we don't end up seeking further back than this */
mxf->last_forward_tell = avio_tell(pb);
}
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) ||
if ((ret = klv_read_packet(&klv, s->pb)) < 0)
return ret;
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) {
}
*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;
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, \
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 (pb->eof_reached) {
- 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;
}
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 */
//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 (pb->eof_reached)
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*() */
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);
if (pb->eof_reached)
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;
}
}
- 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) */
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);
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};
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 */
}
} 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;
}
}
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;
/* 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;
}
uint16_t asize;
uint16_t auxsize;
- 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! */
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),
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++;
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)
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);
}
}
av_get_packet(pb, pkt, asize);
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++;
}
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)
/* 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 */
int score;
int vsize, asize, auxcount;
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' &&
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);
do {
idx = ogg->curidx;
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) {
}
} while (!complete);
- av_dlog(s, "ogg_packet: idx %i, frame size %i, start %i\n",
+ av_log(s, AV_LOG_TRACE, "ogg_packet: idx %i, frame size %i, start %i\n",
idx, os->psize, os->pstart);
if (os->granule == -1)
os->lastpts = s->streams[i]->start_time =
ogg_gptopts(s, i, os->start_granule, NULL);
}
- av_dlog(s, "found headers\n");
+ av_log(s, AV_LOG_TRACE, "found headers\n");
return 0;
}
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;
}
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
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);
}
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)
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;
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)
(AVRational){st->avg_frame_rate.den,
st->avg_frame_rate.num},
st->time_base);
- av_dlog(s, "duration %"PRId64"\n", st->duration);
+ av_log(s, AV_LOG_TRACE, "duration %"PRId64"\n", st->duration);
return 0;
}
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);
}
}
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
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)
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;
}
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)
pkt->stream_index = 1;
pkt->dts = dts;
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;
frame_num = av_rescale_q(sample_time, st->time_base,
(AVRational){st->avg_frame_rate.den, st->avg_frame_rate.num});
- 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) {
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);
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,
}
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)
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)
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;
/* 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 */
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);
}
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);
}
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);
if (len <= 0) {
/* sanity check for size of input packet: 1 byte payload at least */
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},
{
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);
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;
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')
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) {
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')
}
*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')
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) {
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;
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);
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);
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);
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;
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 < 12)
goto redo;
/* get the data */
pkt->pts > pkt->dts)
presentation_delayed = 1;
- av_dlog(NULL,
+ av_log(NULL, AV_LOG_TRACE,
"IN delayed:%d pts:%"PRId64", dts:%"PRId64" "
"cur_dts:%"PRId64" st:%d pc:%p\n",
presentation_delayed, pkt->pts, pkt->dts, st->cur_dts,
st->cur_dts = pkt->dts;
}
- av_dlog(NULL,
+ av_log(NULL, AV_LOG_TRACE,
"OUTdelayed:%d/%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64"\n",
presentation_delayed, delay, pkt->pts, pkt->dts, st->cur_dts);
if (stream_index < 0)
return -1;
- av_dlog(s, "read_seek: %d %"PRId64"\n", stream_index, target_ts);
+ av_log(s, AV_LOG_TRACE, "read_seek: %d %"PRId64"\n", stream_index, target_ts);
ts_max =
ts_min = AV_NOPTS_VALUE;
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=%"PRId64"\n",
+ av_log(s, AV_LOG_TRACE, "using cached pos_min=0x%"PRIx64" dts_min=%"PRId64"\n",
pos_min, ts_min);
} else {
assert(index == 0);
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=%"PRId64"\n", pos_max, pos_limit, ts_max);
}
}
int64_t start_pos, filesize;
int no_change;
- av_dlog(s, "gen_seek: %d %"PRId64"\n", stream_index, target_ts);
+ av_log(s, AV_LOG_TRACE, "gen_seek: %d %"PRId64"\n", stream_index, target_ts);
if (ts_min == AV_NOPTS_VALUE) {
pos_min = s->internal->data_offset;
no_change = 0;
while (pos_min < pos_limit) {
- av_dlog(s, "pos_min=0x%"PRIx64" pos_max=0x%"PRIx64" dts_min=%"PRId64
+ av_log(s, AV_LOG_TRACE, "pos_min=0x%"PRIx64" pos_max=0x%"PRIx64" dts_min=%"PRId64
" dts_max=%"PRId64"\n", pos_min, pos_max, ts_min, ts_max);
assert(pos_limit <= pos_max);
no_change++;
else
no_change = 0;
- av_dlog(s, "%"PRId64" %"PRId64" %"PRId64" / %"PRId64" %"PRId64" %"PRId64
+ av_log(s, AV_LOG_TRACE, "%"PRId64" %"PRId64" %"PRId64" / %"PRId64" %"PRId64" %"PRId64
" target:%"PRId64" limit:%"PRId64" start:%"PRId64" noc:%d\n",
pos_min, pos, pos_max, ts_min, ts, ts_max, target_ts,
pos_limit, start_pos, no_change);
ts_min = read_timestamp(s, stream_index, &pos_min, INT64_MAX);
pos_min++;
ts_max = read_timestamp(s, stream_index, &pos_min, INT64_MAX);
- av_dlog(s, "pos=0x%"PRIx64" %"PRId64"<=%"PRId64"<=%"PRId64"\n",
+ av_log(s, AV_LOG_TRACE, "pos=0x%"PRIx64" %"PRId64"<=%"PRId64"<=%"PRId64"\n",
pos, ts_min, target_ts, ts_max);
*ts_ret = ts;
return pos;
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,
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)
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));
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);
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);
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;
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
/* 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)
/* 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;
}
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;
!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);
/* 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)
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);
}
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;
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,
/* 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;
}
}
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;
/* 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)