Signed-off-by: Michael Niedermayer <michaelni@gmx.at>tags/n0.9
| @@ -1958,11 +1958,9 @@ static int synchronize_audio(VideoState *is, short *samples, | |||||
| samples_size = wanted_size; | samples_size = wanted_size; | ||||
| } | } | ||||
| } | } | ||||
| #if 0 | |||||
| printf("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); | |||||
| #endif | |||||
| av_dlog(NULL, "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); | |||||
| } | } | ||||
| } else { | } else { | ||||
| /* too big difference : may be initial PTS errors, so | /* too big difference : may be initial PTS errors, so | ||||
| @@ -397,10 +397,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 | |||||
| printf("%2d:%d in=%x %x %d\n", | |||||
| j, i, vmax, scale_factor_table[index], index); | |||||
| #endif | |||||
| av_dlog(NULL, "%2d:%d in=%x %x %d\n", | |||||
| j, i, vmax, scale_factor_table[index], index); | |||||
| /* store the scale factor */ | /* store the scale factor */ | ||||
| assert(index >=0 && index <= 63); | assert(index >=0 && index <= 63); | ||||
| sf[i] = index; | sf[i] = index; | ||||
| @@ -468,10 +466,8 @@ static void compute_scale_factors(unsigned char scale_code[SBLIMIT], | |||||
| code = 0; /* kill warning */ | code = 0; /* kill warning */ | ||||
| } | } | ||||
| #if 0 | |||||
| printf("%d: %2d %2d %2d %d %d -> %d\n", j, | |||||
| sf[0], sf[1], sf[2], d1, d2, code); | |||||
| #endif | |||||
| av_dlog(NULL, "%d: %2d %2d %2d %d %d -> %d\n", j, | |||||
| sf[0], sf[1], sf[2], d1, d2, code); | |||||
| scale_code[j] = code; | scale_code[j] = code; | ||||
| sf += 3; | sf += 3; | ||||
| } | } | ||||
| @@ -151,10 +151,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 | |||||
| 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); | |||||
| #endif | |||||
| av_dlog(NULL, "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); | |||||
| *poutbuf = buf; | *poutbuf = buf; | ||||
| *poutbuf_size = buf_size; | *poutbuf_size = buf_size; | ||||
| @@ -219,12 +219,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); | |||||
| printf("%X %X %X %X\n", (*buf)[0], (*buf)[1],(*buf)[2],(*buf)[3]); | |||||
| av_dlog(pc, "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, "%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--){ | ||||
| @@ -154,14 +154,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 | |||||
| printf("v4l: colour=%d hue=%d brightness=%d constrast=%d whiteness=%d\n", | |||||
| pict.colour, | |||||
| pict.hue, | |||||
| pict.brightness, | |||||
| pict.contrast, | |||||
| pict.whiteness); | |||||
| #endif | |||||
| av_dlog(s1, "v4l: colour=%d hue=%d brightness=%d constrast=%d whiteness=%d\n", | |||||
| pict.colour, pict.hue, pict.brightness, pict.contrast, pict.whiteness); | |||||
| /* 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; | ||||
| @@ -662,10 +662,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, | |||||
| id = stream->id; | id = stream->id; | ||||
| #if 0 | |||||
| printf("packet ID=%2x PTS=%0.3f\n", | |||||
| id, pts / 90000.0); | |||||
| #endif | |||||
| av_dlog(ctx, "packet ID=%2x PTS=%0.3f\n", id, pts / 90000.0); | |||||
| buf_ptr = buffer; | buf_ptr = buffer; | ||||
| @@ -429,15 +429,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 | |||||
| printf("tag=%c%c%c%c (%08x) size=%d\n", | |||||
| (tag) & 0xff, | |||||
| (tag >> 8) & 0xff, | |||||
| (tag >> 16) & 0xff, | |||||
| (tag >> 24) & 0xff, | |||||
| tag, | |||||
| tag_size); | |||||
| #endif | |||||
| av_dlog(s, "tag=%c%c%c%c (%08x) size=%d\n", | |||||
| (tag ) & 0xff, | |||||
| (tag >> 8) & 0xff, | |||||
| (tag >> 16) & 0xff, | |||||
| (tag >> 24) & 0xff, | |||||
| tag, | |||||
| tag_size); | |||||
| 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) { | ||||
| @@ -2084,22 +2084,20 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) | |||||
| } | } | ||||
| update_stream_timings(ic); | update_stream_timings(ic); | ||||
| #if 0 | |||||
| { | { | ||||
| int i; | int i; | ||||
| AVStream av_unused *st; | AVStream av_unused *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", | |||||
| i, (double)st->start_time / AV_TIME_BASE, | |||||
| (double)st->duration / AV_TIME_BASE); | |||||
| av_dlog(ic, "%d: start_time: %0.3f duration: %0.3f\n", i, | |||||
| (double) st->start_time / AV_TIME_BASE, | |||||
| (double) st->duration / AV_TIME_BASE); | |||||
| } | } | ||||
| printf("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, | |||||
| ic->bit_rate / 1000); | |||||
| 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->duration / AV_TIME_BASE, | |||||
| ic->bit_rate / 1000); | |||||
| } | } | ||||
| #endif | |||||
| } | } | ||||
| static int has_codec_parameters(AVCodecContext *avctx) | static int has_codec_parameters(AVCodecContext *avctx) | ||||