mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Replace some commented-out debug printf() / av_log() messages with av_dlog().
This commit is contained in:
parent
d1be646e90
commit
045dd4b928
8
ffplay.c
8
ffplay.c
@ -2028,11 +2028,9 @@ static int synchronize_audio(VideoState *is, short *samples,
|
|||||||
samples_size = wanted_size;
|
samples_size = wanted_size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
av_dlog(NULL, "diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n",
|
||||||
printf("diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n",
|
diff, avg_diff, samples_size - samples_size1,
|
||||||
diff, avg_diff, samples_size - samples_size1,
|
is->audio_clock, is->video_clock, is->audio_diff_threshold);
|
||||||
is->audio_clock, is->video_clock, is->audio_diff_threshold);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* too big difference : may be initial PTS errors, so
|
/* too big difference : may be initial PTS errors, so
|
||||||
|
@ -399,10 +399,8 @@ static void compute_scale_factors(unsigned char scale_code[SBLIMIT],
|
|||||||
index = 62; /* value 63 is not allowed */
|
index = 62; /* value 63 is not allowed */
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
av_dlog(NULL, "%2d:%d in=%x %x %d\n",
|
||||||
printf("%2d:%d in=%x %x %d\n",
|
j, i, vmax, scale_factor_table[index], index);
|
||||||
j, i, vmax, scale_factor_table[index], index);
|
|
||||||
#endif
|
|
||||||
/* store the scale factor */
|
/* store the scale factor */
|
||||||
assert(index >=0 && index <= 63);
|
assert(index >=0 && index <= 63);
|
||||||
sf[i] = index;
|
sf[i] = index;
|
||||||
@ -470,10 +468,8 @@ static void compute_scale_factors(unsigned char scale_code[SBLIMIT],
|
|||||||
code = 0; /* kill warning */
|
code = 0; /* kill warning */
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
av_dlog(NULL, "%d: %2d %2d %2d %d %d -> %d\n", j,
|
||||||
printf("%d: %2d %2d %2d %d %d -> %d\n", j,
|
sf[0], sf[1], sf[2], d1, d2, code);
|
||||||
sf[0], sf[1], sf[2], d1, d2, code);
|
|
||||||
#endif
|
|
||||||
scale_code[j] = code;
|
scale_code[j] = code;
|
||||||
sf += 3;
|
sf += 3;
|
||||||
}
|
}
|
||||||
@ -547,11 +543,9 @@ static void compute_bit_allocation(MpegAudioContext *s,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
av_dlog(NULL, "current=%d max=%d max_sb=%d alloc=%d\n",
|
||||||
printf("current=%d max=%d max_sb=%d alloc=%d\n",
|
current_frame_size, max_frame_size, max_sb,
|
||||||
current_frame_size, max_frame_size, max_sb,
|
bit_alloc[max_sb]);
|
||||||
bit_alloc[max_sb]);
|
|
||||||
#endif
|
|
||||||
if (max_sb < 0)
|
if (max_sb < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -152,10 +152,8 @@ static int mpegvideo_parse(AVCodecParserContext *s,
|
|||||||
to have the full timing information. The time take by this
|
to have the full timing information. The time take by this
|
||||||
function should be negligible for uncorrupted streams */
|
function should be negligible for uncorrupted streams */
|
||||||
mpegvideo_extract_headers(s, avctx, buf, buf_size);
|
mpegvideo_extract_headers(s, avctx, buf, buf_size);
|
||||||
#if 0
|
av_dlog(NULL, "pict_type=%d frame_rate=%0.3f repeat_pict=%d\n",
|
||||||
printf("pict_type=%d frame_rate=%0.3f repeat_pict=%d\n",
|
s->pict_type, (double)avctx->time_base.den / avctx->time_base.num, s->repeat_pict);
|
||||||
s->pict_type, (double)avctx->time_base.den / avctx->time_base.num, s->repeat_pict);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
*poutbuf = buf;
|
*poutbuf = buf;
|
||||||
*poutbuf_size = buf_size;
|
*poutbuf_size = buf_size;
|
||||||
|
@ -221,12 +221,11 @@ void av_parser_close(AVCodecParserContext *s)
|
|||||||
*/
|
*/
|
||||||
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
|
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if(pc->overread){
|
if(pc->overread){
|
||||||
printf("overread %d, state:%X next:%d index:%d o_index:%d\n", pc->overread, pc->state, next, pc->index, pc->overread_index);
|
av_dlog(pc, "overread %d, state:%X next:%d index:%d o_index:%d\n",
|
||||||
printf("%X %X %X %X\n", (*buf)[0], (*buf)[1],(*buf)[2],(*buf)[3]);
|
pc->overread, pc->state, next, pc->index, pc->overread_index);
|
||||||
|
av_dlog(pc, "%X %X %X %X\n", (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Copy overread bytes from last frame into buffer. */
|
/* Copy overread bytes from last frame into buffer. */
|
||||||
for(; pc->overread>0; pc->overread--){
|
for(; pc->overread>0; pc->overread--){
|
||||||
|
@ -149,14 +149,8 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
|||||||
ioctl(video_fd, VIDIOCSAUDIO, &audio);
|
ioctl(video_fd, VIDIOCSAUDIO, &audio);
|
||||||
|
|
||||||
ioctl(video_fd, VIDIOCGPICT, &pict);
|
ioctl(video_fd, VIDIOCGPICT, &pict);
|
||||||
#if 0
|
av_dlog(s1, "v4l: colour=%d hue=%d brightness=%d constrast=%d whiteness=%d\n",
|
||||||
printf("v4l: colour=%d hue=%d brightness=%d constrast=%d whiteness=%d\n",
|
pict.colour, pict.hue, pict.brightness, pict.contrast, pict.whiteness);
|
||||||
pict.colour,
|
|
||||||
pict.hue,
|
|
||||||
pict.brightness,
|
|
||||||
pict.contrast,
|
|
||||||
pict.whiteness);
|
|
||||||
#endif
|
|
||||||
/* try to choose a suitable video format */
|
/* try to choose a suitable video format */
|
||||||
pict.palette = desired_palette;
|
pict.palette = desired_palette;
|
||||||
pict.depth= desired_depth;
|
pict.depth= desired_depth;
|
||||||
|
@ -569,10 +569,9 @@ static int mpegps_read_packet(AVFormatContext *s,
|
|||||||
pkt->dts = dts;
|
pkt->dts = dts;
|
||||||
pkt->pos = dummy_pos;
|
pkt->pos = dummy_pos;
|
||||||
pkt->stream_index = st->index;
|
pkt->stream_index = st->index;
|
||||||
#if 0
|
av_dlog(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f size=%d\n",
|
||||||
av_log(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f size=%d\n",
|
pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0,
|
||||||
pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0, pkt->size);
|
pkt->size);
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -662,10 +662,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index,
|
|||||||
|
|
||||||
id = stream->id;
|
id = stream->id;
|
||||||
|
|
||||||
#if 0
|
av_dlog(ctx, "packet ID=%2x PTS=%0.3f\n", id, pts / 90000.0);
|
||||||
printf("packet ID=%2x PTS=%0.3f\n",
|
|
||||||
id, pts / 90000.0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
buf_ptr = buffer;
|
buf_ptr = buffer;
|
||||||
|
|
||||||
@ -1078,10 +1075,8 @@ retry:
|
|||||||
best_dts= pkt_desc->dts;
|
best_dts= pkt_desc->dts;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
av_dlog(ctx, AV_LOG_DEBUG, "bumping scr, scr:%f, dts:%f\n",
|
||||||
av_log(ctx, AV_LOG_DEBUG, "bumping scr, scr:%f, dts:%f\n",
|
scr / 90000.0, best_dts / 90000.0);
|
||||||
scr/90000.0, best_dts/90000.0);
|
|
||||||
#endif
|
|
||||||
if(best_dts == INT64_MAX)
|
if(best_dts == INT64_MAX)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -1538,10 +1538,8 @@ static int mpegts_read_header(AVFormatContext *s,
|
|||||||
s->bit_rate = (TS_PACKET_SIZE * 8) * 27e6 / ts->pcr_incr;
|
s->bit_rate = (TS_PACKET_SIZE * 8) * 27e6 / ts->pcr_incr;
|
||||||
st->codec->bit_rate = s->bit_rate;
|
st->codec->bit_rate = s->bit_rate;
|
||||||
st->start_time = ts->cur_pcr;
|
st->start_time = ts->cur_pcr;
|
||||||
#if 0
|
av_dlog(ts->stream, AV_LOG_DEBUG, "start=%0.3f pcr=%0.3f incr=%d\n",
|
||||||
av_log(ts->stream, AV_LOG_DEBUG, "start=%0.3f pcr=%0.3f incr=%d\n",
|
st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr);
|
||||||
st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
avio_seek(pb, pos, SEEK_SET);
|
avio_seek(pb, pos, SEEK_SET);
|
||||||
|
@ -316,9 +316,7 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo
|
|||||||
int complete = 0;
|
int complete = 0;
|
||||||
int segp = 0, psize = 0;
|
int segp = 0, psize = 0;
|
||||||
|
|
||||||
#if 0
|
av_dlog(s, AV_LOG_DEBUG, "ogg_packet: curidx=%i\n", ogg->curidx);
|
||||||
av_log (s, AV_LOG_DEBUG, "ogg_packet: curidx=%i\n", ogg->curidx);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
do{
|
do{
|
||||||
idx = ogg->curidx;
|
idx = ogg->curidx;
|
||||||
@ -330,11 +328,9 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo
|
|||||||
|
|
||||||
os = ogg->streams + idx;
|
os = ogg->streams + idx;
|
||||||
|
|
||||||
#if 0
|
av_dlog(s, AV_LOG_DEBUG,
|
||||||
av_log (s, AV_LOG_DEBUG,
|
|
||||||
"ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n",
|
"ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n",
|
||||||
idx, os->pstart, os->psize, os->segp, os->nsegs);
|
idx, os->pstart, os->psize, os->segp, os->nsegs);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!os->codec){
|
if (!os->codec){
|
||||||
if (os->header < 0){
|
if (os->header < 0){
|
||||||
@ -366,11 +362,9 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo
|
|||||||
}
|
}
|
||||||
}while (!complete);
|
}while (!complete);
|
||||||
|
|
||||||
#if 0
|
av_dlog(s, AV_LOG_DEBUG,
|
||||||
av_log (s, AV_LOG_DEBUG,
|
|
||||||
"ogg_packet: idx %i, frame size %i, start %i\n",
|
"ogg_packet: idx %i, frame size %i, start %i\n",
|
||||||
idx, os->psize, os->pstart);
|
idx, os->psize, os->pstart);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (os->granule == -1)
|
if (os->granule == -1)
|
||||||
av_log(s, AV_LOG_WARNING, "Page at %"PRId64" is missing granule\n", os->page_pos);
|
av_log(s, AV_LOG_WARNING, "Page at %"PRId64" is missing granule\n", os->page_pos);
|
||||||
@ -451,9 +445,7 @@ ogg_get_headers (AVFormatContext * s)
|
|||||||
return -1;
|
return -1;
|
||||||
}while (!ogg->headers);
|
}while (!ogg->headers);
|
||||||
|
|
||||||
#if 0
|
av_dlog(s, AV_LOG_DEBUG, "found headers\n");
|
||||||
av_log (s, AV_LOG_DEBUG, "found headers\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -414,15 +414,13 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
tag = avio_rl32(pb);
|
tag = avio_rl32(pb);
|
||||||
tag_size = avio_rb32(pb);
|
tag_size = avio_rb32(pb);
|
||||||
avio_rb16(pb);
|
avio_rb16(pb);
|
||||||
#if 0
|
av_dlog(s, "tag=%c%c%c%c (%08x) size=%d\n",
|
||||||
printf("tag=%c%c%c%c (%08x) size=%d\n",
|
(tag ) & 0xff,
|
||||||
(tag) & 0xff,
|
(tag >> 8) & 0xff,
|
||||||
(tag >> 8) & 0xff,
|
(tag >> 16) & 0xff,
|
||||||
(tag >> 16) & 0xff,
|
(tag >> 24) & 0xff,
|
||||||
(tag >> 24) & 0xff,
|
tag,
|
||||||
tag,
|
tag_size);
|
||||||
tag_size);
|
|
||||||
#endif
|
|
||||||
if (tag_size < 10 && tag != MKTAG('D', 'A', 'T', 'A'))
|
if (tag_size < 10 && tag != MKTAG('D', 'A', 'T', 'A'))
|
||||||
return -1;
|
return -1;
|
||||||
switch(tag) {
|
switch(tag) {
|
||||||
|
@ -1974,22 +1974,20 @@ static void av_estimate_timings(AVFormatContext *ic, int64_t old_offset)
|
|||||||
}
|
}
|
||||||
av_update_stream_timings(ic);
|
av_update_stream_timings(ic);
|
||||||
|
|
||||||
#if 0
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
for(i = 0;i < ic->nb_streams; i++) {
|
for(i = 0;i < ic->nb_streams; i++) {
|
||||||
st = ic->streams[i];
|
st = ic->streams[i];
|
||||||
printf("%d: start_time: %0.3f duration: %0.3f\n",
|
av_dlog(ic, "%d: start_time: %0.3f duration: %0.3f\n", i,
|
||||||
i, (double)st->start_time / AV_TIME_BASE,
|
(double) st->start_time / AV_TIME_BASE,
|
||||||
(double)st->duration / AV_TIME_BASE);
|
(double) st->duration / AV_TIME_BASE);
|
||||||
}
|
}
|
||||||
printf("stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n",
|
av_dlog(ic, "stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n",
|
||||||
(double)ic->start_time / AV_TIME_BASE,
|
(double) ic->start_time / AV_TIME_BASE,
|
||||||
(double)ic->duration / AV_TIME_BASE,
|
(double) ic->duration / AV_TIME_BASE,
|
||||||
ic->bit_rate / 1000);
|
ic->bit_rate / 1000);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int has_codec_parameters(AVCodecContext *enc)
|
static int has_codec_parameters(AVCodecContext *enc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user