dprintf clashes with POSIX.1-2008
Unified · Split
| @@ -253,24 +253,24 @@ static av_cold void dprint_specific_config(ALSDecContext *ctx) · 252 unmodified lines | |||
| 253 | AVCodecContext *avctx = ctx->avctx; | 253 | AVCodecContext *avctx = ctx->avctx; |
| 254 | ALSSpecificConfig *sconf = &ctx->sconf; | 254 | ALSSpecificConfig *sconf = &ctx->sconf; |
| 255 | 255 | ||
| 256 | dprintf(avctx, "resolution = %i\n", sconf->resolution); | 256 | av_dlog(avctx, "resolution = %i\n", sconf->resolution); |
| 257 | dprintf(avctx, "floating = %i\n", sconf->floating); | 257 | av_dlog(avctx, "floating = %i\n", sconf->floating); |
| 258 | dprintf(avctx, "frame_length = %i\n", sconf->frame_length); | 258 | av_dlog(avctx, "frame_length = %i\n", sconf->frame_length); |
| 259 | dprintf(avctx, "ra_distance = %i\n", sconf->ra_distance); | 259 | av_dlog(avctx, "ra_distance = %i\n", sconf->ra_distance); |
| 260 | dprintf(avctx, "ra_flag = %i\n", sconf->ra_flag); | 260 | av_dlog(avctx, "ra_flag = %i\n", sconf->ra_flag); |
| 261 | dprintf(avctx, "adapt_order = %i\n", sconf->adapt_order); | 261 | av_dlog(avctx, "adapt_order = %i\n", sconf->adapt_order); |
| 262 | dprintf(avctx, "coef_table = %i\n", sconf->coef_table); | 262 | av_dlog(avctx, "coef_table = %i\n", sconf->coef_table); |
| 263 | dprintf(avctx, "long_term_prediction = %i\n", sconf->long_term_prediction); | 263 | av_dlog(avctx, "long_term_prediction = %i\n", sconf->long_term_prediction); |
| 264 | dprintf(avctx, "max_order = %i\n", sconf->max_order); | 264 | av_dlog(avctx, "max_order = %i\n", sconf->max_order); |
| 265 | dprintf(avctx, "block_switching = %i\n", sconf->block_switching); | 265 | av_dlog(avctx, "block_switching = %i\n", sconf->block_switching); |
| 266 | dprintf(avctx, "bgmc = %i\n", sconf->bgmc); | 266 | av_dlog(avctx, "bgmc = %i\n", sconf->bgmc); |
| 267 | dprintf(avctx, "sb_part = %i\n", sconf->sb_part); | 267 | av_dlog(avctx, "sb_part = %i\n", sconf->sb_part); |
| 268 | dprintf(avctx, "joint_stereo = %i\n", sconf->joint_stereo); | 268 | av_dlog(avctx, "joint_stereo = %i\n", sconf->joint_stereo); |
| 269 | dprintf(avctx, "mc_coding = %i\n", sconf->mc_coding); | 269 | av_dlog(avctx, "mc_coding = %i\n", sconf->mc_coding); |
| 270 | dprintf(avctx, "chan_config = %i\n", sconf->chan_config); | 270 | av_dlog(avctx, "chan_config = %i\n", sconf->chan_config); |
| 271 | dprintf(avctx, "chan_sort = %i\n", sconf->chan_sort); | 271 | av_dlog(avctx, "chan_sort = %i\n", sconf->chan_sort); |
| 272 | dprintf(avctx, "RLSLMS = %i\n", sconf->rlslms); | 272 | av_dlog(avctx, "RLSLMS = %i\n", sconf->rlslms); |
| 273 | dprintf(avctx, "chan_config_info = %i\n", sconf->chan_config_info); | 273 | av_dlog(avctx, "chan_config_info = %i\n", sconf->chan_config_info); |
| 274 | #endif | 274 | #endif |
| 275 | } | 275 | } |
| 276 | 276 | ||
| @@ -107,7 +107,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si · 106 unmodified lines | |||
| 107 | ctx->height = AV_RB16(buf + 0x18); | 107 | ctx->height = AV_RB16(buf + 0x18); |
| 108 | ctx->width = AV_RB16(buf + 0x1a); | 108 | ctx->width = AV_RB16(buf + 0x1a); |
| 109 | 109 | ||
| 110 | dprintf(ctx->avctx, "width %d, heigth %d\n", ctx->width, ctx->height); | 110 | av_dlog(ctx->avctx, "width %d, heigth %d\n", ctx->width, ctx->height); |
| 111 | 111 | ||
| 112 | if (buf[0x21] & 0x40) { | 112 | if (buf[0x21] & 0x40) { |
| 113 | av_log(ctx->avctx, AV_LOG_ERROR, "10 bit per component\n"); | 113 | av_log(ctx->avctx, AV_LOG_ERROR, "10 bit per component\n"); |
| @@ -115,7 +115,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si · 1 unmodified line | |||
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | ctx->cid = AV_RB32(buf + 0x28); | 117 | ctx->cid = AV_RB32(buf + 0x28); |
| 118 | dprintf(ctx->avctx, "compression id %d\n", ctx->cid); | 118 | av_dlog(ctx->avctx, "compression id %d\n", ctx->cid); |
| 119 | 119 | ||
| 120 | if (dnxhd_init_vlc(ctx, ctx->cid) < 0) | 120 | if (dnxhd_init_vlc(ctx, ctx->cid) < 0) |
| 121 | return -1; | 121 | return -1; |
| @@ -128,7 +128,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si · 6 unmodified lines | |||
| 128 | ctx->mb_width = ctx->width>>4; | 128 | ctx->mb_width = ctx->width>>4; |
| 129 | ctx->mb_height = buf[0x16d]; | 129 | ctx->mb_height = buf[0x16d]; |
| 130 | 130 | ||
| 131 | dprintf(ctx->avctx, "mb width %d, mb height %d\n", ctx->mb_width, ctx->mb_height); | 131 | av_dlog(ctx->avctx, "mb width %d, mb height %d\n", ctx->mb_width, ctx->mb_height); |
| 132 | 132 | ||
| 133 | if ((ctx->height+15)>>4 == ctx->mb_height && ctx->picture.interlaced_frame) | 133 | if ((ctx->height+15)>>4 == ctx->mb_height && ctx->picture.interlaced_frame) |
| 134 | ctx->height <<= 1; | 134 | ctx->height <<= 1; |
| @@ -141,7 +141,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si · 6 unmodified lines | |||
| 141 | 141 | ||
| 142 | for (i = 0; i < ctx->mb_height; i++) { | 142 | for (i = 0; i < ctx->mb_height; i++) { |
| 143 | ctx->mb_scan_index[i] = AV_RB32(buf + 0x170 + (i<<2)); | 143 | ctx->mb_scan_index[i] = AV_RB32(buf + 0x170 + (i<<2)); |
| 144 | dprintf(ctx->avctx, "mb scan index %d\n", ctx->mb_scan_index[i]); | 144 | av_dlog(ctx->avctx, "mb scan index %d\n", ctx->mb_scan_index[i]); |
| 145 | if (buf_size < ctx->mb_scan_index[i] + 0x280) { | 145 | if (buf_size < ctx->mb_scan_index[i] + 0x280) { |
| 146 | av_log(ctx->avctx, AV_LOG_ERROR, "invalid mb scan index\n"); | 146 | av_log(ctx->avctx, AV_LOG_ERROR, "invalid mb scan index\n"); |
| 147 | return -1; | 147 | return -1; |
| @@ -293,7 +293,7 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 145 unmodified lines | |||
| 293 | AVFrame *picture = data; | 293 | AVFrame *picture = data; |
| 294 | int first_field = 1; | 294 | int first_field = 1; |
| 295 | 295 | ||
| 296 | dprintf(avctx, "frame size %d\n", buf_size); | 296 | av_dlog(avctx, "frame size %d\n", buf_size); |
| 297 | 297 | ||
| 298 | decode_coding_unit: | 298 | decode_coding_unit: |
| 299 | if (dnxhd_decode_header(ctx, buf, buf_size, first_field) < 0) | 299 | if (dnxhd_decode_header(ctx, buf, buf_size, first_field) < 0) |
| @@ -552,7 +552,7 @@ static int dnxhd_encode_rdo(AVCodecContext *avctx, DNXHDEncContext *ctx) · 551 unmodified lines | |||
| 552 | if (bits > ctx->frame_bits) | 552 | if (bits > ctx->frame_bits) |
| 553 | break; | 553 | break; |
| 554 | } | 554 | } |
| 555 | //dprintf(ctx->m.avctx, "lambda %d, up %u, down %u, bits %d, frame %d\n", | 555 | //av_dlog(ctx->m.avctx, "lambda %d, up %u, down %u, bits %d, frame %d\n", |
| 556 | // lambda, last_higher, last_lower, bits, ctx->frame_bits); | 556 | // lambda, last_higher, last_lower, bits, ctx->frame_bits); |
| 557 | if (end) { | 557 | if (end) { |
| 558 | if (bits > ctx->frame_bits) | 558 | if (bits > ctx->frame_bits) |
| @@ -582,7 +582,7 @@ static int dnxhd_encode_rdo(AVCodecContext *avctx, DNXHDEncContext *ctx) · 23 unmodified lines | |||
| 582 | down_step = 1<<LAMBDA_FRAC_BITS; | 582 | down_step = 1<<LAMBDA_FRAC_BITS; |
| 583 | } | 583 | } |
| 584 | } | 584 | } |
| 585 | //dprintf(ctx->m.avctx, "out lambda %d\n", lambda); | 585 | //av_dlog(ctx->m.avctx, "out lambda %d\n", lambda); |
| 586 | ctx->lambda = lambda; | 586 | ctx->lambda = lambda; |
| 587 | return 0; | 587 | return 0; |
| 588 | } | 588 | } |
| @@ -610,7 +610,7 @@ static int dnxhd_find_qscale(DNXHDEncContext *ctx) · 21 unmodified lines | |||
| 610 | if (bits > ctx->frame_bits) | 610 | if (bits > ctx->frame_bits) |
| 611 | break; | 611 | break; |
| 612 | } | 612 | } |
| 613 | //dprintf(ctx->m.avctx, "%d, qscale %d, bits %d, frame %d, higher %d, lower %d\n", | 613 | //av_dlog(ctx->m.avctx, "%d, qscale %d, bits %d, frame %d, higher %d, lower %d\n", |
| 614 | // ctx->m.avctx->frame_number, qscale, bits, ctx->frame_bits, last_higher, last_lower); | 614 | // ctx->m.avctx->frame_number, qscale, bits, ctx->frame_bits, last_higher, last_lower); |
| 615 | if (bits < ctx->frame_bits) { | 615 | if (bits < ctx->frame_bits) { |
| 616 | if (qscale == 1) | 616 | if (qscale == 1) |
| @@ -640,7 +640,7 @@ static int dnxhd_find_qscale(DNXHDEncContext *ctx) · 23 unmodified lines | |||
| 640 | return -1; | 640 | return -1; |
| 641 | } | 641 | } |
| 642 | } | 642 | } |
| 643 | //dprintf(ctx->m.avctx, "out qscale %d\n", qscale); | 643 | //av_dlog(ctx->m.avctx, "out qscale %d\n", qscale); |
| 644 | ctx->qscale = qscale; | 644 | ctx->qscale = qscale; |
| 645 | return 0; | 645 | return 0; |
| 646 | } | 646 | } |
| @@ -55,7 +55,7 @@ static int dvbsub_parse(AVCodecParserContext *s, · 54 unmodified lines | |||
| 55 | uint8_t *p, *p_end; | 55 | uint8_t *p, *p_end; |
| 56 | int len, buf_pos = 0; | 56 | int len, buf_pos = 0; |
| 57 | 57 | ||
| 58 | dprintf(avctx, "DVB parse packet pts=%"PRIx64", lpts=%"PRIx64", cpts=%"PRIx64":\n", | 58 | av_dlog(avctx, "DVB parse packet pts=%"PRIx64", lpts=%"PRIx64", cpts=%"PRIx64":\n", |
| 59 | s->pts, s->last_pts, s->cur_frame_pts[s->cur_frame_start_index]); | 59 | s->pts, s->last_pts, s->cur_frame_pts[s->cur_frame_start_index]); |
| 60 | 60 | ||
| 61 | #ifdef DEBUG_PACKET_CONTENTS | 61 | #ifdef DEBUG_PACKET_CONTENTS |
| @@ -82,7 +82,7 @@ static int dvbsub_parse(AVCodecParserContext *s, · 20 unmodified lines | |||
| 82 | { | 82 | { |
| 83 | if (pc->packet_index != pc->packet_start) | 83 | if (pc->packet_index != pc->packet_start) |
| 84 | { | 84 | { |
| 85 | dprintf(avctx, "Discarding %d bytes\n", | 85 | av_dlog(avctx, "Discarding %d bytes\n", |
| 86 | pc->packet_index - pc->packet_start); | 86 | pc->packet_index - pc->packet_start); |
| 87 | } | 87 | } |
| 88 | 88 | ||
| @@ -90,7 +90,7 @@ static int dvbsub_parse(AVCodecParserContext *s, · 1 unmodified line | |||
| 90 | pc->packet_index = 0; | 90 | pc->packet_index = 0; |
| 91 | 91 | ||
| 92 | if (buf_size < 2 || buf[0] != 0x20 || buf[1] != 0x00) { | 92 | if (buf_size < 2 || buf[0] != 0x20 || buf[1] != 0x00) { |
| 93 | dprintf(avctx, "Bad packet header\n"); | 93 | av_dlog(avctx, "Bad packet header\n"); |
| 94 | return -1; | 94 | return -1; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| @@ -147,7 +147,7 @@ static int dvbsub_parse(AVCodecParserContext *s, · 50 unmodified lines | |||
| 147 | } else if (*p == 0xff) { | 147 | } else if (*p == 0xff) { |
| 148 | if (p + 1 < p_end) | 148 | if (p + 1 < p_end) |
| 149 | { | 149 | { |
| 150 | dprintf(avctx, "Junk at end of packet\n"); | 150 | av_dlog(avctx, "Junk at end of packet\n"); |
| 151 | } | 151 | } |
| 152 | pc->packet_index = p - pc->packet_buf; | 152 | pc->packet_index = p - pc->packet_buf; |
| 153 | pc->in_packet = 0; | 153 | pc->in_packet = 0; |
| @@ -749,7 +749,7 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis · 748 unmodified lines | |||
| 749 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; | 749 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; |
| 750 | uint8_t *map_table; | 750 | uint8_t *map_table; |
| 751 | 751 | ||
| 752 | dprintf(avctx, "DVB pixel block size %d, %s field:\n", buf_size, | 752 | av_dlog(avctx, "DVB pixel block size %d, %s field:\n", buf_size, |
| 753 | top_bottom ? "bottom" : "top"); | 753 | top_bottom ? "bottom" : "top"); |
| 754 | 754 | ||
| 755 | #ifdef DEBUG_PACKET_CONTENTS | 755 | #ifdef DEBUG_PACKET_CONTENTS |
| @@ -984,7 +984,7 @@ static void dvbsub_parse_clut_segment(AVCodecContext *avctx, · 228 unmodified lines | |||
| 984 | YUV_TO_RGB1_CCIR(cb, cr); | 984 | YUV_TO_RGB1_CCIR(cb, cr); |
| 985 | YUV_TO_RGB2_CCIR(r, g, b, y); | 985 | YUV_TO_RGB2_CCIR(r, g, b, y); |
| 986 | 986 | ||
| 987 | dprintf(avctx, "clut %d := (%d,%d,%d,%d)\n", entry_id, r, g, b, alpha); | 987 | av_dlog(avctx, "clut %d := (%d,%d,%d,%d)\n", entry_id, r, g, b, alpha); |
| 988 | 988 | ||
| 989 | if (depth & 0x80) | 989 | if (depth & 0x80) |
| 990 | clut->clut4[entry_id] = RGBA(r,g,b,255 - alpha); | 990 | clut->clut4[entry_id] = RGBA(r,g,b,255 - alpha); |
| @@ -1060,11 +1060,11 @@ static void dvbsub_parse_region_segment(AVCodecContext *avctx, · 69 unmodified lines | |||
| 1060 | region->bgcolor = (((*buf++) >> 2) & 3); | 1060 | region->bgcolor = (((*buf++) >> 2) & 3); |
| 1061 | } | 1061 | } |
| 1062 | 1062 | ||
| 1063 | dprintf(avctx, "Region %d, (%dx%d)\n", region_id, region->width, region->height); | 1063 | av_dlog(avctx, "Region %d, (%dx%d)\n", region_id, region->width, region->height); |
| 1064 | 1064 | ||
| 1065 | if (fill) { | 1065 | if (fill) { |
| 1066 | memset(region->pbuf, region->bgcolor, region->buf_size); | 1066 | memset(region->pbuf, region->bgcolor, region->buf_size); |
| 1067 | dprintf(avctx, "Fill region (%d)\n", region->bgcolor); | 1067 | av_dlog(avctx, "Fill region (%d)\n", region->bgcolor); |
| 1068 | } | 1068 | } |
| 1069 | 1069 | ||
| 1070 | delete_region_display_list(ctx, region); | 1070 | delete_region_display_list(ctx, region); |
| @@ -1125,7 +1125,7 @@ static void dvbsub_parse_page_segment(AVCodecContext *avctx, · 54 unmodified lines | |||
| 1125 | ctx->time_out = *buf++; | 1125 | ctx->time_out = *buf++; |
| 1126 | page_state = ((*buf++) >> 2) & 3; | 1126 | page_state = ((*buf++) >> 2) & 3; |
| 1127 | 1127 | ||
| 1128 | dprintf(avctx, "Page time out %ds, state %d\n", ctx->time_out, page_state); | 1128 | av_dlog(avctx, "Page time out %ds, state %d\n", ctx->time_out, page_state); |
| 1129 | 1129 | ||
| 1130 | if (page_state == 2) { | 1130 | if (page_state == 2) { |
| 1131 | delete_state(ctx); | 1131 | delete_state(ctx); |
| @@ -1163,7 +1163,7 @@ static void dvbsub_parse_page_segment(AVCodecContext *avctx, · 31 unmodified lines | |||
| 1163 | ctx->display_list = display; | 1163 | ctx->display_list = display; |
| 1164 | ctx->display_list_size++; | 1164 | ctx->display_list_size++; |
| 1165 | 1165 | ||
| 1166 | dprintf(avctx, "Region %d, (%d,%d)\n", region_id, display->x_pos, display->y_pos); | 1166 | av_dlog(avctx, "Region %d, (%d,%d)\n", region_id, display->x_pos, display->y_pos); |
| 1167 | } | 1167 | } |
| 1168 | 1168 | ||
| 1169 | while (tmp_display_list) { | 1169 | while (tmp_display_list) { |
| @@ -1461,7 +1461,7 @@ static int dvbsub_decode(AVCodecContext *avctx, · 291 unmodified lines | |||
| 1461 | *data_size = dvbsub_display_end_segment(avctx, p, segment_length, sub); | 1461 | *data_size = dvbsub_display_end_segment(avctx, p, segment_length, sub); |
| 1462 | break; | 1462 | break; |
| 1463 | default: | 1463 | default: |
| 1464 | dprintf(avctx, "Subtitling segment type 0x%x, page id %d, length %d\n", | 1464 | av_dlog(avctx, "Subtitling segment type 0x%x, page id %d, length %d\n", |
| 1465 | segment_type, page_id, segment_length); | 1465 | segment_type, page_id, segment_length); |
| 1466 | break; | 1466 | break; |
| 1467 | } | 1467 | } |
| @@ -1471,7 +1471,7 @@ static int dvbsub_decode(AVCodecContext *avctx, · 3 unmodified lines | |||
| 1471 | } | 1471 | } |
| 1472 | 1472 | ||
| 1473 | if (p != p_end) { | 1473 | if (p != p_end) { |
| 1474 | dprintf(avctx, "Junk at end of packet\n"); | 1474 | av_dlog(avctx, "Junk at end of packet\n"); |
| 1475 | return -1; | 1475 | return -1; |
| 1476 | } | 1476 | } |
| 1477 | 1477 | ||
| @@ -190,7 +190,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header, · 189 unmodified lines | |||
| 190 | while (cmd_pos > 0 && cmd_pos < buf_size - 2 - offset_size) { | 190 | while (cmd_pos > 0 && cmd_pos < buf_size - 2 - offset_size) { |
| 191 | date = AV_RB16(buf + cmd_pos); | 191 | date = AV_RB16(buf + cmd_pos); |
| 192 | next_cmd_pos = READ_OFFSET(buf + cmd_pos + 2); | 192 | next_cmd_pos = READ_OFFSET(buf + cmd_pos + 2); |
| 193 | dprintf(NULL, "cmd_pos=0x%04x next=0x%04x date=%d\n", | 193 | av_dlog(NULL, "cmd_pos=0x%04x next=0x%04x date=%d\n", |
| 194 | cmd_pos, next_cmd_pos, date); | 194 | cmd_pos, next_cmd_pos, date); |
| 195 | pos = cmd_pos + 2 + offset_size; | 195 | pos = cmd_pos + 2 + offset_size; |
| 196 | offset1 = -1; | 196 | offset1 = -1; |
| @@ -198,7 +198,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header, · 1 unmodified line | |||
| 198 | x1 = y1 = x2 = y2 = 0; | 198 | x1 = y1 = x2 = y2 = 0; |
| 199 | while (pos < buf_size) { | 199 | while (pos < buf_size) { |
| 200 | cmd = buf[pos++]; | 200 | cmd = buf[pos++]; |
| 201 | dprintf(NULL, "cmd=%02x\n", cmd); | 201 | av_dlog(NULL, "cmd=%02x\n", cmd); |
| 202 | switch(cmd) { | 202 | switch(cmd) { |
| 203 | case 0x00: | 203 | case 0x00: |
| 204 | /* menu subpicture */ | 204 | /* menu subpicture */ |
| @@ -231,7 +231,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header, · 26 unmodified lines | |||
| 231 | alpha[1] = buf[pos + 1] >> 4; | 231 | alpha[1] = buf[pos + 1] >> 4; |
| 232 | alpha[0] = buf[pos + 1] & 0x0f; | 232 | alpha[0] = buf[pos + 1] & 0x0f; |
| 233 | pos += 2; | 233 | pos += 2; |
| 234 | dprintf(NULL, "alpha=%x%x%x%x\n", alpha[0],alpha[1],alpha[2],alpha[3]); | 234 | av_dlog(NULL, "alpha=%x%x%x%x\n", alpha[0],alpha[1],alpha[2],alpha[3]); |
| 235 | break; | 235 | break; |
| 236 | case 0x05: | 236 | case 0x05: |
| 237 | case 0x85: | 237 | case 0x85: |
| @@ -243,7 +243,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header, · 5 unmodified lines | |||
| 243 | y2 = ((buf[pos + 4] & 0x0f) << 8) | buf[pos + 5]; | 243 | y2 = ((buf[pos + 4] & 0x0f) << 8) | buf[pos + 5]; |
| 244 | if (cmd & 0x80) | 244 | if (cmd & 0x80) |
| 245 | is_8bit = 1; | 245 | is_8bit = 1; |
| 246 | dprintf(NULL, "x1=%d x2=%d y1=%d y2=%d\n", x1, x2, y1, y2); | 246 | av_dlog(NULL, "x1=%d x2=%d y1=%d y2=%d\n", x1, x2, y1, y2); |
| 247 | pos += 6; | 247 | pos += 6; |
| 248 | break; | 248 | break; |
| 249 | case 0x06: | 249 | case 0x06: |
| @@ -251,7 +251,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header, · 1 unmodified line | |||
| 251 | goto fail; | 251 | goto fail; |
| 252 | offset1 = AV_RB16(buf + pos); | 252 | offset1 = AV_RB16(buf + pos); |
| 253 | offset2 = AV_RB16(buf + pos + 2); | 253 | offset2 = AV_RB16(buf + pos + 2); |
| 254 | dprintf(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2); | 254 | av_dlog(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2); |
| 255 | pos += 4; | 255 | pos += 4; |
| 256 | break; | 256 | break; |
| 257 | case 0x86: | 257 | case 0x86: |
| @@ -259,7 +259,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header, · 1 unmodified line | |||
| 259 | goto fail; | 259 | goto fail; |
| 260 | offset1 = AV_RB32(buf + pos); | 260 | offset1 = AV_RB32(buf + pos); |
| 261 | offset2 = AV_RB32(buf + pos + 4); | 261 | offset2 = AV_RB32(buf + pos + 4); |
| 262 | dprintf(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2); | 262 | av_dlog(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2); |
| 263 | pos += 8; | 263 | pos += 8; |
| 264 | break; | 264 | break; |
| 265 | 265 | ||
| @@ -282,7 +282,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header, · 16 unmodified lines | |||
| 282 | case 0xff: | 282 | case 0xff: |
| 283 | goto the_end; | 283 | goto the_end; |
| 284 | default: | 284 | default: |
| 285 | dprintf(NULL, "unrecognised subpicture command 0x%x\n", cmd); | 285 | av_dlog(NULL, "unrecognised subpicture command 0x%x\n", cmd); |
| 286 | goto the_end; | 286 | goto the_end; |
| 287 | } | 287 | } |
| 288 | } | 288 | } |
| @@ -475,7 +475,7 @@ static int dvdsub_decode(AVCodecContext *avctx, · 186 unmodified lines | |||
| 475 | goto no_subtitle; | 475 | goto no_subtitle; |
| 476 | 476 | ||
| 477 | #if defined(DEBUG) | 477 | #if defined(DEBUG) |
| 478 | dprintf(NULL, "start=%d ms end =%d ms\n", | 478 | av_dlog(NULL, "start=%d ms end =%d ms\n", |
| 479 | sub->start_display_time, | 479 | sub->start_display_time, |
| 480 | sub->end_display_time); | 480 | sub->end_display_time); |
| 481 | ppm_save("/tmp/a.ppm", sub->rects[0]->pict.data[0], | 481 | ppm_save("/tmp/a.ppm", sub->rects[0]->pict.data[0], |
| @@ -77,7 +77,7 @@ static int gif_read_image(GifState *s) · 76 unmodified lines | |||
| 77 | has_local_palette = flags & 0x80; | 77 | has_local_palette = flags & 0x80; |
| 78 | bits_per_pixel = (flags & 0x07) + 1; | 78 | bits_per_pixel = (flags & 0x07) + 1; |
| 79 | 79 | ||
| 80 | dprintf(s->avctx, "gif: image x=%d y=%d w=%d h=%d\n", left, top, width, height); | 80 | av_dlog(s->avctx, "gif: image x=%d y=%d w=%d h=%d\n", left, top, width, height); |
| 81 | 81 | ||
| 82 | if (has_local_palette) { | 82 | if (has_local_palette) { |
| 83 | bytestream_get_buffer(&s->bytestream, s->local_palette, 3 * (1 << bits_per_pixel)); | 83 | bytestream_get_buffer(&s->bytestream, s->local_palette, 3 * (1 << bits_per_pixel)); |
| @@ -163,7 +163,7 @@ static int gif_read_extension(GifState *s) · 79 unmodified lines | |||
| 163 | ext_code = bytestream_get_byte(&s->bytestream); | 163 | ext_code = bytestream_get_byte(&s->bytestream); |
| 164 | ext_len = bytestream_get_byte(&s->bytestream); | 164 | ext_len = bytestream_get_byte(&s->bytestream); |
| 165 | 165 | ||
| 166 | dprintf(s->avctx, "gif: ext_code=0x%x len=%d\n", ext_code, ext_len); | 166 | av_dlog(s->avctx, "gif: ext_code=0x%x len=%d\n", ext_code, ext_len); |
| 167 | 167 | ||
| 168 | switch(ext_code) { | 168 | switch(ext_code) { |
| 169 | case 0xf9: | 169 | case 0xf9: |
| @@ -179,7 +179,7 @@ static int gif_read_extension(GifState *s) · 9 unmodified lines | |||
| 179 | s->transparent_color_index = -1; | 179 | s->transparent_color_index = -1; |
| 180 | s->gce_disposal = (gce_flags >> 2) & 0x7; | 180 | s->gce_disposal = (gce_flags >> 2) & 0x7; |
| 181 | 181 | ||
| 182 | dprintf(s->avctx, "gif: gce_flags=%x delay=%d tcolor=%d disposal=%d\n", | 182 | av_dlog(s->avctx, "gif: gce_flags=%x delay=%d tcolor=%d disposal=%d\n", |
| 183 | gce_flags, s->gce_delay, | 183 | gce_flags, s->gce_delay, |
| 184 | s->transparent_color_index, s->gce_disposal); | 184 | s->transparent_color_index, s->gce_disposal); |
| 185 | 185 | ||
| @@ -194,7 +194,7 @@ static int gif_read_extension(GifState *s) · 8 unmodified lines | |||
| 194 | bytestream_get_byte(&s->bytestream); | 194 | bytestream_get_byte(&s->bytestream); |
| 195 | ext_len = bytestream_get_byte(&s->bytestream); | 195 | ext_len = bytestream_get_byte(&s->bytestream); |
| 196 | 196 | ||
| 197 | dprintf(s->avctx, "gif: ext_len1=%d\n", ext_len); | 197 | av_dlog(s->avctx, "gif: ext_len1=%d\n", ext_len); |
| 198 | } | 198 | } |
| 199 | return 0; | 199 | return 0; |
| 200 | } | 200 | } |
| @@ -231,7 +231,7 @@ static int gif_read_header1(GifState *s) · 30 unmodified lines | |||
| 231 | s->background_color_index = bytestream_get_byte(&s->bytestream); | 231 | s->background_color_index = bytestream_get_byte(&s->bytestream); |
| 232 | bytestream_get_byte(&s->bytestream); /* ignored */ | 232 | bytestream_get_byte(&s->bytestream); /* ignored */ |
| 233 | 233 | ||
| 234 | dprintf(s->avctx, "gif: screen_w=%d screen_h=%d bpp=%d global_palette=%d\n", | 234 | av_dlog(s->avctx, "gif: screen_w=%d screen_h=%d bpp=%d global_palette=%d\n", |
| 235 | s->screen_width, s->screen_height, s->bits_per_pixel, | 235 | s->screen_width, s->screen_height, s->bits_per_pixel, |
| 236 | has_global_palette); | 236 | has_global_palette); |
| 237 | 237 | ||
| @@ -249,7 +249,7 @@ static int gif_parse_next_image(GifState *s) · 11 unmodified lines | |||
| 249 | while (s->bytestream < s->bytestream_end) { | 249 | while (s->bytestream < s->bytestream_end) { |
| 250 | int code = bytestream_get_byte(&s->bytestream); | 250 | int code = bytestream_get_byte(&s->bytestream); |
| 251 | 251 | ||
| 252 | dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code); | 252 | av_dlog(s->avctx, "gif: code=%02x '%c'\n", code, code); |
| 253 | 253 | ||
| 254 | switch (code) { | 254 | switch (code) { |
| 255 | case ',': | 255 | case ',': |
| @@ -553,8 +553,8 @@ static int h261_decode_frame(AVCodecContext *avctx, · 552 unmodified lines | |||
| 553 | int ret; | 553 | int ret; |
| 554 | AVFrame *pict = data; | 554 | AVFrame *pict = data; |
| 555 | 555 | ||
| 556 | dprintf(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size); | 556 | av_dlog(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size); |
| 557 | dprintf(avctx, "bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]); | 557 | av_dlog(avctx, "bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]); |
| 558 | s->flags= avctx->flags; | 558 | s->flags= avctx->flags; |
| 559 | s->flags2= avctx->flags2; | 559 | s->flags2= avctx->flags2; |
| 560 | 560 | ||
| @@ -325,7 +325,7 @@ static int h263p_decode_umotion(MpegEncContext * s, int pred) · 324 unmodified lines | |||
| 325 | code >>= 1; | 325 | code >>= 1; |
| 326 | 326 | ||
| 327 | code = (sign) ? (pred - code) : (pred + code); | 327 | code = (sign) ? (pred - code) : (pred + code); |
| 328 | dprintf(s->avctx,"H.263+ UMV Motion = %d\n", code); | 328 | av_dlog(s->avctx,"H.263+ UMV Motion = %d\n", code); |
| 329 | return code; | 329 | return code; |
| 330 | 330 | ||
| 331 | } | 331 | } |
| @@ -951,7 +951,7 @@ int h263_decode_picture_header(MpegEncContext *s) · 619 unmodified lines | |||
| 951 | if (ufep == 1) { | 951 | if (ufep == 1) { |
| 952 | /* OPPTYPE */ | 952 | /* OPPTYPE */ |
| 953 | format = get_bits(&s->gb, 3); | 953 | format = get_bits(&s->gb, 3); |
| 954 | dprintf(s->avctx, "ufep=1, format: %d\n", format); | 954 | av_dlog(s->avctx, "ufep=1, format: %d\n", format); |
| 955 | s->custom_pcf= get_bits1(&s->gb); | 955 | s->custom_pcf= get_bits1(&s->gb); |
| 956 | s->umvplus = get_bits1(&s->gb); /* Unrestricted Motion Vector */ | 956 | s->umvplus = get_bits1(&s->gb); /* Unrestricted Motion Vector */ |
| 957 | if (get_bits1(&s->gb) != 0) { | 957 | if (get_bits1(&s->gb) != 0) { |
| @@ -1002,7 +1002,7 @@ int h263_decode_picture_header(MpegEncContext *s) · 44 unmodified lines | |||
| 1002 | if (format == 6) { | 1002 | if (format == 6) { |
| 1003 | /* Custom Picture Format (CPFMT) */ | 1003 | /* Custom Picture Format (CPFMT) */ |
| 1004 | s->aspect_ratio_info = get_bits(&s->gb, 4); | 1004 | s->aspect_ratio_info = get_bits(&s->gb, 4); |
| 1005 | dprintf(s->avctx, "aspect: %d\n", s->aspect_ratio_info); | 1005 | av_dlog(s->avctx, "aspect: %d\n", s->aspect_ratio_info); |
| 1006 | /* aspect ratios: | 1006 | /* aspect ratios: |
| 1007 | 0 - forbidden | 1007 | 0 - forbidden |
| 1008 | 1 - 1:1 | 1008 | 1 - 1:1 |
| @@ -1015,7 +1015,7 @@ int h263_decode_picture_header(MpegEncContext *s) · 6 unmodified lines | |||
| 1015 | width = (get_bits(&s->gb, 9) + 1) * 4; | 1015 | width = (get_bits(&s->gb, 9) + 1) * 4; |
| 1016 | skip_bits1(&s->gb); | 1016 | skip_bits1(&s->gb); |
| 1017 | height = get_bits(&s->gb, 9) * 4; | 1017 | height = get_bits(&s->gb, 9) * 4; |
| 1018 | dprintf(s->avctx, "\nH.263+ Custom picture: %dx%d\n",width,height); | 1018 | av_dlog(s->avctx, "\nH.263+ Custom picture: %dx%d\n",width,height); |
| 1019 | if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) { | 1019 | if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) { |
| 1020 | /* aspected dimensions */ | 1020 | /* aspected dimensions */ |
| 1021 | s->avctx->sample_aspect_ratio.num= get_bits(&s->gb, 8); | 1021 | s->avctx->sample_aspect_ratio.num= get_bits(&s->gb, 8); |
| @@ -1255,7 +1255,7 @@ static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end) · 1254 unmodified lines | |||
| 1255 | } | 1255 | } |
| 1256 | val = -1; | 1256 | val = -1; |
| 1257 | found: | 1257 | found: |
| 1258 | dprintf(NULL, "find_marker skipped %d bytes\n", skipped); | 1258 | av_dlog(NULL, "find_marker skipped %d bytes\n", skipped); |
| 1259 | *pbuf_ptr = buf_ptr; | 1259 | *pbuf_ptr = buf_ptr; |
| 1260 | return val; | 1260 | return val; |
| 1261 | } | 1261 | } |
| @@ -213,7 +213,7 @@ static int mpeg_decode_mb(MpegEncContext *s, · 212 unmodified lines | |||
| 213 | int i, j, k, cbp, val, mb_type, motion_type; | 213 | int i, j, k, cbp, val, mb_type, motion_type; |
| 214 | const int mb_block_count = 4 + (1<< s->chroma_format); | 214 | const int mb_block_count = 4 + (1<< s->chroma_format); |
| 215 | 215 | ||
| 216 | dprintf(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y); | 216 | av_dlog(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y); |
| 217 | 217 | ||
| 218 | assert(s->mb_skipped==0); | 218 | assert(s->mb_skipped==0); |
| 219 | 219 | ||
| @@ -272,7 +272,7 @@ static int mpeg_decode_mb(MpegEncContext *s, · 52 unmodified lines | |||
| 272 | mb_type = btype2mb_type[ mb_type ]; | 272 | mb_type = btype2mb_type[ mb_type ]; |
| 273 | break; | 273 | break; |
| 274 | } | 274 | } |
| 275 | dprintf(s->avctx, "mb_type=%x\n", mb_type); | 275 | av_dlog(s->avctx, "mb_type=%x\n", mb_type); |
| 276 | // motion_type = 0; /* avoid warning */ | 276 | // motion_type = 0; /* avoid warning */ |
| 277 | if (IS_INTRA(mb_type)) { | 277 | if (IS_INTRA(mb_type)) { |
| 278 | s->dsp.clear_blocks(s->block[0]); | 278 | s->dsp.clear_blocks(s->block[0]); |
| @@ -370,7 +370,7 @@ static int mpeg_decode_mb(MpegEncContext *s, · 91 unmodified lines | |||
| 370 | 370 | ||
| 371 | /* motion vectors */ | 371 | /* motion vectors */ |
| 372 | s->mv_dir= (mb_type>>13)&3; | 372 | s->mv_dir= (mb_type>>13)&3; |
| 373 | dprintf(s->avctx, "motion_type=%d\n", motion_type); | 373 | av_dlog(s->avctx, "motion_type=%d\n", motion_type); |
| 374 | switch(motion_type) { | 374 | switch(motion_type) { |
| 375 | case MT_FRAME: /* or MT_16X8 */ | 375 | case MT_FRAME: /* or MT_16X8 */ |
| 376 | if (s->picture_structure == PICT_FRAME) { | 376 | if (s->picture_structure == PICT_FRAME) { |
| @@ -421,12 +421,12 @@ static int mpeg_decode_mb(MpegEncContext *s, · 44 unmodified lines | |||
| 421 | s->last_mv[i][j][0]); | 421 | s->last_mv[i][j][0]); |
| 422 | s->last_mv[i][j][0] = val; | 422 | s->last_mv[i][j][0] = val; |
| 423 | s->mv[i][j][0] = val; | 423 | s->mv[i][j][0] = val; |
| 424 | dprintf(s->avctx, "fmx=%d\n", val); | 424 | av_dlog(s->avctx, "fmx=%d\n", val); |
| 425 | val = mpeg_decode_motion(s, s->mpeg_f_code[i][1], | 425 | val = mpeg_decode_motion(s, s->mpeg_f_code[i][1], |
| 426 | s->last_mv[i][j][1] >> 1); | 426 | s->last_mv[i][j][1] >> 1); |
| 427 | s->last_mv[i][j][1] = val << 1; | 427 | s->last_mv[i][j][1] = val << 1; |
| 428 | s->mv[i][j][1] = val; | 428 | s->mv[i][j][1] = val; |
| 429 | dprintf(s->avctx, "fmy=%d\n", val); | 429 | av_dlog(s->avctx, "fmy=%d\n", val); |
| 430 | } | 430 | } |
| 431 | } | 431 | } |
| 432 | } | 432 | } |
| @@ -632,7 +632,7 @@ static inline int mpeg1_decode_block_intra(MpegEncContext *s, · 199 unmodified lines | |||
| 632 | dc += diff; | 632 | dc += diff; |
| 633 | s->last_dc[component] = dc; | 633 | s->last_dc[component] = dc; |
| 634 | block[0] = dc*quant_matrix[0]; | 634 | block[0] = dc*quant_matrix[0]; |
| 635 | dprintf(s->avctx, "dc=%d diff=%d\n", dc, diff); | 635 | av_dlog(s->avctx, "dc=%d diff=%d\n", dc, diff); |
| 636 | i = 0; | 636 | i = 0; |
| 637 | { | 637 | { |
| 638 | OPEN_READER(re, &s->gb); | 638 | OPEN_READER(re, &s->gb); |
| @@ -1012,7 +1012,7 @@ static inline int mpeg2_decode_block_intra(MpegEncContext *s, · 373 unmodified lines | |||
| 1012 | dc += diff; | 1012 | dc += diff; |
| 1013 | s->last_dc[component] = dc; | 1013 | s->last_dc[component] = dc; |
| 1014 | block[0] = dc << (3 - s->intra_dc_precision); | 1014 | block[0] = dc << (3 - s->intra_dc_precision); |
| 1015 | dprintf(s->avctx, "dc=%d\n", block[0]); | 1015 | av_dlog(s->avctx, "dc=%d\n", block[0]); |
| 1016 | mismatch = block[0] ^ 1; | 1016 | mismatch = block[0] ^ 1; |
| 1017 | i = 0; | 1017 | i = 0; |
| 1018 | if (s->intra_vlc_format) | 1018 | if (s->intra_vlc_format) |
| @@ -1386,7 +1386,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1) · 367 unmodified lines | |||
| 1386 | s1->frame_rate_ext.num = get_bits(&s->gb, 2)+1; | 1386 | s1->frame_rate_ext.num = get_bits(&s->gb, 2)+1; |
| 1387 | s1->frame_rate_ext.den = get_bits(&s->gb, 5)+1; | 1387 | s1->frame_rate_ext.den = get_bits(&s->gb, 5)+1; |
| 1388 | 1388 | ||
| 1389 | dprintf(s->avctx, "sequence extension\n"); | 1389 | av_dlog(s->avctx, "sequence extension\n"); |
| 1390 | s->codec_id= s->avctx->codec_id= CODEC_ID_MPEG2VIDEO; | 1390 | s->codec_id= s->avctx->codec_id= CODEC_ID_MPEG2VIDEO; |
| 1391 | s->avctx->sub_id = 2; /* indicates MPEG-2 found */ | 1391 | s->avctx->sub_id = 2; /* indicates MPEG-2 found */ |
| 1392 | 1392 | ||
| @@ -1477,7 +1477,7 @@ static int load_matrix(MpegEncContext *s, uint16_t matrix0[64], uint16_t matrix1 · 84 unmodified lines | |||
| 1477 | 1477 | ||
| 1478 | static void mpeg_decode_quant_matrix_extension(MpegEncContext *s) | 1478 | static void mpeg_decode_quant_matrix_extension(MpegEncContext *s) |
| 1479 | { | 1479 | { |
| 1480 | dprintf(s->avctx, "matrix extension\n"); | 1480 | av_dlog(s->avctx, "matrix extension\n"); |
| 1481 | 1481 | ||
| 1482 | if(get_bits1(&s->gb)) load_matrix(s, s->chroma_intra_matrix, s->intra_matrix, 1); | 1482 | if(get_bits1(&s->gb)) load_matrix(s, s->chroma_intra_matrix, s->intra_matrix, 1); |
| 1483 | if(get_bits1(&s->gb)) load_matrix(s, s->chroma_inter_matrix, s->inter_matrix, 0); | 1483 | if(get_bits1(&s->gb)) load_matrix(s, s->chroma_inter_matrix, s->inter_matrix, 0); |
| @@ -1551,15 +1551,15 @@ static void mpeg_decode_picture_coding_extension(Mpeg1Context *s1) · 67 unmodified lines | |||
| 1551 | } | 1551 | } |
| 1552 | 1552 | ||
| 1553 | /* composite display not parsed */ | 1553 | /* composite display not parsed */ |
| 1554 | dprintf(s->avctx, "intra_dc_precision=%d\n", s->intra_dc_precision); | 1554 | av_dlog(s->avctx, "intra_dc_precision=%d\n", s->intra_dc_precision); |
| 1555 | dprintf(s->avctx, "picture_structure=%d\n", s->picture_structure); | 1555 | av_dlog(s->avctx, "picture_structure=%d\n", s->picture_structure); |
| 1556 | dprintf(s->avctx, "top field first=%d\n", s->top_field_first); | 1556 | av_dlog(s->avctx, "top field first=%d\n", s->top_field_first); |
| 1557 | dprintf(s->avctx, "repeat first field=%d\n", s->repeat_first_field); | 1557 | av_dlog(s->avctx, "repeat first field=%d\n", s->repeat_first_field); |
| 1558 | dprintf(s->avctx, "conceal=%d\n", s->concealment_motion_vectors); | 1558 | av_dlog(s->avctx, "conceal=%d\n", s->concealment_motion_vectors); |
| 1559 | dprintf(s->avctx, "intra_vlc_format=%d\n", s->intra_vlc_format); | 1559 | av_dlog(s->avctx, "intra_vlc_format=%d\n", s->intra_vlc_format); |
| 1560 | dprintf(s->avctx, "alternate_scan=%d\n", s->alternate_scan); | 1560 | av_dlog(s->avctx, "alternate_scan=%d\n", s->alternate_scan); |
| 1561 | dprintf(s->avctx, "frame_pred_frame_dct=%d\n", s->frame_pred_frame_dct); | 1561 | av_dlog(s->avctx, "frame_pred_frame_dct=%d\n", s->frame_pred_frame_dct); |
| 1562 | dprintf(s->avctx, "progressive_frame=%d\n", s->progressive_frame); | 1562 | av_dlog(s->avctx, "progressive_frame=%d\n", s->progressive_frame); |
| 1563 | } | 1563 | } |
| 1564 | 1564 | ||
| 1565 | static void exchange_uv(MpegEncContext *s){ | 1565 | static void exchange_uv(MpegEncContext *s){ |
| @@ -2200,7 +2200,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, · 634 unmodified lines | |||
| 2200 | Mpeg1Context *s = avctx->priv_data; | 2200 | Mpeg1Context *s = avctx->priv_data; |
| 2201 | AVFrame *picture = data; | 2201 | AVFrame *picture = data; |
| 2202 | MpegEncContext *s2 = &s->mpeg_enc_ctx; | 2202 | MpegEncContext *s2 = &s->mpeg_enc_ctx; |
| 2203 | dprintf(avctx, "fill_buffer\n"); | 2203 | av_dlog(avctx, "fill_buffer\n"); |
| 2204 | 2204 | ||
| 2205 | if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == SEQ_END_CODE)) { | 2205 | if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == SEQ_END_CODE)) { |
| 2206 | /* special case for last picture */ | 2206 | /* special case for last picture */ |
| @@ -2524,7 +2524,7 @@ static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){ · 317 unmodified lines | |||
| 2524 | if( !(avctx->slice_flags & SLICE_FLAG_CODED_ORDER) ) | 2524 | if( !(avctx->slice_flags & SLICE_FLAG_CODED_ORDER) ) |
| 2525 | return -1; | 2525 | return -1; |
| 2526 | if( !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD) ){ | 2526 | if( !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD) ){ |
| 2527 | dprintf(avctx, "mpeg12.c: XvMC decoder will work better if SLICE_FLAG_ALLOW_FIELD is set\n"); | 2527 | av_dlog(avctx, "mpeg12.c: XvMC decoder will work better if SLICE_FLAG_ALLOW_FIELD is set\n"); |
| 2528 | } | 2528 | } |
| 2529 | mpeg_decode_init(avctx); | 2529 | mpeg_decode_init(avctx); |
| 2530 | 2530 | ||
| @@ -890,7 +890,7 @@ static void mpeg1_encode_block(MpegEncContext *s, · 889 unmodified lines | |||
| 890 | next_coef: | 890 | next_coef: |
| 891 | #if 0 | 891 | #if 0 |
| 892 | if (level != 0) | 892 | if (level != 0) |
| 893 | dprintf(s->avctx, "level[%d]=%d\n", i, level); | 893 | av_dlog(s->avctx, "level[%d]=%d\n", i, level); |
| 894 | #endif | 894 | #endif |
| 895 | /* encode using VLC */ | 895 | /* encode using VLC */ |
| 896 | if (level != 0) { | 896 | if (level != 0) { |
| @@ -352,7 +352,7 @@ static av_cold int decode_init(AVCodecContext * avctx) · 351 unmodified lines | |||
| 352 | scale_factor_mult[i][0] = MULLx(norm, FIXR(1.0 * 2.0), FRAC_BITS); | 352 | scale_factor_mult[i][0] = MULLx(norm, FIXR(1.0 * 2.0), FRAC_BITS); |
| 353 | scale_factor_mult[i][1] = MULLx(norm, FIXR(0.7937005259 * 2.0), FRAC_BITS); | 353 | scale_factor_mult[i][1] = MULLx(norm, FIXR(0.7937005259 * 2.0), FRAC_BITS); |
| 354 | scale_factor_mult[i][2] = MULLx(norm, FIXR(0.6299605249 * 2.0), FRAC_BITS); | 354 | scale_factor_mult[i][2] = MULLx(norm, FIXR(0.6299605249 * 2.0), FRAC_BITS); |
| 355 | dprintf(avctx, "%d: norm=%x s=%x %x %x\n", | 355 | av_dlog(avctx, "%d: norm=%x s=%x %x %x\n", |
| 356 | i, norm, | 356 | i, norm, |
| 357 | scale_factor_mult[i][0], | 357 | scale_factor_mult[i][0], |
| 358 | scale_factor_mult[i][1], | 358 | scale_factor_mult[i][1], |
| @@ -457,7 +457,7 @@ static av_cold int decode_init(AVCodecContext * avctx) · 98 unmodified lines | |||
| 457 | k = i & 1; | 457 | k = i & 1; |
| 458 | is_table_lsf[j][k ^ 1][i] = FIXR(f); | 458 | is_table_lsf[j][k ^ 1][i] = FIXR(f); |
| 459 | is_table_lsf[j][k][i] = FIXR(1.0); | 459 | is_table_lsf[j][k][i] = FIXR(1.0); |
| 460 | dprintf(avctx, "is_table_lsf %d %d: %x %x\n", | 460 | av_dlog(avctx, "is_table_lsf %d %d: %x %x\n", |
| 461 | i, j, is_table_lsf[j][0][i], is_table_lsf[j][1][i]); | 461 | i, j, is_table_lsf[j][0][i], is_table_lsf[j][1][i]); |
| 462 | } | 462 | } |
| 463 | } | 463 | } |
| @@ -986,7 +986,7 @@ static int mp_decode_layer2(MPADecodeContext *s) · 522 unmodified lines | |||
| 986 | else | 986 | else |
| 987 | bound = sblimit; | 987 | bound = sblimit; |
| 988 | 988 | ||
| 989 | dprintf(s->avctx, "bound=%d sblimit=%d\n", bound, sblimit); | 989 | av_dlog(s->avctx, "bound=%d sblimit=%d\n", bound, sblimit); |
| 990 | 990 | ||
| 991 | /* sanity check */ | 991 | /* sanity check */ |
| 992 | if( bound > sblimit ) bound = sblimit; | 992 | if( bound > sblimit ) bound = sblimit; |
| @@ -1309,7 +1309,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g, · 316 unmodified lines | |||
| 1309 | 1309 | ||
| 1310 | exponent= exponents[s_index]; | 1310 | exponent= exponents[s_index]; |
| 1311 | 1311 | ||
| 1312 | dprintf(s->avctx, "region=%d n=%d x=%d y=%d exp=%d\n", | 1312 | av_dlog(s->avctx, "region=%d n=%d x=%d y=%d exp=%d\n", |
| 1313 | i, g->region_size[i] - j, x, y, exponent); | 1313 | i, g->region_size[i] - j, x, y, exponent); |
| 1314 | if(y&16){ | 1314 | if(y&16){ |
| 1315 | x = y >> 5; | 1315 | x = y >> 5; |
| @@ -1377,7 +1377,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g, · 61 unmodified lines | |||
| 1377 | last_pos= pos; | 1377 | last_pos= pos; |
| 1378 | 1378 | ||
| 1379 | code = get_vlc2(&s->gb, vlc->table, vlc->bits, 1); | 1379 | code = get_vlc2(&s->gb, vlc->table, vlc->bits, 1); |
| 1380 | dprintf(s->avctx, "t=%d code=%d\n", g->count1table_select, code); | 1380 | av_dlog(s->avctx, "t=%d code=%d\n", g->count1table_select, code); |
| 1381 | g->sb_hybrid[s_index+0]= | 1381 | g->sb_hybrid[s_index+0]= |
| 1382 | g->sb_hybrid[s_index+1]= | 1382 | g->sb_hybrid[s_index+1]= |
| 1383 | g->sb_hybrid[s_index+2]= | 1383 | g->sb_hybrid[s_index+2]= |
| @@ -1735,7 +1735,7 @@ static int mp_decode_layer3(MPADecodeContext *s) · 351 unmodified lines | |||
| 1735 | 1735 | ||
| 1736 | for(gr=0;gr<nb_granules;gr++) { | 1736 | for(gr=0;gr<nb_granules;gr++) { |
| 1737 | for(ch=0;ch<s->nb_channels;ch++) { | 1737 | for(ch=0;ch<s->nb_channels;ch++) { |
| 1738 | dprintf(s->avctx, "gr=%d ch=%d: side_info\n", gr, ch); | 1738 | av_dlog(s->avctx, "gr=%d ch=%d: side_info\n", gr, ch); |
| 1739 | g = &s->granules[ch][gr]; | 1739 | g = &s->granules[ch][gr]; |
| 1740 | g->part2_3_length = get_bits(&s->gb, 12); | 1740 | g->part2_3_length = get_bits(&s->gb, 12); |
| 1741 | g->big_values = get_bits(&s->gb, 9); | 1741 | g->big_values = get_bits(&s->gb, 9); |
| @@ -1776,7 +1776,7 @@ static int mp_decode_layer3(MPADecodeContext *s) · 34 unmodified lines | |||
| 1776 | /* compute huffman coded region sizes */ | 1776 | /* compute huffman coded region sizes */ |
| 1777 | region_address1 = get_bits(&s->gb, 4); | 1777 | region_address1 = get_bits(&s->gb, 4); |
| 1778 | region_address2 = get_bits(&s->gb, 3); | 1778 | region_address2 = get_bits(&s->gb, 3); |
| 1779 | dprintf(s->avctx, "region1=%d region2=%d\n", | 1779 | av_dlog(s->avctx, "region1=%d region2=%d\n", |
| 1780 | region_address1, region_address2); | 1780 | region_address1, region_address2); |
| 1781 | ff_init_long_region(s, g, region_address1, region_address2); | 1781 | ff_init_long_region(s, g, region_address1, region_address2); |
| 1782 | } | 1782 | } |
| @@ -1788,7 +1788,7 @@ static int mp_decode_layer3(MPADecodeContext *s) · 5 unmodified lines | |||
| 1788 | g->preflag = get_bits1(&s->gb); | 1788 | g->preflag = get_bits1(&s->gb); |
| 1789 | g->scalefac_scale = get_bits1(&s->gb); | 1789 | g->scalefac_scale = get_bits1(&s->gb); |
| 1790 | g->count1table_select = get_bits1(&s->gb); | 1790 | g->count1table_select = get_bits1(&s->gb); |
| 1791 | dprintf(s->avctx, "block_type=%d switch_point=%d\n", | 1791 | av_dlog(s->avctx, "block_type=%d switch_point=%d\n", |
| 1792 | g->block_type, g->switch_point); | 1792 | g->block_type, g->switch_point); |
| 1793 | } | 1793 | } |
| 1794 | } | 1794 | } |
| @@ -1797,7 +1797,7 @@ static int mp_decode_layer3(MPADecodeContext *s) · 2 unmodified lines | |||
| 1797 | const uint8_t *ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3); | 1797 | const uint8_t *ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3); |
| 1798 | assert((get_bits_count(&s->gb) & 7) == 0); | 1798 | assert((get_bits_count(&s->gb) & 7) == 0); |
| 1799 | /* now we get bits from the main_data_begin offset */ | 1799 | /* now we get bits from the main_data_begin offset */ |
| 1800 | dprintf(s->avctx, "seekback: %d\n", main_data_begin); | 1800 | av_dlog(s->avctx, "seekback: %d\n", main_data_begin); |
| 1801 | //av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size); | 1801 | //av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size); |
| 1802 | 1802 | ||
| 1803 | memcpy(s->last_buf + s->last_buf_size, ptr, EXTRABYTES); | 1803 | memcpy(s->last_buf + s->last_buf_size, ptr, EXTRABYTES); |
| @@ -1831,7 +1831,7 @@ static int mp_decode_layer3(MPADecodeContext *s) · 27 unmodified lines | |||
| 1831 | /* MPEG1 scale factors */ | 1831 | /* MPEG1 scale factors */ |
| 1832 | slen1 = slen_table[0][g->scalefac_compress]; | 1832 | slen1 = slen_table[0][g->scalefac_compress]; |
| 1833 | slen2 = slen_table[1][g->scalefac_compress]; | 1833 | slen2 = slen_table[1][g->scalefac_compress]; |
| 1834 | dprintf(s->avctx, "slen1=%d slen2=%d\n", slen1, slen2); | 1834 | av_dlog(s->avctx, "slen1=%d slen2=%d\n", slen1, slen2); |
| 1835 | if (g->block_type == 2) { | 1835 | if (g->block_type == 2) { |
| 1836 | n = g->switch_point ? 17 : 18; | 1836 | n = g->switch_point ? 17 : 18; |
| 1837 | j = 0; | 1837 | j = 0; |
| @@ -1964,7 +1964,7 @@ static int mp_decode_frame(MPADecodeContext *s, · 126 unmodified lines | |||
| 1964 | if (s->error_protection) | 1964 | if (s->error_protection) |
| 1965 | skip_bits(&s->gb, 16); | 1965 | skip_bits(&s->gb, 16); |
| 1966 | 1966 | ||
| 1967 | dprintf(s->avctx, "frame %d:\n", s->frame_count); | 1967 | av_dlog(s->avctx, "frame %d:\n", s->frame_count); |
| 1968 | switch(s->layer) { | 1968 | switch(s->layer) { |
| 1969 | case 1: | 1969 | case 1: |
| 1970 | s->avctx->frame_size = 384; | 1970 | s->avctx->frame_size = 384; |
| @@ -91,20 +91,20 @@ int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) · 90 unmodified lines | |||
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | #if defined(DEBUG) | 93 | #if defined(DEBUG) |
| 94 | dprintf(NULL, "layer%d, %d Hz, %d kbits/s, ", | 94 | av_dlog(NULL, "layer%d, %d Hz, %d kbits/s, ", |
| 95 | s->layer, s->sample_rate, s->bit_rate); | 95 | s->layer, s->sample_rate, s->bit_rate); |
| 96 | if (s->nb_channels == 2) { | 96 | if (s->nb_channels == 2) { |
| 97 | if (s->layer == 3) { | 97 | if (s->layer == 3) { |
| 98 | if (s->mode_ext & MODE_EXT_MS_STEREO) | 98 | if (s->mode_ext & MODE_EXT_MS_STEREO) |
| 99 | dprintf(NULL, "ms-"); | 99 | av_dlog(NULL, "ms-"); |
| 100 | if (s->mode_ext & MODE_EXT_I_STEREO) | 100 | if (s->mode_ext & MODE_EXT_I_STEREO) |
| 101 | dprintf(NULL, "i-"); | 101 | av_dlog(NULL, "i-"); |
| 102 | } | 102 | } |
| 103 | dprintf(NULL, "stereo"); | 103 | av_dlog(NULL, "stereo"); |
| 104 | } else { | 104 | } else { |
| 105 | dprintf(NULL, "mono"); | 105 | av_dlog(NULL, "mono"); |
| 106 | } | 106 | } |
| 107 | dprintf(NULL, "\n"); | 107 | av_dlog(NULL, "\n"); |
| 108 | #endif | 108 | #endif |
| 109 | return 0; | 109 | return 0; |
| 110 | } | 110 | } |
| @@ -122,7 +122,7 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx) · 121 unmodified lines | |||
| 122 | s->sblimit = ff_mpa_sblimit_table[table]; | 122 | s->sblimit = ff_mpa_sblimit_table[table]; |
| 123 | s->alloc_table = ff_mpa_alloc_tables[table]; | 123 | s->alloc_table = ff_mpa_alloc_tables[table]; |
| 124 | 124 | ||
| 125 | dprintf(avctx, "%d kb/s, %d Hz, frame_size=%d bits, table=%d, padincr=%x\n", | 125 | av_dlog(avctx, "%d kb/s, %d Hz, frame_size=%d bits, table=%d, padincr=%x\n", |
| 126 | bitrate, freq, s->frame_size, table, s->frame_frac_incr); | 126 | bitrate, freq, s->frame_size, table, s->frame_frac_incr); |
| 127 | 127 | ||
| 128 | for(i=0;i<s->nb_channels;i++) | 128 | for(i=0;i<s->nb_channels;i++) |
| @@ -64,7 +64,7 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx, · 63 unmodified lines | |||
| 64 | uint8_t channel_layout = header[2] >> 4; | 64 | uint8_t channel_layout = header[2] >> 4; |
| 65 | 65 | ||
| 66 | if (avctx->debug & FF_DEBUG_PICT_INFO) | 66 | if (avctx->debug & FF_DEBUG_PICT_INFO) |
| 67 | dprintf(avctx, "pcm_bluray_parse_header: header = %02x%02x%02x%02x\n", | 67 | av_dlog(avctx, "pcm_bluray_parse_header: header = %02x%02x%02x%02x\n", |
| 68 | header[0], header[1], header[2], header[3]); | 68 | header[0], header[1], header[2], header[3]); |
| 69 | 69 | ||
| 70 | /* get the sample depth and derive the sample format from it */ | 70 | /* get the sample depth and derive the sample format from it */ |
| @@ -112,7 +112,7 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx, · 41 unmodified lines | |||
| 112 | avctx->bits_per_coded_sample; | 112 | avctx->bits_per_coded_sample; |
| 113 | 113 | ||
| 114 | if (avctx->debug & FF_DEBUG_PICT_INFO) | 114 | if (avctx->debug & FF_DEBUG_PICT_INFO) |
| 115 | dprintf(avctx, | 115 | av_dlog(avctx, |
| 116 | "pcm_bluray_parse_header: %d channels, %d bits per sample, %d kHz, %d kbit\n", | 116 | "pcm_bluray_parse_header: %d channels, %d bits per sample, %d kHz, %d kbit\n", |
| 117 | avctx->channels, avctx->bits_per_coded_sample, | 117 | avctx->channels, avctx->bits_per_coded_sample, |
| 118 | avctx->sample_rate, avctx->bit_rate); | 118 | avctx->sample_rate, avctx->bit_rate); |
| @@ -291,7 +291,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, · 172 unmodified lines | |||
| 291 | 291 | ||
| 292 | retval = src - avpkt->data; | 292 | retval = src - avpkt->data; |
| 293 | if (avctx->debug & FF_DEBUG_BITSTREAM) | 293 | if (avctx->debug & FF_DEBUG_BITSTREAM) |
| 294 | dprintf(avctx, "pcm_bluray_decode_frame: decoded %d -> %d bytes\n", | 294 | av_dlog(avctx, "pcm_bluray_decode_frame: decoded %d -> %d bytes\n", |
| 295 | retval, *data_size); | 295 | retval, *data_size); |
| 296 | return retval; | 296 | return retval; |
| 297 | } | 297 | } |
| @@ -141,7 +141,7 @@ static int decode_rle(AVCodecContext *avctx, AVSubtitle *sub, · 140 unmodified lines | |||
| 141 | return -1; | 141 | return -1; |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | dprintf(avctx, "Pixel Count = %d, Area = %d\n", pixel_count, sub->rects[0]->w * sub->rects[0]->h); | 144 | av_dlog(avctx, "Pixel Count = %d, Area = %d\n", pixel_count, sub->rects[0]->w * sub->rects[0]->h); |
| 145 | 145 | ||
| 146 | return 0; | 146 | return 0; |
| 147 | } | 147 | } |
| @@ -253,7 +253,7 @@ static void parse_palette_segment(AVCodecContext *avctx, · 105 unmodified lines | |||
| 253 | YUV_TO_RGB1(cb, cr); | 253 | YUV_TO_RGB1(cb, cr); |
| 254 | YUV_TO_RGB2(r, g, b, y); | 254 | YUV_TO_RGB2(r, g, b, y); |
| 255 | 255 | ||
| 256 | dprintf(avctx, "Color %d := (%d,%d,%d,%d)\n", color_id, r, g, b, alpha); | 256 | av_dlog(avctx, "Color %d := (%d,%d,%d,%d)\n", color_id, r, g, b, alpha); |
| 257 | 257 | ||
| 258 | /* Store color in palette */ | 258 | /* Store color in palette */ |
| 259 | ctx->clut[color_id] = RGBA(r,g,b,alpha); | 259 | ctx->clut[color_id] = RGBA(r,g,b,alpha); |
| @@ -282,7 +282,7 @@ static void parse_presentation_segment(AVCodecContext *avctx, · 22 unmodified lines | |||
| 282 | int w = bytestream_get_be16(&buf); | 282 | int w = bytestream_get_be16(&buf); |
| 283 | int h = bytestream_get_be16(&buf); | 283 | int h = bytestream_get_be16(&buf); |
| 284 | 284 | ||
| 285 | dprintf(avctx, "Video Dimensions %dx%d\n", | 285 | av_dlog(avctx, "Video Dimensions %dx%d\n", |
| 286 | w, h); | 286 | w, h); |
| 287 | if (av_image_check_size(w, h, 0, avctx) >= 0) | 287 | if (av_image_check_size(w, h, 0, avctx) >= 0) |
| 288 | avcodec_set_dimensions(avctx, w, h); | 288 | avcodec_set_dimensions(avctx, w, h); |
| @@ -317,7 +317,7 @@ static void parse_presentation_segment(AVCodecContext *avctx, · 28 unmodified lines | |||
| 317 | 317 | ||
| 318 | /* TODO If cropping, cropping_x, cropping_y, cropping_width, cropping_height (all 2 bytes).*/ | 318 | /* TODO If cropping, cropping_x, cropping_y, cropping_width, cropping_height (all 2 bytes).*/ |
| 319 | 319 | ||
| 320 | dprintf(avctx, "Subtitle Placement x=%d, y=%d\n", x, y); | 320 | av_dlog(avctx, "Subtitle Placement x=%d, y=%d\n", x, y); |
| 321 | 321 | ||
| 322 | if (x > avctx->width || y > avctx->height) { | 322 | if (x > avctx->width || y > avctx->height) { |
| 323 | av_log(avctx, AV_LOG_ERROR, "Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n", | 323 | av_log(avctx, AV_LOG_ERROR, "Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n", |
| @@ -433,7 +433,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, · 109 unmodified lines | |||
| 433 | segment_type = bytestream_get_byte(&buf); | 433 | segment_type = bytestream_get_byte(&buf); |
| 434 | segment_length = bytestream_get_be16(&buf); | 434 | segment_length = bytestream_get_be16(&buf); |
| 435 | 435 | ||
| 436 | dprintf(avctx, "Segment Length %d, Segment Type %x\n", segment_length, segment_type); | 436 | av_dlog(avctx, "Segment Length %d, Segment Type %x\n", segment_length, segment_type); |
| 437 | 437 | ||
| 438 | if (segment_type != DISPLAY_SEGMENT && segment_length > buf_end - buf) | 438 | if (segment_type != DISPLAY_SEGMENT && segment_length > buf_end - buf) |
| 439 | break; | 439 | break; |
| @@ -431,7 +431,7 @@ static int decode_frame(AVCodecContext *avctx, · 430 unmodified lines | |||
| 431 | goto fail; | 431 | goto fail; |
| 432 | tag32 = bytestream_get_be32(&s->bytestream); | 432 | tag32 = bytestream_get_be32(&s->bytestream); |
| 433 | tag = av_bswap32(tag32); | 433 | tag = av_bswap32(tag32); |
| 434 | dprintf(avctx, "png: tag=%c%c%c%c length=%u\n", | 434 | av_dlog(avctx, "png: tag=%c%c%c%c length=%u\n", |
| 435 | (tag & 0xff), | 435 | (tag & 0xff), |
| 436 | ((tag >> 8) & 0xff), | 436 | ((tag >> 8) & 0xff), |
| 437 | ((tag >> 16) & 0xff), | 437 | ((tag >> 16) & 0xff), |
| @@ -453,7 +453,7 @@ static int decode_frame(AVCodecContext *avctx, · 15 unmodified lines | |||
| 453 | s->interlace_type = *s->bytestream++; | 453 | s->interlace_type = *s->bytestream++; |
| 454 | crc = bytestream_get_be32(&s->bytestream); | 454 | crc = bytestream_get_be32(&s->bytestream); |
| 455 | s->state |= PNG_IHDR; | 455 | s->state |= PNG_IHDR; |
| 456 | dprintf(avctx, "width=%d height=%d depth=%d color_type=%d compression_type=%d filter_type=%d interlace_type=%d\n", | 456 | av_dlog(avctx, "width=%d height=%d depth=%d color_type=%d compression_type=%d filter_type=%d interlace_type=%d\n", |
| 457 | s->width, s->height, s->bit_depth, s->color_type, | 457 | s->width, s->height, s->bit_depth, s->color_type, |
| 458 | s->compression_type, s->filter_type, s->interlace_type); | 458 | s->compression_type, s->filter_type, s->interlace_type); |
| 459 | break; | 459 | break; |
| @@ -517,7 +517,7 @@ static int decode_frame(AVCodecContext *avctx, · 57 unmodified lines | |||
| 517 | s->width); | 517 | s->width); |
| 518 | s->crow_size = s->pass_row_size + 1; | 518 | s->crow_size = s->pass_row_size + 1; |
| 519 | } | 519 | } |
| 520 | dprintf(avctx, "row_size=%d crow_size =%d\n", | 520 | av_dlog(avctx, "row_size=%d crow_size =%d\n", |
| 521 | s->row_size, s->crow_size); | 521 | s->row_size, s->crow_size); |
| 522 | s->image_buf = p->data[0]; | 522 | s->image_buf = p->data[0]; |
| 523 | s->image_linesize = p->linesize[0]; | 523 | s->image_linesize = p->linesize[0]; |
| @@ -246,7 +246,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) · 245 unmodified lines | |||
| 246 | if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n"); | 246 | if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n"); |
| 247 | pb_frame = get_bits1(&s->gb); | 247 | pb_frame = get_bits1(&s->gb); |
| 248 | 248 | ||
| 249 | dprintf(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame); | 249 | av_dlog(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame); |
| 250 | 250 | ||
| 251 | if (pb_frame){ | 251 | if (pb_frame){ |
| 252 | av_log(s->avctx, AV_LOG_ERROR, "pb frame not supported\n"); | 252 | av_log(s->avctx, AV_LOG_ERROR, "pb frame not supported\n"); |
| @@ -265,7 +265,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) · 12 unmodified lines | |||
| 265 | s->last_dc[0] = get_bits(&s->gb, 8); | 265 | s->last_dc[0] = get_bits(&s->gb, 8); |
| 266 | s->last_dc[1] = get_bits(&s->gb, 8); | 266 | s->last_dc[1] = get_bits(&s->gb, 8); |
| 267 | s->last_dc[2] = get_bits(&s->gb, 8); | 267 | s->last_dc[2] = get_bits(&s->gb, 8); |
| 268 | dprintf(s->avctx, "DC:%d %d %d\n", s->last_dc[0], | 268 | av_dlog(s->avctx, "DC:%d %d %d\n", s->last_dc[0], |
| 269 | s->last_dc[1], s->last_dc[2]); | 269 | s->last_dc[1], s->last_dc[2]); |
| 270 | } | 270 | } |
| 271 | } | 271 | } |
| @@ -561,7 +561,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, · 289 unmodified lines | |||
| 561 | ff_er_frame_start(s); | 561 | ff_er_frame_start(s); |
| 562 | } | 562 | } |
| 563 | 563 | ||
| 564 | dprintf(avctx, "qscale=%d\n", s->qscale); | 564 | av_dlog(avctx, "qscale=%d\n", s->qscale); |
| 565 | 565 | ||
| 566 | /* default quantization values */ | 566 | /* default quantization values */ |
| 567 | if(s->codec_id== CODEC_ID_RV10){ | 567 | if(s->codec_id== CODEC_ID_RV10){ |
| @@ -600,7 +600,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, · 32 unmodified lines | |||
| 600 | for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) { | 600 | for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) { |
| 601 | int ret; | 601 | int ret; |
| 602 | ff_update_block_index(s); | 602 | ff_update_block_index(s); |
| 603 | dprintf(avctx, "**mb x=%d y=%d\n", s->mb_x, s->mb_y); | 603 | av_dlog(avctx, "**mb x=%d y=%d\n", s->mb_x, s->mb_y); |
| 604 | 604 | ||
| 605 | s->mv_dir = MV_DIR_FORWARD; | 605 | s->mv_dir = MV_DIR_FORWARD; |
| 606 | s->mv_type = MV_TYPE_16X16; | 606 | s->mv_type = MV_TYPE_16X16; |
| @@ -655,7 +655,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, · 48 unmodified lines | |||
| 655 | int slice_count; | 655 | int slice_count; |
| 656 | const uint8_t *slices_hdr = NULL; | 656 | const uint8_t *slices_hdr = NULL; |
| 657 | 657 | ||
| 658 | dprintf(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size); | 658 | av_dlog(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size); |
| 659 | 659 | ||
| 660 | /* no supplementary picture */ | 660 | /* no supplementary picture */ |
| 661 | if (buf_size == 0) { | 661 | if (buf_size == 0) { |
| @@ -305,7 +305,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, · 304 unmodified lines | |||
| 305 | s->bitstream_size= buf_size; | 305 | s->bitstream_size= buf_size; |
| 306 | 306 | ||
| 307 | if(buf_size < s->max_framesize){ | 307 | if(buf_size < s->max_framesize){ |
| 308 | //dprintf(avctx, "wanna more data ... %d\n", buf_size); | 308 | //av_dlog(avctx, "wanna more data ... %d\n", buf_size); |
| 309 | *data_size = 0; | 309 | *data_size = 0; |
| 310 | return input_buf_size; | 310 | return input_buf_size; |
| 311 | } | 311 | } |
| @@ -180,7 +180,7 @@ int ff_vaapi_common_end_frame(MpegEncContext *s) · 179 unmodified lines | |||
| 180 | struct vaapi_context * const vactx = s->avctx->hwaccel_context; | 180 | struct vaapi_context * const vactx = s->avctx->hwaccel_context; |
| 181 | int ret = -1; | 181 | int ret = -1; |
| 182 | 182 | ||
| 183 | dprintf(s->avctx, "ff_vaapi_common_end_frame()\n"); | 183 | av_dlog(s->avctx, "ff_vaapi_common_end_frame()\n"); |
| 184 | 184 | ||
| 185 | if (commit_slices(vactx) < 0) | 185 | if (commit_slices(vactx) < 0) |
| 186 | goto done; | 186 | goto done; |
| @@ -227,7 +227,7 @@ static int start_frame(AVCodecContext *avctx, · 226 unmodified lines | |||
| 227 | VAPictureParameterBufferH264 *pic_param; | 227 | VAPictureParameterBufferH264 *pic_param; |
| 228 | VAIQMatrixBufferH264 *iq_matrix; | 228 | VAIQMatrixBufferH264 *iq_matrix; |
| 229 | 229 | ||
| 230 | dprintf(avctx, "start_frame()\n"); | 230 | av_dlog(avctx, "start_frame()\n"); |
| 231 | 231 | ||
| 232 | vactx->slice_param_size = sizeof(VASliceParameterBufferH264); | 232 | vactx->slice_param_size = sizeof(VASliceParameterBufferH264); |
| 233 | 233 | ||
| @@ -289,7 +289,7 @@ static int end_frame(AVCodecContext *avctx) · 55 unmodified lines | |||
| 289 | { | 289 | { |
| 290 | H264Context * const h = avctx->priv_data; | 290 | H264Context * const h = avctx->priv_data; |
| 291 | 291 | ||
| 292 | dprintf(avctx, "end_frame()\n"); | 292 | av_dlog(avctx, "end_frame()\n"); |
| 293 | return ff_vaapi_common_end_frame(&h->s); | 293 | return ff_vaapi_common_end_frame(&h->s); |
| 294 | } | 294 | } |
| 295 | 295 | ||
| @@ -302,7 +302,7 @@ static int decode_slice(AVCodecContext *avctx, · 6 unmodified lines | |||
| 302 | MpegEncContext * const s = &h->s; | 302 | MpegEncContext * const s = &h->s; |
| 303 | VASliceParameterBufferH264 *slice_param; | 303 | VASliceParameterBufferH264 *slice_param; |
| 304 | 304 | ||
| 305 | dprintf(avctx, "decode_slice(): buffer %p, size %d\n", buffer, size); | 305 | av_dlog(avctx, "decode_slice(): buffer %p, size %d\n", buffer, size); |
| 306 | 306 | ||
| 307 | /* Fill in VASliceParameterBufferH264. */ | 307 | /* Fill in VASliceParameterBufferH264. */ |
| 308 | slice_param = (VASliceParameterBufferH264 *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size); | 308 | slice_param = (VASliceParameterBufferH264 *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size); |
| @@ -44,7 +44,7 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 43 unmodified lines | |||
| 44 | VAIQMatrixBufferMPEG2 *iq_matrix; | 44 | VAIQMatrixBufferMPEG2 *iq_matrix; |
| 45 | int i; | 45 | int i; |
| 46 | 46 | ||
| 47 | dprintf(avctx, "vaapi_mpeg2_start_frame()\n"); | 47 | av_dlog(avctx, "vaapi_mpeg2_start_frame()\n"); |
| 48 | 48 | ||
| 49 | vactx->slice_param_size = sizeof(VASliceParameterBufferMPEG2); | 49 | vactx->slice_param_size = sizeof(VASliceParameterBufferMPEG2); |
| 50 | 50 | ||
| @@ -111,7 +111,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 60 unmodified lines | |||
| 111 | GetBitContext gb; | 111 | GetBitContext gb; |
| 112 | uint32_t start_code, quantiser_scale_code, intra_slice_flag, macroblock_offset; | 112 | uint32_t start_code, quantiser_scale_code, intra_slice_flag, macroblock_offset; |
| 113 | 113 | ||
| 114 | dprintf(avctx, "vaapi_mpeg2_decode_slice(): buffer %p, size %d\n", buffer, size); | 114 | av_dlog(avctx, "vaapi_mpeg2_decode_slice(): buffer %p, size %d\n", buffer, size); |
| 115 | 115 | ||
| 116 | /* Determine macroblock_offset */ | 116 | /* Determine macroblock_offset */ |
| 117 | init_get_bits(&gb, buffer, 8 * size); | 117 | init_get_bits(&gb, buffer, 8 * size); |
| @@ -47,7 +47,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 46 unmodified lines | |||
| 47 | VAIQMatrixBufferMPEG4 *iq_matrix; | 47 | VAIQMatrixBufferMPEG4 *iq_matrix; |
| 48 | int i; | 48 | int i; |
| 49 | 49 | ||
| 50 | dprintf(avctx, "vaapi_mpeg4_start_frame()\n"); | 50 | av_dlog(avctx, "vaapi_mpeg4_start_frame()\n"); |
| 51 | 51 | ||
| 52 | vactx->slice_param_size = sizeof(VASliceParameterBufferMPEG4); | 52 | vactx->slice_param_size = sizeof(VASliceParameterBufferMPEG4); |
| 53 | 53 | ||
| @@ -125,7 +125,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 71 unmodified lines | |||
| 125 | MpegEncContext * const s = avctx->priv_data; | 125 | MpegEncContext * const s = avctx->priv_data; |
| 126 | VASliceParameterBufferMPEG4 *slice_param; | 126 | VASliceParameterBufferMPEG4 *slice_param; |
| 127 | 127 | ||
| 128 | dprintf(avctx, "vaapi_mpeg4_decode_slice(): buffer %p, size %d\n", buffer, size); | 128 | av_dlog(avctx, "vaapi_mpeg4_decode_slice(): buffer %p, size %d\n", buffer, size); |
| 129 | 129 | ||
| 130 | /* video_plane_with_short_video_header() contains all GOBs | 130 | /* video_plane_with_short_video_header() contains all GOBs |
| 131 | * in-order, and this is what VA API (Intel backend) expects: only | 131 | * in-order, and this is what VA API (Intel backend) expects: only |
| @@ -138,7 +138,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t · 137 unmodified lines | |||
| 138 | struct vaapi_context * const vactx = avctx->hwaccel_context; | 138 | struct vaapi_context * const vactx = avctx->hwaccel_context; |
| 139 | VAPictureParameterBufferVC1 *pic_param; | 139 | VAPictureParameterBufferVC1 *pic_param; |
| 140 | 140 | ||
| 141 | dprintf(avctx, "vaapi_vc1_start_frame()\n"); | 141 | av_dlog(avctx, "vaapi_vc1_start_frame()\n"); |
| 142 | 142 | ||
| 143 | vactx->slice_param_size = sizeof(VASliceParameterBufferVC1); | 143 | vactx->slice_param_size = sizeof(VASliceParameterBufferVC1); |
| 144 | 144 | ||
| @@ -308,7 +308,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, · 163 unmodified lines | |||
| 308 | MpegEncContext * const s = &v->s; | 308 | MpegEncContext * const s = &v->s; |
| 309 | VASliceParameterBufferVC1 *slice_param; | 309 | VASliceParameterBufferVC1 *slice_param; |
| 310 | 310 | ||
| 311 | dprintf(avctx, "vaapi_vc1_decode_slice(): buffer %p, size %d\n", buffer, size); | 311 | av_dlog(avctx, "vaapi_vc1_decode_slice(): buffer %p, size %d\n", buffer, size); |
| 312 | 312 | ||
| 313 | /* Current bit buffer is beyond any marker for VC-1, so skip it */ | 313 | /* Current bit buffer is beyond any marker for VC-1, so skip it */ |
| 314 | if (avctx->codec_id == CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) { | 314 | if (avctx->codec_id == CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) { |
| @@ -217,13 +217,13 @@ int ff_wma_init(AVCodecContext *avctx, int flags2) · 216 unmodified lines | |||
| 217 | high_freq = high_freq * 0.5; | 217 | high_freq = high_freq * 0.5; |
| 218 | } | 218 | } |
| 219 | } | 219 | } |
| 220 | dprintf(s->avctx, "flags2=0x%x\n", flags2); | 220 | av_dlog(s->avctx, "flags2=0x%x\n", flags2); |
| 221 | dprintf(s->avctx, "version=%d channels=%d sample_rate=%d bitrate=%d block_align=%d\n", | 221 | av_dlog(s->avctx, "version=%d channels=%d sample_rate=%d bitrate=%d block_align=%d\n", |
| 222 | s->version, s->nb_channels, s->sample_rate, s->bit_rate, | 222 | s->version, s->nb_channels, s->sample_rate, s->bit_rate, |
| 223 | s->block_align); | 223 | s->block_align); |
| 224 | dprintf(s->avctx, "bps=%f bps1=%f high_freq=%f bitoffset=%d\n", | 224 | av_dlog(s->avctx, "bps=%f bps1=%f high_freq=%f bitoffset=%d\n", |
| 225 | bps, bps1, high_freq, s->byte_offset_bits); | 225 | bps, bps1, high_freq, s->byte_offset_bits); |
| 226 | dprintf(s->avctx, "use_noise_coding=%d use_exp_vlc=%d nb_block_sizes=%d\n", | 226 | av_dlog(s->avctx, "use_noise_coding=%d use_exp_vlc=%d nb_block_sizes=%d\n", |
| 227 | s->use_noise_coding, s->use_exp_vlc, s->nb_block_sizes); | 227 | s->use_noise_coding, s->use_exp_vlc, s->nb_block_sizes); |
| 228 | 228 | ||
| 229 | /* compute the scale factor band sizes for each MDCT block size */ | 229 | /* compute the scale factor band sizes for each MDCT block size */ |
| @@ -288,8 +288,8 @@ static av_cold int decode_init(AVCodecContext *avctx) · 287 unmodified lines | |||
| 288 | s->bits_per_sample = AV_RL16(edata_ptr); | 288 | s->bits_per_sample = AV_RL16(edata_ptr); |
| 289 | /** dump the extradata */ | 289 | /** dump the extradata */ |
| 290 | for (i = 0; i < avctx->extradata_size; i++) | 290 | for (i = 0; i < avctx->extradata_size; i++) |
| 291 | dprintf(avctx, "[%x] ", avctx->extradata[i]); | 291 | av_dlog(avctx, "[%x] ", avctx->extradata[i]); |
| 292 | dprintf(avctx, "\n"); | 292 | av_dlog(avctx, "\n"); |
| 293 | 293 | ||
| 294 | } else { | 294 | } else { |
| 295 | av_log_ask_for_sample(avctx, "Unknown extradata size\n"); | 295 | av_log_ask_for_sample(avctx, "Unknown extradata size\n"); |
| @@ -582,7 +582,7 @@ static int decode_tilehdr(WMAProDecodeCtx *s) · 286 unmodified lines | |||
| 582 | int i; | 582 | int i; |
| 583 | int offset = 0; | 583 | int offset = 0; |
| 584 | for (i = 0; i < s->channel[c].num_subframes; i++) { | 584 | for (i = 0; i < s->channel[c].num_subframes; i++) { |
| 585 | dprintf(s->avctx, "frame[%i] channel[%i] subframe[%i]" | 585 | av_dlog(s->avctx, "frame[%i] channel[%i] subframe[%i]" |
| 586 | " len %i\n", s->frame_num, c, i, | 586 | " len %i\n", s->frame_num, c, i, |
| 587 | s->channel[c].subframe_len[i]); | 587 | s->channel[c].subframe_len[i]); |
| 588 | s->channel[c].subframe_offset[i] = offset; | 588 | s->channel[c].subframe_offset[i] = offset; |
| @@ -781,7 +781,7 @@ static int decode_coeffs(WMAProDecodeCtx *s, int c) · 192 unmodified lines | |||
| 781 | const uint16_t* run; | 781 | const uint16_t* run; |
| 782 | const float* level; | 782 | const float* level; |
| 783 | 783 | ||
| 784 | dprintf(s->avctx, "decode coefficients for channel %i\n", c); | 784 | av_dlog(s->avctx, "decode coefficients for channel %i\n", c); |
| 785 | 785 | ||
| 786 | vlctable = get_bits1(&s->gb); | 786 | vlctable = get_bits1(&s->gb); |
| 787 | vlc = &coef_vlc[vlctable]; | 787 | vlc = &coef_vlc[vlctable]; |
| @@ -1066,7 +1066,7 @@ static int decode_subframe(WMAProDecodeCtx *s) · 278 unmodified lines | |||
| 1066 | } | 1066 | } |
| 1067 | } | 1067 | } |
| 1068 | 1068 | ||
| 1069 | dprintf(s->avctx, | 1069 | av_dlog(s->avctx, |
| 1070 | "processing subframe with offset %i len %i\n", offset, subframe_len); | 1070 | "processing subframe with offset %i len %i\n", offset, subframe_len); |
| 1071 | 1071 | ||
| 1072 | /** get a list of all channels that contain the estimated block */ | 1072 | /** get a list of all channels that contain the estimated block */ |
| @@ -1093,7 +1093,7 @@ static int decode_subframe(WMAProDecodeCtx *s) · 20 unmodified lines | |||
| 1093 | s->parsed_all_subframes = 1; | 1093 | s->parsed_all_subframes = 1; |
| 1094 | 1094 | ||
| 1095 | 1095 | ||
| 1096 | dprintf(s->avctx, "subframe is part of %i channels\n", | 1096 | av_dlog(s->avctx, "subframe is part of %i channels\n", |
| 1097 | s->channels_for_cur_subframe); | 1097 | s->channels_for_cur_subframe); |
| 1098 | 1098 | ||
| 1099 | /** calculate number of scale factor bands and their offsets */ | 1099 | /** calculate number of scale factor bands and their offsets */ |
| @@ -1204,7 +1204,7 @@ static int decode_subframe(WMAProDecodeCtx *s) · 104 unmodified lines | |||
| 1204 | return AVERROR_INVALIDDATA; | 1204 | return AVERROR_INVALIDDATA; |
| 1205 | } | 1205 | } |
| 1206 | 1206 | ||
| 1207 | dprintf(s->avctx, "BITSTREAM: subframe header length was %i\n", | 1207 | av_dlog(s->avctx, "BITSTREAM: subframe header length was %i\n", |
| 1208 | get_bits_count(&s->gb) - s->subframe_offset); | 1208 | get_bits_count(&s->gb) - s->subframe_offset); |
| 1209 | 1209 | ||
| 1210 | /** parse coefficients */ | 1210 | /** parse coefficients */ |
| @@ -1218,7 +1218,7 @@ static int decode_subframe(WMAProDecodeCtx *s) · 7 unmodified lines | |||
| 1218 | sizeof(*s->channel[c].coeffs) * subframe_len); | 1218 | sizeof(*s->channel[c].coeffs) * subframe_len); |
| 1219 | } | 1219 | } |
| 1220 | 1220 | ||
| 1221 | dprintf(s->avctx, "BITSTREAM: subframe length was %i\n", | 1221 | av_dlog(s->avctx, "BITSTREAM: subframe length was %i\n", |
| 1222 | get_bits_count(&s->gb) - s->subframe_offset); | 1222 | get_bits_count(&s->gb) - s->subframe_offset); |
| 1223 | 1223 | ||
| 1224 | if (transmit_coeffs) { | 1224 | if (transmit_coeffs) { |
| @@ -1294,7 +1294,7 @@ static int decode_frame(WMAProDecodeCtx *s) · 69 unmodified lines | |||
| 1294 | if (s->len_prefix) | 1294 | if (s->len_prefix) |
| 1295 | len = get_bits(gb, s->log2_frame_size); | 1295 | len = get_bits(gb, s->log2_frame_size); |
| 1296 | 1296 | ||
| 1297 | dprintf(s->avctx, "decoding frame with length %x\n", len); | 1297 | av_dlog(s->avctx, "decoding frame with length %x\n", len); |
| 1298 | 1298 | ||
| 1299 | /** decode tile information */ | 1299 | /** decode tile information */ |
| 1300 | if (decode_tilehdr(s)) { | 1300 | if (decode_tilehdr(s)) { |
| @@ -1313,7 +1313,7 @@ static int decode_frame(WMAProDecodeCtx *s) · 12 unmodified lines | |||
| 1313 | /** read drc info */ | 1313 | /** read drc info */ |
| 1314 | if (s->dynamic_range_compression) { | 1314 | if (s->dynamic_range_compression) { |
| 1315 | s->drc_gain = get_bits(gb, 8); | 1315 | s->drc_gain = get_bits(gb, 8); |
| 1316 | dprintf(s->avctx, "drc_gain %i\n", s->drc_gain); | 1316 | av_dlog(s->avctx, "drc_gain %i\n", s->drc_gain); |
| 1317 | } | 1317 | } |
| 1318 | 1318 | ||
| 1319 | /** no idea what these are for, might be the number of samples | 1319 | /** no idea what these are for, might be the number of samples |
| @@ -1324,18 +1324,18 @@ static int decode_frame(WMAProDecodeCtx *s) · 4 unmodified lines | |||
| 1324 | /** usually true for the first frame */ | 1324 | /** usually true for the first frame */ |
| 1325 | if (get_bits1(gb)) { | 1325 | if (get_bits1(gb)) { |
| 1326 | skip = get_bits(gb, av_log2(s->samples_per_frame * 2)); | 1326 | skip = get_bits(gb, av_log2(s->samples_per_frame * 2)); |
| 1327 | dprintf(s->avctx, "start skip: %i\n", skip); | 1327 | av_dlog(s->avctx, "start skip: %i\n", skip); |
| 1328 | } | 1328 | } |
| 1329 | 1329 | ||
| 1330 | /** sometimes true for the last frame */ | 1330 | /** sometimes true for the last frame */ |
| 1331 | if (get_bits1(gb)) { | 1331 | if (get_bits1(gb)) { |
| 1332 | skip = get_bits(gb, av_log2(s->samples_per_frame * 2)); | 1332 | skip = get_bits(gb, av_log2(s->samples_per_frame * 2)); |
| 1333 | dprintf(s->avctx, "end skip: %i\n", skip); | 1333 | av_dlog(s->avctx, "end skip: %i\n", skip); |
| 1334 | } | 1334 | } |
| 1335 | 1335 | ||
| 1336 | } | 1336 | } |
| 1337 | 1337 | ||
| 1338 | dprintf(s->avctx, "BITSTREAM: frame header length was %i\n", | 1338 | av_dlog(s->avctx, "BITSTREAM: frame header length was %i\n", |
| 1339 | get_bits_count(gb) - s->frame_offset); | 1339 | get_bits_count(gb) - s->frame_offset); |
| 1340 | 1340 | ||
| 1341 | /** reset subframe states */ | 1341 | /** reset subframe states */ |
| @@ -1505,7 +1505,7 @@ static int decode_packet(AVCodecContext *avctx, · 163 unmodified lines | |||
| 1505 | 1505 | ||
| 1506 | /** get number of bits that need to be added to the previous frame */ | 1506 | /** get number of bits that need to be added to the previous frame */ |
| 1507 | num_bits_prev_frame = get_bits(gb, s->log2_frame_size); | 1507 | num_bits_prev_frame = get_bits(gb, s->log2_frame_size); |
| 1508 | dprintf(avctx, "packet[%d]: nbpf %x\n", avctx->frame_number, | 1508 | av_dlog(avctx, "packet[%d]: nbpf %x\n", avctx->frame_number, |
| 1509 | num_bits_prev_frame); | 1509 | num_bits_prev_frame); |
| 1510 | 1510 | ||
| 1511 | /** check for packet loss */ | 1511 | /** check for packet loss */ |
| @@ -1527,14 +1527,14 @@ static int decode_packet(AVCodecContext *avctx, · 15 unmodified lines | |||
| 1527 | /** append the previous frame data to the remaining data from the | 1527 | /** append the previous frame data to the remaining data from the |
| 1528 | previous packet to create a full frame */ | 1528 | previous packet to create a full frame */ |
| 1529 | save_bits(s, gb, num_bits_prev_frame, 1); | 1529 | save_bits(s, gb, num_bits_prev_frame, 1); |
| 1530 | dprintf(avctx, "accumulated %x bits of frame data\n", | 1530 | av_dlog(avctx, "accumulated %x bits of frame data\n", |
| 1531 | s->num_saved_bits - s->frame_offset); | 1531 | s->num_saved_bits - s->frame_offset); |
| 1532 | 1532 | ||
| 1533 | /** decode the cross packet frame if it is valid */ | 1533 | /** decode the cross packet frame if it is valid */ |
| 1534 | if (!s->packet_loss) | 1534 | if (!s->packet_loss) |
| 1535 | decode_frame(s); | 1535 | decode_frame(s); |
| 1536 | } else if (s->num_saved_bits - s->frame_offset) { | 1536 | } else if (s->num_saved_bits - s->frame_offset) { |
| 1537 | dprintf(avctx, "ignoring %x previously saved bits\n", | 1537 | av_dlog(avctx, "ignoring %x previously saved bits\n", |
| 1538 | s->num_saved_bits - s->frame_offset); | 1538 | s->num_saved_bits - s->frame_offset); |
| 1539 | } | 1539 | } |
| 1540 | 1540 | ||
| @@ -217,24 +217,24 @@ static char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms) · 216 unmodified lines | |||
| 217 | return buf; | 217 | return buf; |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | static void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end) | 220 | static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end) |
| 221 | { | 221 | { |
| 222 | av_unused char buf[16]; | 222 | av_unused char buf[16]; |
| 223 | dprintf(ctx, | 223 | av_dlog(ctx, |
| 224 | "ref[%p buf:%p refcount:%d perms:%s data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64, | 224 | "ref[%p buf:%p refcount:%d perms:%s data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64, |
| 225 | ref, ref->buf, ref->buf->refcount, ff_get_ref_perms_string(buf, sizeof(buf), ref->perms), ref->data[0], | 225 | ref, ref->buf, ref->buf->refcount, ff_get_ref_perms_string(buf, sizeof(buf), ref->perms), ref->data[0], |
| 226 | ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3], | 226 | ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3], |
| 227 | ref->pts, ref->pos); | 227 | ref->pts, ref->pos); |
| 228 | 228 | ||
| 229 | if (ref->video) { | 229 | if (ref->video) { |
| 230 | dprintf(ctx, " a:%d/%d s:%dx%d i:%c", | 230 | av_dlog(ctx, " a:%d/%d s:%dx%d i:%c", |
| 231 | ref->video->pixel_aspect.num, ref->video->pixel_aspect.den, | 231 | ref->video->pixel_aspect.num, ref->video->pixel_aspect.den, |
| 232 | ref->video->w, ref->video->h, | 232 | ref->video->w, ref->video->h, |
| 233 | !ref->video->interlaced ? 'P' : /* Progressive */ | 233 | !ref->video->interlaced ? 'P' : /* Progressive */ |
| 234 | ref->video->top_field_first ? 'T' : 'B'); /* Top / Bottom */ | 234 | ref->video->top_field_first ? 'T' : 'B'); /* Top / Bottom */ |
| 235 | } | 235 | } |
| 236 | if (ref->audio) { | 236 | if (ref->audio) { |
| 237 | dprintf(ctx, " cl:%"PRId64"d sn:%d s:%d sr:%d p:%d", | 237 | av_dlog(ctx, " cl:%"PRId64"d sn:%d s:%d sr:%d p:%d", |
| 238 | ref->audio->channel_layout, | 238 | ref->audio->channel_layout, |
| 239 | ref->audio->nb_samples, | 239 | ref->audio->nb_samples, |
| 240 | ref->audio->size, | 240 | ref->audio->size, |
| @@ -242,13 +242,13 @@ static void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end) · 1 unmodified line | |||
| 242 | ref->audio->planar); | 242 | ref->audio->planar); |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | dprintf(ctx, "]%s", end ? "\n" : ""); | 245 | av_dlog(ctx, "]%s", end ? "\n" : ""); |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | static void ff_dprintf_link(void *ctx, AVFilterLink *link, int end) | 248 | static void ff_dlog_link(void *ctx, AVFilterLink *link, int end) |
| 249 | { | 249 | { |
| 250 | if (link->type == AVMEDIA_TYPE_VIDEO) { | 250 | if (link->type == AVMEDIA_TYPE_VIDEO) { |
| 251 | dprintf(ctx, | 251 | av_dlog(ctx, |
| 252 | "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s", | 252 | "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s", |
| 253 | link, link->w, link->h, | 253 | link, link->w, link->h, |
| 254 | av_pix_fmt_descriptors[link->format].name, | 254 | av_pix_fmt_descriptors[link->format].name, |
| @@ -259,7 +259,7 @@ static void ff_dprintf_link(void *ctx, AVFilterLink *link, int end) · 4 unmodified lines | |||
| 259 | char buf[128]; | 259 | char buf[128]; |
| 260 | av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout); | 260 | av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout); |
| 261 | 261 | ||
| 262 | dprintf(ctx, | 262 | av_dlog(ctx, |
| 263 | "link[%p r:%"PRId64" cl:%s fmt:%-16s %-16s->%-16s]%s", | 263 | "link[%p r:%"PRId64" cl:%s fmt:%-16s %-16s->%-16s]%s", |
| 264 | link, link->sample_rate, buf, | 264 | link, link->sample_rate, buf, |
| 265 | av_get_sample_fmt_name(link->format), | 265 | av_get_sample_fmt_name(link->format), |
| @@ -269,15 +269,15 @@ static void ff_dprintf_link(void *ctx, AVFilterLink *link, int end) · 3 unmodified lines | |||
| 269 | } | 269 | } |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | #define FF_DPRINTF_START(ctx, func) dprintf(NULL, "%-16s: ", #func) | 272 | #define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func) |
| 273 | 273 | ||
| 274 | AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h) | 274 | AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h) |
| 275 | { | 275 | { |
| 276 | AVFilterBufferRef *ret = NULL; | 276 | AVFilterBufferRef *ret = NULL; |
| 277 | 277 | ||
| 278 | av_unused char buf[16]; | 278 | av_unused char buf[16]; |
| 279 | FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); | 279 | FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); |
| 280 | dprintf(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h); | 280 | av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h); |
| 281 | 281 | ||
| 282 | if (link->dstpad->get_video_buffer) | 282 | if (link->dstpad->get_video_buffer) |
| 283 | ret = link->dstpad->get_video_buffer(link, perms, w, h); | 283 | ret = link->dstpad->get_video_buffer(link, perms, w, h); |
| @@ -288,7 +288,7 @@ AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int · 4 unmodified lines | |||
| 288 | if (ret) | 288 | if (ret) |
| 289 | ret->type = AVMEDIA_TYPE_VIDEO; | 289 | ret->type = AVMEDIA_TYPE_VIDEO; |
| 290 | 290 | ||
| 291 | FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); ff_dprintf_ref(NULL, ret, 1); | 291 | FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1); |
| 292 | 292 | ||
| 293 | return ret; | 293 | return ret; |
| 294 | } | 294 | } |
| @@ -353,7 +353,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, · 58 unmodified lines | |||
| 353 | 353 | ||
| 354 | int avfilter_request_frame(AVFilterLink *link) | 354 | int avfilter_request_frame(AVFilterLink *link) |
| 355 | { | 355 | { |
| 356 | FF_DPRINTF_START(NULL, request_frame); ff_dprintf_link(NULL, link, 1); | 356 | FF_DPRINTF_START(NULL, request_frame); ff_dlog_link(NULL, link, 1); |
| 357 | 357 | ||
| 358 | if (link->srcpad->request_frame) | 358 | if (link->srcpad->request_frame) |
| 359 | return link->srcpad->request_frame(link); | 359 | return link->srcpad->request_frame(link); |
| @@ -388,7 +388,7 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) · 28 unmodified lines | |||
| 388 | AVFilterPad *dst = link->dstpad; | 388 | AVFilterPad *dst = link->dstpad; |
| 389 | int perms = picref->perms; | 389 | int perms = picref->perms; |
| 390 | 390 | ||
| 391 | FF_DPRINTF_START(NULL, start_frame); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " "); ff_dprintf_ref(NULL, picref, 1); | 391 | FF_DPRINTF_START(NULL, start_frame); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " "); ff_dlog_ref(NULL, picref, 1); |
| 392 | 392 | ||
| 393 | if (!(start_frame = dst->start_frame)) | 393 | if (!(start_frame = dst->start_frame)) |
| 394 | start_frame = avfilter_default_start_frame; | 394 | start_frame = avfilter_default_start_frame; |
| @@ -435,7 +435,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 40 unmodified lines | |||
| 435 | int i, j, vsub; | 435 | int i, j, vsub; |
| 436 | void (*draw_slice)(AVFilterLink *, int, int, int); | 436 | void (*draw_slice)(AVFilterLink *, int, int, int); |
| 437 | 437 | ||
| 438 | FF_DPRINTF_START(NULL, draw_slice); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " y:%d h:%d dir:%d\n", y, h, slice_dir); | 438 | FF_DPRINTF_START(NULL, draw_slice); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " y:%d h:%d dir:%d\n", y, h, slice_dir); |
| 439 | 439 | ||
| 440 | /* copy the slice if needed for permission reasons */ | 440 | /* copy the slice if needed for permission reasons */ |
| 441 | if (link->src_buf) { | 441 | if (link->src_buf) { |
| @@ -57,7 +57,7 @@ int ff_guidcmp(const void *g1, const void *g2) · 56 unmodified lines | |||
| 57 | #ifdef DEBUG | 57 | #ifdef DEBUG |
| 58 | #define PRINT_IF_GUID(g,cmp) \ | 58 | #define PRINT_IF_GUID(g,cmp) \ |
| 59 | if (!ff_guidcmp(g, &cmp)) \ | 59 | if (!ff_guidcmp(g, &cmp)) \ |
| 60 | dprintf(NULL, "(GUID: %s) ", #cmp) | 60 | av_dlog(NULL, "(GUID: %s) ", #cmp) |
| 61 | 61 | ||
| 62 | static void print_guid(const ff_asf_guid *g) | 62 | static void print_guid(const ff_asf_guid *g) |
| 63 | { | 63 | { |
| @@ -87,10 +87,10 @@ static void print_guid(const ff_asf_guid *g) · 23 unmodified lines | |||
| 87 | else PRINT_IF_GUID(g, stream_bitrate_guid); | 87 | else PRINT_IF_GUID(g, stream_bitrate_guid); |
| 88 | else PRINT_IF_GUID(g, ff_asf_language_guid); | 88 | else PRINT_IF_GUID(g, ff_asf_language_guid); |
| 89 | else | 89 | else |
| 90 | dprintf(NULL, "(GUID: unknown) "); | 90 | av_dlog(NULL, "(GUID: unknown) "); |
| 91 | for(i=0;i<16;i++) | 91 | for(i=0;i<16;i++) |
| 92 | dprintf(NULL, " 0x%02x,", (*g)[i]); | 92 | av_dlog(NULL, " 0x%02x,", (*g)[i]); |
| 93 | dprintf(NULL, "}\n"); | 93 | av_dlog(NULL, "}\n"); |
| 94 | } | 94 | } |
| 95 | #undef PRINT_IF_GUID | 95 | #undef PRINT_IF_GUID |
| 96 | #else | 96 | #else |
| @@ -177,9 +177,9 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 80 unmodified lines | |||
| 177 | int ret; | 177 | int ret; |
| 178 | ff_get_guid(pb, &g); | 178 | ff_get_guid(pb, &g); |
| 179 | gsize = get_le64(pb); | 179 | gsize = get_le64(pb); |
| 180 | dprintf(s, "%08"PRIx64": ", gpos); | 180 | av_dlog(s, "%08"PRIx64": ", gpos); |
| 181 | print_guid(&g); | 181 | print_guid(&g); |
| 182 | dprintf(s, " size=0x%"PRIx64"\n", gsize); | 182 | av_dlog(s, " size=0x%"PRIx64"\n", gsize); |
| 183 | if (!ff_guidcmp(&g, &ff_asf_data_header)) { | 183 | if (!ff_guidcmp(&g, &ff_asf_data_header)) { |
| 184 | asf->data_object_offset = url_ftell(pb); | 184 | asf->data_object_offset = url_ftell(pb); |
| 185 | // if not streaming, gsize is not unlimited (how?), and there is enough space in the file.. | 185 | // if not streaming, gsize is not unlimited (how?), and there is enough space in the file.. |
| @@ -704,7 +704,7 @@ static int ff_asf_get_packet(AVFormatContext *s, ByteIOContext *pb) · 518 unmodified lines | |||
| 704 | if (packet_length < asf->hdr.min_pktsize) | 704 | if (packet_length < asf->hdr.min_pktsize) |
| 705 | padsize += asf->hdr.min_pktsize - packet_length; | 705 | padsize += asf->hdr.min_pktsize - packet_length; |
| 706 | asf->packet_padsize = padsize; | 706 | asf->packet_padsize = padsize; |
| 707 | dprintf(s, "packet: size=%d padsize=%d left=%d\n", s->packet_size, asf->packet_padsize, asf->packet_size_left); | 707 | av_dlog(s, "packet: size=%d padsize=%d left=%d\n", s->packet_size, asf->packet_padsize, asf->packet_size_left); |
| 708 | return 0; | 708 | return 0; |
| 709 | } | 709 | } |
| 710 | 710 | ||
| @@ -85,7 +85,7 @@ static int avi_load_index(AVFormatContext *s); · 84 unmodified lines | |||
| 85 | static int guess_ni_flag(AVFormatContext *s); | 85 | static int guess_ni_flag(AVFormatContext *s); |
| 86 | 86 | ||
| 87 | #define print_tag(str, tag, size) \ | 87 | #define print_tag(str, tag, size) \ |
| 88 | dprintf(NULL, "%s: tag=%c%c%c%c size=0x%x\n", \ | 88 | av_dlog(NULL, "%s: tag=%c%c%c%c size=0x%x\n", \ |
| 89 | str, tag & 0xff, \ | 89 | str, tag & 0xff, \ |
| 90 | (tag >> 8) & 0xff, \ | 90 | (tag >> 8) & 0xff, \ |
| 91 | (tag >> 16) & 0xff, \ | 91 | (tag >> 16) & 0xff, \ |
| @@ -380,7 +380,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 288 unmodified lines | |||
| 380 | avi->movi_list = url_ftell(pb) - 4; | 380 | avi->movi_list = url_ftell(pb) - 4; |
| 381 | if(size) avi->movi_end = avi->movi_list + size + (size & 1); | 381 | if(size) avi->movi_end = avi->movi_list + size + (size & 1); |
| 382 | else avi->movi_end = url_fsize(pb); | 382 | else avi->movi_end = url_fsize(pb); |
| 383 | dprintf(NULL, "movi end=%"PRIx64"\n", avi->movi_end); | 383 | av_dlog(NULL, "movi end=%"PRIx64"\n", avi->movi_end); |
| 384 | goto end_of_header; | 384 | goto end_of_header; |
| 385 | } | 385 | } |
| 386 | else if (tag1 == MKTAG('I', 'N', 'F', 'O')) | 386 | else if (tag1 == MKTAG('I', 'N', 'F', 'O')) |
| @@ -408,7 +408,7 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt) · 407 unmodified lines | |||
| 408 | if ((ret = ffm_is_avail_data(s, FRAME_HEADER_SIZE+4)) < 0) | 408 | if ((ret = ffm_is_avail_data(s, FRAME_HEADER_SIZE+4)) < 0) |
| 409 | return ret; | 409 | return ret; |
| 410 | 410 | ||
| 411 | dprintf(s, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n", | 411 | av_dlog(s, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n", |
| 412 | url_ftell(s->pb), s->pb->pos, ffm->write_index, ffm->file_size); | 412 | url_ftell(s->pb), s->pb->pos, ffm->write_index, ffm->file_size); |
| 413 | if (ffm_read_data(s, ffm->header, FRAME_HEADER_SIZE, 1) != | 413 | if (ffm_read_data(s, ffm->header, FRAME_HEADER_SIZE, 1) != |
| 414 | FRAME_HEADER_SIZE) | 414 | FRAME_HEADER_SIZE) |
| @@ -424,7 +424,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) · 423 unmodified lines | |||
| 424 | st->codec->sample_rate = cfg.ext_sample_rate; | 424 | st->codec->sample_rate = cfg.ext_sample_rate; |
| 425 | else | 425 | else |
| 426 | st->codec->sample_rate = cfg.sample_rate; | 426 | st->codec->sample_rate = cfg.sample_rate; |
| 427 | dprintf(s, "mp4a config channels %d sample rate %d\n", | 427 | av_dlog(s, "mp4a config channels %d sample rate %d\n", |
| 428 | st->codec->channels, st->codec->sample_rate); | 428 | st->codec->channels, st->codec->sample_rate); |
| 429 | } | 429 | } |
| 430 | 430 | ||
| @@ -225,7 +225,7 @@ static int process_line(URLContext *h, char *line, int line_count, · 224 unmodified lines | |||
| 225 | p++; | 225 | p++; |
| 226 | s->http_code = strtol(p, &end, 10); | 226 | s->http_code = strtol(p, &end, 10); |
| 227 | 227 | ||
| 228 | dprintf(NULL, "http_code=%d\n", s->http_code); | 228 | av_dlog(NULL, "http_code=%d\n", s->http_code); |
| 229 | 229 | ||
| 230 | /* error codes are 4xx and 5xx, but regard 401 as a success, so we | 230 | /* error codes are 4xx and 5xx, but regard 401 as a success, so we |
| 231 | * don't abort until all headers have been parsed. */ | 231 | * don't abort until all headers have been parsed. */ |
| @@ -356,7 +356,7 @@ static int http_connect(URLContext *h, const char *path, const char *hoststr, · 124 unmodified lines | |||
| 356 | if (http_get_line(s, line, sizeof(line)) < 0) | 356 | if (http_get_line(s, line, sizeof(line)) < 0) |
| 357 | return AVERROR(EIO); | 357 | return AVERROR(EIO); |
| 358 | 358 | ||
| 359 | dprintf(NULL, "header='%s'\n", line); | 359 | av_dlog(NULL, "header='%s'\n", line); |
| 360 | 360 | ||
| 361 | err = process_line(h, line, s->line_count, new_location); | 361 | err = process_line(h, line, s->line_count, new_location); |
| 362 | if (err < 0) | 362 | if (err < 0) |
| @@ -387,7 +387,7 @@ static int http_read(URLContext *h, uint8_t *buf, int size) · 24 unmodified lines | |||
| 387 | 387 | ||
| 388 | s->chunksize = strtoll(line, NULL, 16); | 388 | s->chunksize = strtoll(line, NULL, 16); |
| 389 | 389 | ||
| 390 | dprintf(NULL, "Chunked encoding data size: %"PRId64"'\n", s->chunksize); | 390 | av_dlog(NULL, "Chunked encoding data size: %"PRId64"'\n", s->chunksize); |
| 391 | 391 | ||
| 392 | if (!s->chunksize) | 392 | if (!s->chunksize) |
| 393 | return 0; | 393 | return 0; |
| @@ -350,7 +350,7 @@ int ff_mp4_read_descr(AVFormatContext *fc, ByteIOContext *pb, int *tag) · 349 unmodified lines | |||
| 350 | int len; | 350 | int len; |
| 351 | *tag = get_byte(pb); | 351 | *tag = get_byte(pb); |
| 352 | len = ff_mp4_read_descr_len(pb); | 352 | len = ff_mp4_read_descr_len(pb); |
| 353 | dprintf(fc, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len); | 353 | av_dlog(fc, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len); |
| 354 | return len; | 354 | return len; |
| 355 | } | 355 | } |
| 356 | 356 | ||
| @@ -373,10 +373,10 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, ByteIOContex · 16 unmodified lines | |||
| 373 | get_be32(pb); /* avg bitrate */ | 373 | get_be32(pb); /* avg bitrate */ |
| 374 | 374 | ||
| 375 | st->codec->codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id); | 375 | st->codec->codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id); |
| 376 | dprintf(fc, "esds object type id 0x%02x\n", object_type_id); | 376 | av_dlog(fc, "esds object type id 0x%02x\n", object_type_id); |
| 377 | len = ff_mp4_read_descr(fc, pb, &tag); | 377 | len = ff_mp4_read_descr(fc, pb, &tag); |
| 378 | if (tag == MP4DecSpecificDescrTag) { | 378 | if (tag == MP4DecSpecificDescrTag) { |
| 379 | dprintf(fc, "Specific MPEG4 header len=%d\n", len); | 379 | av_dlog(fc, "Specific MPEG4 header len=%d\n", len); |
| 380 | if((uint64_t)len > (1<<30)) | 380 | if((uint64_t)len > (1<<30)) |
| 381 | return -1; | 381 | return -1; |
| 382 | av_free(st->codec->extradata); | 382 | av_free(st->codec->extradata); |
| @@ -396,7 +396,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, ByteIOContex · 13 unmodified lines | |||
| 396 | st->codec->sample_rate = cfg.ext_sample_rate; | 396 | st->codec->sample_rate = cfg.ext_sample_rate; |
| 397 | else | 397 | else |
| 398 | st->codec->sample_rate = cfg.sample_rate; | 398 | st->codec->sample_rate = cfg.sample_rate; |
| 399 | dprintf(fc, "mp4a config channels %d obj %d ext obj %d " | 399 | av_dlog(fc, "mp4a config channels %d obj %d ext obj %d " |
| 400 | "sample rate %d ext sample rate %d\n", st->codec->channels, | 400 | "sample rate %d ext sample rate %d\n", st->codec->channels, |
| 401 | cfg.object_type, cfg.ext_object_type, | 401 | cfg.object_type, cfg.ext_object_type, |
| 402 | cfg.sample_rate, cfg.ext_sample_rate); | 402 | cfg.sample_rate, cfg.ext_sample_rate); |
| @@ -122,7 +122,7 @@ static int read_data_packet(MMSHContext *mmsh, const int len) · 121 unmodified lines | |||
| 122 | return AVERROR(EIO); | 122 | return AVERROR(EIO); |
| 123 | } | 123 | } |
| 124 | res = url_read_complete(mms->mms_hd, mms->in_buffer, len); | 124 | res = url_read_complete(mms->mms_hd, mms->in_buffer, len); |
| 125 | dprintf(NULL, "Data packet len = %d\n", len); | 125 | av_dlog(NULL, "Data packet len = %d\n", len); |
| 126 | if (res != len) { | 126 | if (res != len) { |
| 127 | av_log(NULL, AV_LOG_ERROR, "Read data packet failed!\n"); | 127 | av_log(NULL, AV_LOG_ERROR, "Read data packet failed!\n"); |
| 128 | return AVERROR(EIO); | 128 | return AVERROR(EIO); |
| @@ -156,7 +156,7 @@ static int get_http_header_data(MMSHContext *mmsh) · 27 unmodified lines | |||
| 156 | if (mms->asf_header) { | 156 | if (mms->asf_header) { |
| 157 | if (len != mms->asf_header_size) { | 157 | if (len != mms->asf_header_size) { |
| 158 | mms->asf_header_size = len; | 158 | mms->asf_header_size = len; |
| 159 | dprintf(NULL, "Header len changed from %d to %d\n", | 159 | av_dlog(NULL, "Header len changed from %d to %d\n", |
| 160 | mms->asf_header_size, len); | 160 | mms->asf_header_size, len); |
| 161 | av_freep(&mms->asf_header); | 161 | av_freep(&mms->asf_header); |
| 162 | } | 162 | } |
| @@ -201,7 +201,7 @@ static int get_http_header_data(MMSHContext *mmsh) · 38 unmodified lines | |||
| 201 | av_log(NULL, AV_LOG_ERROR, "Read other chunk type data failed!\n"); | 201 | av_log(NULL, AV_LOG_ERROR, "Read other chunk type data failed!\n"); |
| 202 | return AVERROR(EIO); | 202 | return AVERROR(EIO); |
| 203 | } else { | 203 | } else { |
| 204 | dprintf(NULL, "Skip chunk type %d \n", chunk_type); | 204 | av_dlog(NULL, "Skip chunk type %d \n", chunk_type); |
| 205 | continue; | 205 | continue; |
| 206 | } | 206 | } |
| 207 | } | 207 | } |
| @@ -290,7 +290,7 @@ static int mmsh_open(URLContext *h, const char *uri, int flags) · 82 unmodified lines | |||
| 290 | av_log(NULL, AV_LOG_ERROR, "Build play request failed!\n"); | 290 | av_log(NULL, AV_LOG_ERROR, "Build play request failed!\n"); |
| 291 | goto fail; | 291 | goto fail; |
| 292 | } | 292 | } |
| 293 | dprintf(NULL, "out_buffer is %s", headers); | 293 | av_dlog(NULL, "out_buffer is %s", headers); |
| 294 | ff_http_set_headers(mms->mms_hd, headers); | 294 | ff_http_set_headers(mms->mms_hd, headers); |
| 295 | 295 | ||
| 296 | err = url_connect(mms->mms_hd); | 296 | err = url_connect(mms->mms_hd); |
| @@ -304,12 +304,12 @@ static int mmsh_open(URLContext *h, const char *uri, int flags) · 7 unmodified lines | |||
| 304 | goto fail; | 304 | goto fail; |
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | dprintf(NULL, "Connection successfully open\n"); | 307 | av_dlog(NULL, "Connection successfully open\n"); |
| 308 | return 0; | 308 | return 0; |
| 309 | fail: | 309 | fail: |
| 310 | av_freep(&stream_selection); | 310 | av_freep(&stream_selection); |
| 311 | mmsh_close(h); | 311 | mmsh_close(h); |
| 312 | dprintf(NULL, "Connection failed with error %d\n", err); | 312 | av_dlog(NULL, "Connection failed with error %d\n", err); |
| 313 | return err; | 313 | return err; |
| 314 | } | 314 | } |
| 315 | 315 | ||
| @@ -206,11 +206,11 @@ static int send_media_file_request(MMSTContext *mmst) · 205 unmodified lines | |||
| 206 | static void handle_packet_stream_changing_type(MMSTContext *mmst) | 206 | static void handle_packet_stream_changing_type(MMSTContext *mmst) |
| 207 | { | 207 | { |
| 208 | MMSContext *mms = &mmst->mms; | 208 | MMSContext *mms = &mmst->mms; |
| 209 | dprintf(NULL, "Stream changing!\n"); | 209 | av_dlog(NULL, "Stream changing!\n"); |
| 210 | 210 | ||
| 211 | // 40 is the packet header size, 7 is the prefix size. | 211 | // 40 is the packet header size, 7 is the prefix size. |
| 212 | mmst->header_packet_id= AV_RL32(mms->in_buffer + 40 + 7); | 212 | mmst->header_packet_id= AV_RL32(mms->in_buffer + 40 + 7); |
| 213 | dprintf(NULL, "Changed header prefix to 0x%x", mmst->header_packet_id); | 213 | av_dlog(NULL, "Changed header prefix to 0x%x", mmst->header_packet_id); |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | static int send_keepalive_packet(MMSTContext *mmst) | 216 | static int send_keepalive_packet(MMSTContext *mmst) |
| @@ -270,7 +270,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst) · 53 unmodified lines | |||
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | length_remaining= AV_RL32(mms->in_buffer+8) + 4; | 272 | length_remaining= AV_RL32(mms->in_buffer+8) + 4; |
| 273 | dprintf(NULL, "Length remaining is %d\n", length_remaining); | 273 | av_dlog(NULL, "Length remaining is %d\n", length_remaining); |
| 274 | // read the rest of the packet. | 274 | // read the rest of the packet. |
| 275 | if (length_remaining < 0 | 275 | if (length_remaining < 0 |
| 276 | || length_remaining > sizeof(mms->in_buffer) - 12) { | 276 | || length_remaining > sizeof(mms->in_buffer) - 12) { |
| @@ -350,7 +350,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst) · 73 unmodified lines | |||
| 350 | } else if(packet_id_type == mmst->packet_id) { | 350 | } else if(packet_id_type == mmst->packet_id) { |
| 351 | packet_type = SC_PKT_ASF_MEDIA; | 351 | packet_type = SC_PKT_ASF_MEDIA; |
| 352 | } else { | 352 | } else { |
| 353 | dprintf(NULL, "packet id type %d is old.", packet_id_type); | 353 | av_dlog(NULL, "packet id type %d is old.", packet_id_type); |
| 354 | continue; | 354 | continue; |
| 355 | } | 355 | } |
| 356 | } | 356 | } |
| @@ -376,7 +376,7 @@ static int mms_safe_send_recv(MMSTContext *mmst, · 19 unmodified lines | |||
| 376 | if(send_fun) { | 376 | if(send_fun) { |
| 377 | int ret = send_fun(mmst); | 377 | int ret = send_fun(mmst); |
| 378 | if (ret < 0) { | 378 | if (ret < 0) { |
| 379 | dprintf(NULL, "Send Packet error before expecting recv packet %d\n", expect_type); | 379 | av_dlog(NULL, "Send Packet error before expecting recv packet %d\n", expect_type); |
| 380 | return ret; | 380 | return ret; |
| 381 | } | 381 | } |
| 382 | } | 382 | } |
| @@ -554,7 +554,7 @@ static int mms_open(URLContext *h, const char *uri, int flags) · 171 unmodified lines | |||
| 554 | } | 554 | } |
| 555 | err = ff_mms_asf_header_parser(mms); | 555 | err = ff_mms_asf_header_parser(mms); |
| 556 | if (err) { | 556 | if (err) { |
| 557 | dprintf(NULL, "asf header parsed failed!\n"); | 557 | av_dlog(NULL, "asf header parsed failed!\n"); |
| 558 | goto fail; | 558 | goto fail; |
| 559 | } | 559 | } |
| 560 | mms->header_parsed = 1; | 560 | mms->header_parsed = 1; |
| @@ -571,11 +571,11 @@ static int mms_open(URLContext *h, const char *uri, int flags) · 10 unmodified lines | |||
| 571 | if (err) { | 571 | if (err) { |
| 572 | goto fail; | 572 | goto fail; |
| 573 | } | 573 | } |
| 574 | dprintf(NULL, "Leaving open (success)\n"); | 574 | av_dlog(NULL, "Leaving open (success)\n"); |
| 575 | return 0; | 575 | return 0; |
| 576 | fail: | 576 | fail: |
| 577 | mms_close(h); | 577 | mms_close(h); |
| 578 | dprintf(NULL, "Leaving open (failure: %d)\n", err); | 578 | av_dlog(NULL, "Leaving open (failure: %d)\n", err); |
| 579 | return err; | 579 | return err; |
| 580 | } | 580 | } |
| 581 | 581 | ||
| @@ -608,12 +608,12 @@ static int mms_read(URLContext *h, uint8_t *buf, int size) · 26 unmodified lines | |||
| 608 | // copy the data to the packet buffer. | 608 | // copy the data to the packet buffer. |
| 609 | result = ff_mms_read_data(mms, buf, size); | 609 | result = ff_mms_read_data(mms, buf, size); |
| 610 | if (result == 0) { | 610 | if (result == 0) { |
| 611 | dprintf(NULL, "read asf media paket size is zero!\n"); | 611 | av_dlog(NULL, "read asf media paket size is zero!\n"); |
| 612 | break; | 612 | break; |
| 613 | } | 613 | } |
| 614 | } | 614 | } |
| 615 | } else { | 615 | } else { |
| 616 | dprintf(NULL, "read packet error!\n"); | 616 | av_dlog(NULL, "read packet error!\n"); |
| 617 | break; | 617 | break; |
| 618 | } | 618 | } |
| 619 | } | 619 | } |
| @@ -266,7 +266,7 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 265 unmodified lines | |||
| 266 | a.size = get_be32(pb); | 266 | a.size = get_be32(pb); |
| 267 | a.type = get_le32(pb); | 267 | a.type = get_le32(pb); |
| 268 | } | 268 | } |
| 269 | dprintf(c->fc, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n", | 269 | av_dlog(c->fc, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n", |
| 270 | a.type, (char*)&a.type, (char*)&atom.type, a.size, total_size, atom.size); | 270 | a.type, (char*)&a.type, (char*)&atom.type, a.size, total_size, atom.size); |
| 271 | total_size += 8; | 271 | total_size += 8; |
| 272 | if (a.size == 1) { /* 64 bit extended size */ | 272 | if (a.size == 1) { /* 64 bit extended size */ |
| @@ -349,7 +349,7 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 76 unmodified lines | |||
| 349 | 349 | ||
| 350 | dref->type = get_le32(pb); | 350 | dref->type = get_le32(pb); |
| 351 | get_be32(pb); // version + flags | 351 | get_be32(pb); // version + flags |
| 352 | dprintf(c->fc, "type %.4s size %d\n", (char*)&dref->type, size); | 352 | av_dlog(c->fc, "type %.4s size %d\n", (char*)&dref->type, size); |
| 353 | 353 | ||
| 354 | if (dref->type == MKTAG('a','l','i','s') && size > 150) { | 354 | if (dref->type == MKTAG('a','l','i','s') && size > 150) { |
| 355 | /* macintosh alias record */ | 355 | /* macintosh alias record */ |
| @@ -441,8 +441,8 @@ static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 85 unmodified lines | |||
| 441 | ctype = get_le32(pb); | 441 | ctype = get_le32(pb); |
| 442 | type = get_le32(pb); /* component subtype */ | 442 | type = get_le32(pb); /* component subtype */ |
| 443 | 443 | ||
| 444 | dprintf(c->fc, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype); | 444 | av_dlog(c->fc, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype); |
| 445 | dprintf(c->fc, "stype= %.4s\n", (char*)&type); | 445 | av_dlog(c->fc, "stype= %.4s\n", (char*)&type); |
| 446 | 446 | ||
| 447 | if (type == MKTAG('v','i','d','e')) | 447 | if (type == MKTAG('v','i','d','e')) |
| 448 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; | 448 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| @@ -583,7 +583,7 @@ static int mov_read_moov(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 134 unmodified lines | |||
| 583 | static int mov_read_moof(MOVContext *c, ByteIOContext *pb, MOVAtom atom) | 583 | static int mov_read_moof(MOVContext *c, ByteIOContext *pb, MOVAtom atom) |
| 584 | { | 584 | { |
| 585 | c->fragment.moof_offset = url_ftell(pb) - 8; | 585 | c->fragment.moof_offset = url_ftell(pb) - 8; |
| 586 | dprintf(c->fc, "moof offset %llx\n", c->fragment.moof_offset); | 586 | av_dlog(c->fc, "moof offset %llx\n", c->fragment.moof_offset); |
| 587 | return mov_read_default(c, pb, atom); | 587 | return mov_read_default(c, pb, atom); |
| 588 | } | 588 | } |
| 589 | 589 | ||
| @@ -655,7 +655,7 @@ static int mov_read_mvhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 65 unmodified lines | |||
| 655 | mov_metadata_creation_time(&c->fc->metadata, creation_time); | 655 | mov_metadata_creation_time(&c->fc->metadata, creation_time); |
| 656 | c->time_scale = get_be32(pb); /* time scale */ | 656 | c->time_scale = get_be32(pb); /* time scale */ |
| 657 | 657 | ||
| 658 | dprintf(c->fc, "time scale = %i\n", c->time_scale); | 658 | av_dlog(c->fc, "time scale = %i\n", c->time_scale); |
| 659 | 659 | ||
| 660 | c->duration = (version == 1) ? get_be64(pb) : get_be32(pb); /* duration */ | 660 | c->duration = (version == 1) ? get_be64(pb) : get_be32(pb); /* duration */ |
| 661 | get_be32(pb); /* preferred scale */ | 661 | get_be32(pb); /* preferred scale */ |
| @@ -697,7 +697,7 @@ static int mov_read_smi(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 35 unmodified lines | |||
| 697 | st->codec->extradata_size = 0x5a + atom.size; | 697 | st->codec->extradata_size = 0x5a + atom.size; |
| 698 | memcpy(st->codec->extradata, "SVQ3", 4); // fake | 698 | memcpy(st->codec->extradata, "SVQ3", 4); // fake |
| 699 | get_buffer(pb, st->codec->extradata + 0x5a, atom.size); | 699 | get_buffer(pb, st->codec->extradata + 0x5a, atom.size); |
| 700 | dprintf(c->fc, "Reading SMI %"PRId64" %s\n", atom.size, st->codec->extradata + 0x5a); | 700 | av_dlog(c->fc, "Reading SMI %"PRId64" %s\n", atom.size, st->codec->extradata + 0x5a); |
| 701 | return 0; | 701 | return 0; |
| 702 | } | 702 | } |
| 703 | 703 | ||
| @@ -711,7 +711,7 @@ static int mov_read_enda(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 7 unmodified lines | |||
| 711 | st = c->fc->streams[c->fc->nb_streams-1]; | 711 | st = c->fc->streams[c->fc->nb_streams-1]; |
| 712 | 712 | ||
| 713 | little_endian = get_be16(pb); | 713 | little_endian = get_be16(pb); |
| 714 | dprintf(c->fc, "enda %d\n", little_endian); | 714 | av_dlog(c->fc, "enda %d\n", little_endian); |
| 715 | if (little_endian == 1) { | 715 | if (little_endian == 1) { |
| 716 | switch (st->codec->codec_id) { | 716 | switch (st->codec->codec_id) { |
| 717 | case CODEC_ID_PCM_S24BE: | 717 | case CODEC_ID_PCM_S24BE: |
| @@ -974,7 +974,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, ByteIOContext *pb, int entries) · 256 unmodified lines | |||
| 974 | } | 974 | } |
| 975 | } | 975 | } |
| 976 | 976 | ||
| 977 | dprintf(c->fc, "size=%d 4CC= %c%c%c%c codec_type=%d\n", size, | 977 | av_dlog(c->fc, "size=%d 4CC= %c%c%c%c codec_type=%d\n", size, |
| 978 | (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff, | 978 | (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff, |
| 979 | (format >> 24) & 0xff, st->codec->codec_type); | 979 | (format >> 24) & 0xff, st->codec->codec_type); |
| 980 | 980 | ||
| @@ -1009,7 +1009,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, ByteIOContext *pb, int entries) · 28 unmodified lines | |||
| 1009 | 1009 | ||
| 1010 | st->codec->bits_per_coded_sample = get_be16(pb); /* depth */ | 1010 | st->codec->bits_per_coded_sample = get_be16(pb); /* depth */ |
| 1011 | st->codec->color_table_id = get_be16(pb); /* colortable id */ | 1011 | st->codec->color_table_id = get_be16(pb); /* colortable id */ |
| 1012 | dprintf(c->fc, "depth %d, ctab id %d\n", | 1012 | av_dlog(c->fc, "depth %d, ctab id %d\n", |
| 1013 | st->codec->bits_per_coded_sample, st->codec->color_table_id); | 1013 | st->codec->bits_per_coded_sample, st->codec->color_table_id); |
| 1014 | /* figure out the palette situation */ | 1014 | /* figure out the palette situation */ |
| 1015 | color_depth = st->codec->bits_per_coded_sample & 0x1F; | 1015 | color_depth = st->codec->bits_per_coded_sample & 0x1F; |
| @@ -1091,7 +1091,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, ByteIOContext *pb, int entries) · 75 unmodified lines | |||
| 1091 | get_be32(pb); /* vendor */ | 1091 | get_be32(pb); /* vendor */ |
| 1092 | 1092 | ||
| 1093 | st->codec->channels = get_be16(pb); /* channel count */ | 1093 | st->codec->channels = get_be16(pb); /* channel count */ |
| 1094 | dprintf(c->fc, "audio channels %d\n", st->codec->channels); | 1094 | av_dlog(c->fc, "audio channels %d\n", st->codec->channels); |
| 1095 | st->codec->bits_per_coded_sample = get_be16(pb); /* sample size */ | 1095 | st->codec->bits_per_coded_sample = get_be16(pb); /* sample size */ |
| 1096 | 1096 | ||
| 1097 | sc->audio_cid = get_be16(pb); | 1097 | sc->audio_cid = get_be16(pb); |
| @@ -1100,7 +1100,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, ByteIOContext *pb, int entries) · 2 unmodified lines | |||
| 1100 | st->codec->sample_rate = ((get_be32(pb) >> 16)); | 1100 | st->codec->sample_rate = ((get_be32(pb) >> 16)); |
| 1101 | 1101 | ||
| 1102 | //Read QT version 1 fields. In version 0 these do not exist. | 1102 | //Read QT version 1 fields. In version 0 these do not exist. |
| 1103 | dprintf(c->fc, "version =%d, isom =%d\n",version,c->isom); | 1103 | av_dlog(c->fc, "version =%d, isom =%d\n",version,c->isom); |
| 1104 | if(!c->isom) { | 1104 | if(!c->isom) { |
| 1105 | if(version==1) { | 1105 | if(version==1) { |
| 1106 | sc->samples_per_frame = get_be32(pb); | 1106 | sc->samples_per_frame = get_be32(pb); |
| @@ -1271,7 +1271,7 @@ static int mov_read_stsc(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 164 unmodified lines | |||
| 1271 | 1271 | ||
| 1272 | entries = get_be32(pb); | 1272 | entries = get_be32(pb); |
| 1273 | 1273 | ||
| 1274 | dprintf(c->fc, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries); | 1274 | av_dlog(c->fc, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries); |
| 1275 | 1275 | ||
| 1276 | if(entries >= UINT_MAX / sizeof(*sc->stsc_data)) | 1276 | if(entries >= UINT_MAX / sizeof(*sc->stsc_data)) |
| 1277 | return -1; | 1277 | return -1; |
| @@ -1311,7 +1311,7 @@ static int mov_read_stps(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 33 unmodified lines | |||
| 1311 | 1311 | ||
| 1312 | for (i = 0; i < entries; i++) { | 1312 | for (i = 0; i < entries; i++) { |
| 1313 | sc->stps_data[i] = get_be32(pb); | 1313 | sc->stps_data[i] = get_be32(pb); |
| 1314 | //dprintf(c->fc, "stps %d\n", sc->stps_data[i]); | 1314 | //av_dlog(c->fc, "stps %d\n", sc->stps_data[i]); |
| 1315 | } | 1315 | } |
| 1316 | 1316 | ||
| 1317 | return 0; | 1317 | return 0; |
| @@ -1333,7 +1333,7 @@ static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 15 unmodified lines | |||
| 1333 | 1333 | ||
| 1334 | entries = get_be32(pb); | 1334 | entries = get_be32(pb); |
| 1335 | 1335 | ||
| 1336 | dprintf(c->fc, "keyframe_count = %d\n", entries); | 1336 | av_dlog(c->fc, "keyframe_count = %d\n", entries); |
| 1337 | 1337 | ||
| 1338 | if(entries >= UINT_MAX / sizeof(int)) | 1338 | if(entries >= UINT_MAX / sizeof(int)) |
| 1339 | return -1; | 1339 | return -1; |
| @@ -1344,7 +1344,7 @@ static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 4 unmodified lines | |||
| 1344 | 1344 | ||
| 1345 | for(i=0; i<entries; i++) { | 1345 | for(i=0; i<entries; i++) { |
| 1346 | sc->keyframes[i] = get_be32(pb); | 1346 | sc->keyframes[i] = get_be32(pb); |
| 1347 | //dprintf(c->fc, "keyframes[]=%d\n", sc->keyframes[i]); | 1347 | //av_dlog(c->fc, "keyframes[]=%d\n", sc->keyframes[i]); |
| 1348 | } | 1348 | } |
| 1349 | return 0; | 1349 | return 0; |
| 1350 | } | 1350 | } |
| @@ -1377,7 +1377,7 @@ static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 26 unmodified lines | |||
| 1377 | } | 1377 | } |
| 1378 | entries = get_be32(pb); | 1378 | entries = get_be32(pb); |
| 1379 | 1379 | ||
| 1380 | dprintf(c->fc, "sample_size = %d sample_count = %d\n", sc->sample_size, entries); | 1380 | av_dlog(c->fc, "sample_size = %d sample_count = %d\n", sc->sample_size, entries); |
| 1381 | 1381 | ||
| 1382 | sc->sample_count = entries; | 1382 | sc->sample_count = entries; |
| 1383 | if (sample_size) | 1383 | if (sample_size) |
| @@ -1434,7 +1434,7 @@ static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 50 unmodified lines | |||
| 1434 | get_be24(pb); /* flags */ | 1434 | get_be24(pb); /* flags */ |
| 1435 | entries = get_be32(pb); | 1435 | entries = get_be32(pb); |
| 1436 | 1436 | ||
| 1437 | dprintf(c->fc, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries); | 1437 | av_dlog(c->fc, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries); |
| 1438 | 1438 | ||
| 1439 | if(entries >= UINT_MAX / sizeof(*sc->stts_data)) | 1439 | if(entries >= UINT_MAX / sizeof(*sc->stts_data)) |
| 1440 | return -1; | 1440 | return -1; |
| @@ -1452,7 +1452,7 @@ static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 11 unmodified lines | |||
| 1452 | sc->stts_data[i].count= sample_count; | 1452 | sc->stts_data[i].count= sample_count; |
| 1453 | sc->stts_data[i].duration= sample_duration; | 1453 | sc->stts_data[i].duration= sample_duration; |
| 1454 | 1454 | ||
| 1455 | dprintf(c->fc, "sample_count=%d, sample_duration=%d\n",sample_count,sample_duration); | 1455 | av_dlog(c->fc, "sample_count=%d, sample_duration=%d\n",sample_count,sample_duration); |
| 1456 | 1456 | ||
| 1457 | duration+=(int64_t)sample_duration*sample_count; | 1457 | duration+=(int64_t)sample_duration*sample_count; |
| 1458 | total_sample_count+=sample_count; | 1458 | total_sample_count+=sample_count; |
| @@ -1479,7 +1479,7 @@ static int mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 20 unmodified lines | |||
| 1479 | get_be24(pb); /* flags */ | 1479 | get_be24(pb); /* flags */ |
| 1480 | entries = get_be32(pb); | 1480 | entries = get_be32(pb); |
| 1481 | 1481 | ||
| 1482 | dprintf(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries); | 1482 | av_dlog(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries); |
| 1483 | 1483 | ||
| 1484 | if(entries >= UINT_MAX / sizeof(*sc->ctts_data)) | 1484 | if(entries >= UINT_MAX / sizeof(*sc->ctts_data)) |
| 1485 | return -1; | 1485 | return -1; |
| @@ -1498,7 +1498,7 @@ static int mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 12 unmodified lines | |||
| 1498 | sc->dts_shift = FFMAX(sc->dts_shift, -duration); | 1498 | sc->dts_shift = FFMAX(sc->dts_shift, -duration); |
| 1499 | } | 1499 | } |
| 1500 | 1500 | ||
| 1501 | dprintf(c->fc, "dts shift %d\n", sc->dts_shift); | 1501 | av_dlog(c->fc, "dts shift %d\n", sc->dts_shift); |
| 1502 | 1502 | ||
| 1503 | return 0; | 1503 | return 0; |
| 1504 | } | 1504 | } |
| @@ -1578,7 +1578,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) · 73 unmodified lines | |||
| 1578 | e->size = sample_size; | 1578 | e->size = sample_size; |
| 1579 | e->min_distance = distance; | 1579 | e->min_distance = distance; |
| 1580 | e->flags = keyframe ? AVINDEX_KEYFRAME : 0; | 1580 | e->flags = keyframe ? AVINDEX_KEYFRAME : 0; |
| 1581 | dprintf(mov->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", " | 1581 | av_dlog(mov->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", " |
| 1582 | "size %d, distance %d, keyframe %d\n", st->index, current_sample, | 1582 | "size %d, distance %d, keyframe %d\n", st->index, current_sample, |
| 1583 | current_offset, current_dts, sample_size, distance, keyframe); | 1583 | current_offset, current_dts, sample_size, distance, keyframe); |
| 1584 | } | 1584 | } |
| @@ -1626,7 +1626,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) · 41 unmodified lines | |||
| 1626 | total += chunk_count * count; | 1626 | total += chunk_count * count; |
| 1627 | } | 1627 | } |
| 1628 | 1628 | ||
| 1629 | dprintf(mov->fc, "chunk count %d\n", total); | 1629 | av_dlog(mov->fc, "chunk count %d\n", total); |
| 1630 | if (total >= UINT_MAX / sizeof(*st->index_entries)) | 1630 | if (total >= UINT_MAX / sizeof(*st->index_entries)) |
| 1631 | return; | 1631 | return; |
| 1632 | st->index_entries = av_malloc(total*sizeof(*st->index_entries)); | 1632 | st->index_entries = av_malloc(total*sizeof(*st->index_entries)); |
| @@ -1670,7 +1670,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) · 37 unmodified lines | |||
| 1670 | e->size = size; | 1670 | e->size = size; |
| 1671 | e->min_distance = 0; | 1671 | e->min_distance = 0; |
| 1672 | e->flags = AVINDEX_KEYFRAME; | 1672 | e->flags = AVINDEX_KEYFRAME; |
| 1673 | dprintf(mov->fc, "AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", " | 1673 | av_dlog(mov->fc, "AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", " |
| 1674 | "size %d, duration %d\n", st->index, i, current_offset, current_dts, | 1674 | "size %d, duration %d\n", st->index, i, current_offset, current_dts, |
| 1675 | size, samples); | 1675 | size, samples); |
| 1676 | 1676 | ||
| @@ -1764,7 +1764,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 87 unmodified lines | |||
| 1764 | !st->codec->frame_size && sc->stts_count == 1) { | 1764 | !st->codec->frame_size && sc->stts_count == 1) { |
| 1765 | st->codec->frame_size = av_rescale(sc->stts_data[0].duration, | 1765 | st->codec->frame_size = av_rescale(sc->stts_data[0].duration, |
| 1766 | st->codec->sample_rate, sc->time_scale); | 1766 | st->codec->sample_rate, sc->time_scale); |
| 1767 | dprintf(c->fc, "frame size %d\n", st->codec->frame_size); | 1767 | av_dlog(c->fc, "frame size %d\n", st->codec->frame_size); |
| 1768 | } | 1768 | } |
| 1769 | 1769 | ||
| 1770 | mov_build_index(c, st); | 1770 | mov_build_index(c, st); |
| @@ -1961,7 +1961,7 @@ static int mov_read_tfhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 190 unmodified lines | |||
| 1961 | frag->duration = flags & 0x08 ? get_be32(pb) : trex->duration; | 1961 | frag->duration = flags & 0x08 ? get_be32(pb) : trex->duration; |
| 1962 | frag->size = flags & 0x10 ? get_be32(pb) : trex->size; | 1962 | frag->size = flags & 0x10 ? get_be32(pb) : trex->size; |
| 1963 | frag->flags = flags & 0x20 ? get_be32(pb) : trex->flags; | 1963 | frag->flags = flags & 0x20 ? get_be32(pb) : trex->flags; |
| 1964 | dprintf(c->fc, "frag flags 0x%x\n", frag->flags); | 1964 | av_dlog(c->fc, "frag flags 0x%x\n", frag->flags); |
| 1965 | return 0; | 1965 | return 0; |
| 1966 | } | 1966 | } |
| 1967 | 1967 | ||
| @@ -2019,7 +2019,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 51 unmodified lines | |||
| 2019 | get_byte(pb); /* version */ | 2019 | get_byte(pb); /* version */ |
| 2020 | flags = get_be24(pb); | 2020 | flags = get_be24(pb); |
| 2021 | entries = get_be32(pb); | 2021 | entries = get_be32(pb); |
| 2022 | dprintf(c->fc, "flags 0x%x entries %d\n", flags, entries); | 2022 | av_dlog(c->fc, "flags 0x%x entries %d\n", flags, entries); |
| 2023 | if (flags & 0x001) data_offset = get_be32(pb); | 2023 | if (flags & 0x001) data_offset = get_be32(pb); |
| 2024 | if (flags & 0x004) first_sample_flags = get_be32(pb); | 2024 | if (flags & 0x004) first_sample_flags = get_be32(pb); |
| 2025 | if (flags & 0x800) { | 2025 | if (flags & 0x800) { |
| @@ -2035,7 +2035,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 9 unmodified lines | |||
| 2035 | dts = st->duration; | 2035 | dts = st->duration; |
| 2036 | offset = frag->base_data_offset + data_offset; | 2036 | offset = frag->base_data_offset + data_offset; |
| 2037 | distance = 0; | 2037 | distance = 0; |
| 2038 | dprintf(c->fc, "first sample flags 0x%x\n", first_sample_flags); | 2038 | av_dlog(c->fc, "first sample flags 0x%x\n", first_sample_flags); |
| 2039 | for (i = 0; i < entries; i++) { | 2039 | for (i = 0; i < entries; i++) { |
| 2040 | unsigned sample_size = frag->size; | 2040 | unsigned sample_size = frag->size; |
| 2041 | int sample_flags = i ? frag->flags : first_sample_flags; | 2041 | int sample_flags = i ? frag->flags : first_sample_flags; |
| @@ -2055,7 +2055,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 13 unmodified lines | |||
| 2055 | distance = 0; | 2055 | distance = 0; |
| 2056 | av_add_index_entry(st, offset, dts, sample_size, distance, | 2056 | av_add_index_entry(st, offset, dts, sample_size, distance, |
| 2057 | keyframe ? AVINDEX_KEYFRAME : 0); | 2057 | keyframe ? AVINDEX_KEYFRAME : 0); |
| 2058 | dprintf(c->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", " | 2058 | av_dlog(c->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", " |
| 2059 | "size %d, distance %d, keyframe %d\n", st->index, sc->sample_count+i, | 2059 | "size %d, distance %d, keyframe %d\n", st->index, sc->sample_count+i, |
| 2060 | offset, dts, sample_size, distance, keyframe); | 2060 | offset, dts, sample_size, distance, keyframe); |
| 2061 | distance++; | 2061 | distance++; |
| @@ -2172,7 +2172,7 @@ static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 110 unmodified lines | |||
| 2172 | av_log(c->fc, AV_LOG_WARNING, "multiple edit list entries, " | 2172 | av_log(c->fc, AV_LOG_WARNING, "multiple edit list entries, " |
| 2173 | "a/v desync might occur, patch welcome\n"); | 2173 | "a/v desync might occur, patch welcome\n"); |
| 2174 | 2174 | ||
| 2175 | dprintf(c->fc, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count); | 2175 | av_dlog(c->fc, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count); |
| 2176 | return 0; | 2176 | return 0; |
| 2177 | } | 2177 | } |
| 2178 | 2178 | ||
| @@ -2363,7 +2363,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap) · 184 unmodified lines | |||
| 2363 | av_log(s, AV_LOG_ERROR, "moov atom not found\n"); | 2363 | av_log(s, AV_LOG_ERROR, "moov atom not found\n"); |
| 2364 | return -1; | 2364 | return -1; |
| 2365 | } | 2365 | } |
| 2366 | dprintf(mov->fc, "on_parse_exit_offset=%lld\n", url_ftell(pb)); | 2366 | av_dlog(mov->fc, "on_parse_exit_offset=%lld\n", url_ftell(pb)); |
| 2367 | 2367 | ||
| 2368 | if (!url_is_streamed(pb) && mov->chapter_track > 0) | 2368 | if (!url_is_streamed(pb) && mov->chapter_track > 0) |
| 2369 | mov_read_chapters(s); | 2369 | mov_read_chapters(s); |
| @@ -2382,7 +2382,7 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st) · 12 unmodified lines | |||
| 2382 | if (msc->pb && msc->current_sample < avst->nb_index_entries) { | 2382 | if (msc->pb && msc->current_sample < avst->nb_index_entries) { |
| 2383 | AVIndexEntry *current_sample = &avst->index_entries[msc->current_sample]; | 2383 | AVIndexEntry *current_sample = &avst->index_entries[msc->current_sample]; |
| 2384 | int64_t dts = av_rescale(current_sample->timestamp, AV_TIME_BASE, msc->time_scale); | 2384 | int64_t dts = av_rescale(current_sample->timestamp, AV_TIME_BASE, msc->time_scale); |
| 2385 | dprintf(s, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts); | 2385 | av_dlog(s, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts); |
| 2386 | if (!sample || (url_is_streamed(s->pb) && current_sample->pos < sample->pos) || | 2386 | if (!sample || (url_is_streamed(s->pb) && current_sample->pos < sample->pos) || |
| 2387 | (!url_is_streamed(s->pb) && | 2387 | (!url_is_streamed(s->pb) && |
| 2388 | ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb && | 2388 | ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb && |
| @@ -2412,7 +2412,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) · 23 unmodified lines | |||
| 2412 | mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 || | 2412 | mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 || |
| 2413 | url_feof(s->pb)) | 2413 | url_feof(s->pb)) |
| 2414 | return AVERROR_EOF; | 2414 | return AVERROR_EOF; |
| 2415 | dprintf(s, "read fragments, offset 0x%llx\n", url_ftell(s->pb)); | 2415 | av_dlog(s, "read fragments, offset 0x%llx\n", url_ftell(s->pb)); |
| 2416 | goto retry; | 2416 | goto retry; |
| 2417 | } | 2417 | } |
| 2418 | sc = st->priv_data; | 2418 | sc = st->priv_data; |
| @@ -2463,7 +2463,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) · 44 unmodified lines | |||
| 2463 | goto retry; | 2463 | goto retry; |
| 2464 | pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? AV_PKT_FLAG_KEY : 0; | 2464 | pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? AV_PKT_FLAG_KEY : 0; |
| 2465 | pkt->pos = sample->pos; | 2465 | pkt->pos = sample->pos; |
| 2466 | dprintf(s, "stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n", | 2466 | av_dlog(s, "stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n", |
| 2467 | pkt->stream_index, pkt->pts, pkt->dts, pkt->pos, pkt->duration); | 2467 | pkt->stream_index, pkt->pts, pkt->dts, pkt->pos, pkt->duration); |
| 2468 | return 0; | 2468 | return 0; |
| 2469 | } | 2469 | } |
| @@ -2475,13 +2475,13 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp, · 5 unmodified lines | |||
| 2475 | int i; | 2475 | int i; |
| 2476 | 2476 | ||
| 2477 | sample = av_index_search_timestamp(st, timestamp, flags); | 2477 | sample = av_index_search_timestamp(st, timestamp, flags); |
| 2478 | dprintf(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample); | 2478 | av_dlog(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample); |
| 2479 | if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp) | 2479 | if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp) |
| 2480 | sample = 0; | 2480 | sample = 0; |
| 2481 | if (sample < 0) /* not sure what to do */ | 2481 | if (sample < 0) /* not sure what to do */ |
| 2482 | return -1; | 2482 | return -1; |
| 2483 | sc->current_sample = sample; | 2483 | sc->current_sample = sample; |
| 2484 | dprintf(s, "stream %d, found sample %d\n", st->index, sc->current_sample); | 2484 | av_dlog(s, "stream %d, found sample %d\n", st->index, sc->current_sample); |
| 2485 | /* adjust ctts index */ | 2485 | /* adjust ctts index */ |
| 2486 | if (sc->ctts_data) { | 2486 | if (sc->ctts_data) { |
| 2487 | time_sample = 0; | 2487 | time_sample = 0; |
| @@ -289,7 +289,7 @@ static MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts, unsigned int · 288 unmodified lines | |||
| 289 | MpegTSFilter *filter; | 289 | MpegTSFilter *filter; |
| 290 | MpegTSSectionFilter *sec; | 290 | MpegTSSectionFilter *sec; |
| 291 | 291 | ||
| 292 | dprintf(ts->stream, "Filter: pid=0x%x\n", pid); | 292 | av_dlog(ts->stream, "Filter: pid=0x%x\n", pid); |
| 293 | 293 | ||
| 294 | if (pid >= NB_PID_MAX || ts->pids[pid]) | 294 | if (pid >= NB_PID_MAX || ts->pids[pid]) |
| 295 | return NULL; | 295 | return NULL; |
| @@ -678,7 +678,7 @@ static int mpegts_push_data(MpegTSFilter *filter, · 382 unmodified lines | |||
| 678 | pes->header[2] == 0x01) { | 678 | pes->header[2] == 0x01) { |
| 679 | /* it must be an mpeg2 PES stream */ | 679 | /* it must be an mpeg2 PES stream */ |
| 680 | code = pes->header[3] | 0x100; | 680 | code = pes->header[3] | 0x100; |
| 681 | dprintf(pes->stream, "pid=%x pes_code=%#x\n", pes->pid, code); | 681 | av_dlog(pes->stream, "pid=%x pes_code=%#x\n", pes->pid, code); |
| 682 | 682 | ||
| 683 | if ((pes->st && pes->st->discard == AVDISCARD_ALL) || | 683 | if ((pes->st && pes->st->discard == AVDISCARD_ALL) || |
| 684 | code == 0x1be) /* padding_stream */ | 684 | code == 0x1be) /* padding_stream */ |
| @@ -714,7 +714,7 @@ static int mpegts_push_data(MpegTSFilter *filter, · 29 unmodified lines | |||
| 714 | code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */ | 714 | code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */ |
| 715 | pes->state = MPEGTS_PESHEADER; | 715 | pes->state = MPEGTS_PESHEADER; |
| 716 | if (pes->st->codec->codec_id == CODEC_ID_NONE) { | 716 | if (pes->st->codec->codec_id == CODEC_ID_NONE) { |
| 717 | dprintf(pes->stream, "pid=%x stream_type=%x probing\n", | 717 | av_dlog(pes->stream, "pid=%x stream_type=%x probing\n", |
| 718 | pes->pid, pes->stream_type); | 718 | pes->pid, pes->stream_type); |
| 719 | pes->st->codec->codec_id = CODEC_ID_PROBE; | 719 | pes->st->codec->codec_id = CODEC_ID_PROBE; |
| 720 | } | 720 | } |
| @@ -878,7 +878,7 @@ static int mp4_read_iods(AVFormatContext *s, const uint8_t *buf, unsigned size, · 157 unmodified lines | |||
| 878 | len = ff_mp4_read_descr(s, &pb, &tag); | 878 | len = ff_mp4_read_descr(s, &pb, &tag); |
| 879 | if (tag == MP4ESDescrTag) { | 879 | if (tag == MP4ESDescrTag) { |
| 880 | *es_id = get_be16(&pb); /* ES_ID */ | 880 | *es_id = get_be16(&pb); /* ES_ID */ |
| 881 | dprintf(s, "ES_ID %#x\n", *es_id); | 881 | av_dlog(s, "ES_ID %#x\n", *es_id); |
| 882 | get_byte(&pb); /* priority */ | 882 | get_byte(&pb); /* priority */ |
| 883 | len = ff_mp4_read_descr(s, &pb, &tag); | 883 | len = ff_mp4_read_descr(s, &pb, &tag); |
| 884 | if (tag == MP4DecConfigDescrTag) { | 884 | if (tag == MP4DecConfigDescrTag) { |
| @@ -912,7 +912,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type · 27 unmodified lines | |||
| 912 | if (desc_end > desc_list_end) | 912 | if (desc_end > desc_list_end) |
| 913 | return -1; | 913 | return -1; |
| 914 | 914 | ||
| 915 | dprintf(fc, "tag: 0x%02x len=%d\n", desc_tag, desc_len); | 915 | av_dlog(fc, "tag: 0x%02x len=%d\n", desc_tag, desc_len); |
| 916 | 916 | ||
| 917 | if (st->codec->codec_id == CODEC_ID_NONE && | 917 | if (st->codec->codec_id == CODEC_ID_NONE && |
| 918 | stream_type == STREAM_TYPE_PRIVATE_DATA) | 918 | stream_type == STREAM_TYPE_PRIVATE_DATA) |
| @@ -967,7 +967,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type · 48 unmodified lines | |||
| 967 | break; | 967 | break; |
| 968 | case 0x05: /* registration descriptor */ | 968 | case 0x05: /* registration descriptor */ |
| 969 | st->codec->codec_tag = bytestream_get_le32(pp); | 969 | st->codec->codec_tag = bytestream_get_le32(pp); |
| 970 | dprintf(fc, "reg_desc=%.4s\n", (char*)&st->codec->codec_tag); | 970 | av_dlog(fc, "reg_desc=%.4s\n", (char*)&st->codec->codec_tag); |
| 971 | if (st->codec->codec_id == CODEC_ID_NONE && | 971 | if (st->codec->codec_id == CODEC_ID_NONE && |
| 972 | stream_type == STREAM_TYPE_PRIVATE_DATA) | 972 | stream_type == STREAM_TYPE_PRIVATE_DATA) |
| 973 | mpegts_find_stream_type(st, st->codec->codec_tag, REGD_types); | 973 | mpegts_find_stream_type(st, st->codec->codec_tag, REGD_types); |
| @@ -994,7 +994,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 20 unmodified lines | |||
| 994 | int mp4_es_id = 0; | 994 | int mp4_es_id = 0; |
| 995 | 995 | ||
| 996 | #ifdef DEBUG | 996 | #ifdef DEBUG |
| 997 | dprintf(ts->stream, "PMT: len %i\n", section_len); | 997 | av_dlog(ts->stream, "PMT: len %i\n", section_len); |
| 998 | av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len); | 998 | av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len); |
| 999 | #endif | 999 | #endif |
| 1000 | 1000 | ||
| @@ -1003,7 +1003,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 2 unmodified lines | |||
| 1003 | if (parse_section_header(h, &p, p_end) < 0) | 1003 | if (parse_section_header(h, &p, p_end) < 0) |
| 1004 | return; | 1004 | return; |
| 1005 | 1005 | ||
| 1006 | dprintf(ts->stream, "sid=0x%x sec_num=%d/%d\n", | 1006 | av_dlog(ts->stream, "sid=0x%x sec_num=%d/%d\n", |
| 1007 | h->id, h->sec_num, h->last_sec_num); | 1007 | h->id, h->sec_num, h->last_sec_num); |
| 1008 | 1008 | ||
| 1009 | if (h->tid != PMT_TID) | 1009 | if (h->tid != PMT_TID) |
| @@ -1015,7 +1015,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 5 unmodified lines | |||
| 1015 | return; | 1015 | return; |
| 1016 | add_pid_to_pmt(ts, h->id, pcr_pid); | 1016 | add_pid_to_pmt(ts, h->id, pcr_pid); |
| 1017 | 1017 | ||
| 1018 | dprintf(ts->stream, "pcr_pid=0x%x\n", pcr_pid); | 1018 | av_dlog(ts->stream, "pcr_pid=0x%x\n", pcr_pid); |
| 1019 | 1019 | ||
| 1020 | program_info_length = get16(&p, p_end) & 0xfff; | 1020 | program_info_length = get16(&p, p_end) & 0xfff; |
| 1021 | if (program_info_length < 0) | 1021 | if (program_info_length < 0) |
| @@ -1025,7 +1025,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 3 unmodified lines | |||
| 1025 | tag = get8(&p, p_end); | 1025 | tag = get8(&p, p_end); |
| 1026 | len = get8(&p, p_end); | 1026 | len = get8(&p, p_end); |
| 1027 | 1027 | ||
| 1028 | dprintf(ts->stream, "program tag: 0x%02x len=%d\n", tag, len); | 1028 | av_dlog(ts->stream, "program tag: 0x%02x len=%d\n", tag, len); |
| 1029 | 1029 | ||
| 1030 | if(len > program_info_length - 2) | 1030 | if(len > program_info_length - 2) |
| 1031 | //something else is broken, exit the program_descriptors_loop | 1031 | //something else is broken, exit the program_descriptors_loop |
| @@ -1114,7 +1114,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 82 unmodified lines | |||
| 1114 | int sid, pmt_pid; | 1114 | int sid, pmt_pid; |
| 1115 | 1115 | ||
| 1116 | #ifdef DEBUG | 1116 | #ifdef DEBUG |
| 1117 | dprintf(ts->stream, "PAT:\n"); | 1117 | av_dlog(ts->stream, "PAT:\n"); |
| 1118 | av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len); | 1118 | av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len); |
| 1119 | #endif | 1119 | #endif |
| 1120 | p_end = section + section_len - 4; | 1120 | p_end = section + section_len - 4; |
| @@ -1133,7 +1133,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 12 unmodified lines | |||
| 1133 | if (pmt_pid < 0) | 1133 | if (pmt_pid < 0) |
| 1134 | break; | 1134 | break; |
| 1135 | 1135 | ||
| 1136 | dprintf(ts->stream, "sid=0x%x pid=0x%x\n", sid, pmt_pid); | 1136 | av_dlog(ts->stream, "sid=0x%x pid=0x%x\n", sid, pmt_pid); |
| 1137 | 1137 | ||
| 1138 | if (sid == 0x0000) { | 1138 | if (sid == 0x0000) { |
| 1139 | /* NIT info */ | 1139 | /* NIT info */ |
| @@ -1158,7 +1158,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 18 unmodified lines | |||
| 1158 | char *name, *provider_name; | 1158 | char *name, *provider_name; |
| 1159 | 1159 | ||
| 1160 | #ifdef DEBUG | 1160 | #ifdef DEBUG |
| 1161 | dprintf(ts->stream, "SDT:\n"); | 1161 | av_dlog(ts->stream, "SDT:\n"); |
| 1162 | av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len); | 1162 | av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len); |
| 1163 | #endif | 1163 | #endif |
| 1164 | 1164 | ||
| @@ -1196,7 +1196,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 31 unmodified lines | |||
| 1196 | if (desc_end > desc_list_end) | 1196 | if (desc_end > desc_list_end) |
| 1197 | break; | 1197 | break; |
| 1198 | 1198 | ||
| 1199 | dprintf(ts->stream, "tag: 0x%02x len=%d\n", | 1199 | av_dlog(ts->stream, "tag: 0x%02x len=%d\n", |
| 1200 | desc_tag, desc_len); | 1200 | desc_tag, desc_len); |
| 1201 | 1201 | ||
| 1202 | switch(desc_tag) { | 1202 | switch(desc_tag) { |
| @@ -1484,7 +1484,7 @@ static int mpegts_read_header(AVFormatContext *s, · 281 unmodified lines | |||
| 1484 | 1484 | ||
| 1485 | ts->auto_guess = 1; | 1485 | ts->auto_guess = 1; |
| 1486 | 1486 | ||
| 1487 | dprintf(ts->stream, "tuning done\n"); | 1487 | av_dlog(ts->stream, "tuning done\n"); |
| 1488 | 1488 | ||
| 1489 | s->ctx_flags |= AVFMTCTX_NOHEADER; | 1489 | s->ctx_flags |= AVFMTCTX_NOHEADER; |
| 1490 | } else { | 1490 | } else { |
| @@ -63,7 +63,7 @@ extern const MXFCodecUL ff_mxf_codec_uls[]; · 62 unmodified lines | |||
| 63 | 63 | ||
| 64 | int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt); | 64 | int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt); |
| 65 | 65 | ||
| 66 | #define PRINT_KEY(pc, s, x) dprintf(pc, "%s %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", s, \ | 66 | #define PRINT_KEY(pc, s, x) av_dlog(pc, "%s %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", s, \ |
| 67 | (x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], (x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15]) | 67 | (x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], (x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15]) |
| 68 | 68 | ||
| 69 | #endif /* AVFORMAT_MXF_H */ | 69 | #endif /* AVFORMAT_MXF_H */ |
| @@ -309,7 +309,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt) · 308 unmodified lines | |||
| 309 | if (klv_read_packet(&klv, s->pb) < 0) | 309 | if (klv_read_packet(&klv, s->pb) < 0) |
| 310 | return -1; | 310 | return -1; |
| 311 | PRINT_KEY(s, "read packet", klv.key); | 311 | PRINT_KEY(s, "read packet", klv.key); |
| 312 | dprintf(s, "size %lld offset %#llx\n", klv.length, klv.offset); | 312 | av_dlog(s, "size %lld offset %#llx\n", klv.length, klv.offset); |
| 313 | if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) { | 313 | if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) { |
| 314 | int res = mxf_decrypt_triplet(s, pkt, &klv); | 314 | int res = mxf_decrypt_triplet(s, pkt, &klv); |
| 315 | if (res < 0) { | 315 | if (res < 0) { |
| @@ -518,12 +518,12 @@ static int mxf_read_source_package(void *arg, ByteIOContext *pb, int tag, int si · 202 unmodified lines | |||
| 518 | static int mxf_read_index_table_segment(void *arg, ByteIOContext *pb, int tag, int size, UID uid) | 518 | static int mxf_read_index_table_segment(void *arg, ByteIOContext *pb, int tag, int size, UID uid) |
| 519 | { | 519 | { |
| 520 | switch(tag) { | 520 | switch(tag) { |
| 521 | case 0x3F05: dprintf(NULL, "EditUnitByteCount %d\n", get_be32(pb)); break; | 521 | case 0x3F05: av_dlog(NULL, "EditUnitByteCount %d\n", get_be32(pb)); break; |
| 522 | case 0x3F06: dprintf(NULL, "IndexSID %d\n", get_be32(pb)); break; | 522 | case 0x3F06: av_dlog(NULL, "IndexSID %d\n", get_be32(pb)); break; |
| 523 | case 0x3F07: dprintf(NULL, "BodySID %d\n", get_be32(pb)); break; | 523 | case 0x3F07: av_dlog(NULL, "BodySID %d\n", get_be32(pb)); break; |
| 524 | case 0x3F0B: dprintf(NULL, "IndexEditRate %d/%d\n", get_be32(pb), get_be32(pb)); break; | 524 | case 0x3F0B: av_dlog(NULL, "IndexEditRate %d/%d\n", get_be32(pb), get_be32(pb)); break; |
| 525 | case 0x3F0C: dprintf(NULL, "IndexStartPosition %lld\n", get_be64(pb)); break; | 525 | case 0x3F0C: av_dlog(NULL, "IndexStartPosition %lld\n", get_be64(pb)); break; |
| 526 | case 0x3F0D: dprintf(NULL, "IndexDuration %lld\n", get_be64(pb)); break; | 526 | case 0x3F0D: av_dlog(NULL, "IndexDuration %lld\n", get_be64(pb)); break; |
| 527 | } | 527 | } |
| 528 | return 0; | 528 | return 0; |
| 529 | } | 529 | } |
| @@ -536,7 +536,7 @@ static void mxf_read_pixel_layout(ByteIOContext *pb, MXFDescriptor *descriptor) · 6 unmodified lines | |||
| 536 | do { | 536 | do { |
| 537 | code = get_byte(pb); | 537 | code = get_byte(pb); |
| 538 | value = get_byte(pb); | 538 | value = get_byte(pb); |
| 539 | dprintf(NULL, "pixel layout: code %#x\n", code); | 539 | av_dlog(NULL, "pixel layout: code %#x\n", code); |
| 540 | 540 | ||
| 541 | if (ofs < 16) { | 541 | if (ofs < 16) { |
| 542 | layout[ofs++] = code; | 542 | layout[ofs++] = code; |
| @@ -666,7 +666,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 123 unmodified lines | |||
| 666 | MXFPackage *temp_package = NULL; | 666 | MXFPackage *temp_package = NULL; |
| 667 | int i, j, k; | 667 | int i, j, k; |
| 668 | 668 | ||
| 669 | dprintf(mxf->fc, "metadata sets count %d\n", mxf->metadata_sets_count); | 669 | av_dlog(mxf->fc, "metadata sets count %d\n", mxf->metadata_sets_count); |
| 670 | /* TODO: handle multiple material packages (OP3x) */ | 670 | /* TODO: handle multiple material packages (OP3x) */ |
| 671 | for (i = 0; i < mxf->packages_count; i++) { | 671 | for (i = 0; i < mxf->packages_count; i++) { |
| 672 | material_package = mxf_resolve_strong_ref(mxf, &mxf->packages_refs[i], MaterialPackage); | 672 | material_package = mxf_resolve_strong_ref(mxf, &mxf->packages_refs[i], MaterialPackage); |
| @@ -876,7 +876,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF · 203 unmodified lines | |||
| 876 | uint64_t next = url_ftell(pb) + size; | 876 | uint64_t next = url_ftell(pb) + size; |
| 877 | UID uid = {0}; | 877 | UID uid = {0}; |
| 878 | 878 | ||
| 879 | dprintf(mxf->fc, "local tag %#04x size %d\n", tag, size); | 879 | av_dlog(mxf->fc, "local tag %#04x size %d\n", tag, size); |
| 880 | if (!size) { /* ignore empty tag, needed for some files with empty UMID tag */ | 880 | if (!size) { /* ignore empty tag, needed for some files with empty UMID tag */ |
| 881 | av_log(mxf->fc, AV_LOG_ERROR, "local tag %#04x with 0 size\n", tag); | 881 | av_log(mxf->fc, AV_LOG_ERROR, "local tag %#04x with 0 size\n", tag); |
| 882 | continue; | 882 | continue; |
| @@ -887,7 +887,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF · 4 unmodified lines | |||
| 887 | int local_tag = AV_RB16(mxf->local_tags+i*18); | 887 | int local_tag = AV_RB16(mxf->local_tags+i*18); |
| 888 | if (local_tag == tag) { | 888 | if (local_tag == tag) { |
| 889 | memcpy(uid, mxf->local_tags+i*18+2, 16); | 889 | memcpy(uid, mxf->local_tags+i*18+2, 16); |
| 890 | dprintf(mxf->fc, "local tag %#04x\n", local_tag); | 890 | av_dlog(mxf->fc, "local tag %#04x\n", local_tag); |
| 891 | PRINT_KEY(mxf->fc, "uid", uid); | 891 | PRINT_KEY(mxf->fc, "uid", uid); |
| 892 | } | 892 | } |
| 893 | } | 893 | } |
| @@ -920,7 +920,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 26 unmodified lines | |||
| 920 | if (klv_read_packet(&klv, s->pb) < 0) | 920 | if (klv_read_packet(&klv, s->pb) < 0) |
| 921 | return -1; | 921 | return -1; |
| 922 | PRINT_KEY(s, "read header", klv.key); | 922 | PRINT_KEY(s, "read header", klv.key); |
| 923 | dprintf(s, "size %lld offset %#llx\n", klv.length, klv.offset); | 923 | av_dlog(s, "size %lld offset %#llx\n", klv.length, klv.offset); |
| 924 | if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) || | 924 | if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) || |
| 925 | IS_KLV_KEY(klv.key, mxf_essence_element_key)) { | 925 | IS_KLV_KEY(klv.key, mxf_essence_element_key)) { |
| 926 | /* FIXME avoid seek */ | 926 | /* FIXME avoid seek */ |
| @@ -43,7 +43,7 @@ static int read_atom(AVFormatContext *s, Atom *atom) · 42 unmodified lines | |||
| 43 | if (atom->size < 8) | 43 | if (atom->size < 8) |
| 44 | return -1; | 44 | return -1; |
| 45 | atom->tag = get_le32(s->pb); | 45 | atom->tag = get_le32(s->pb); |
| 46 | dprintf(s, "atom %d %.4s offset %#llx\n", | 46 | av_dlog(s, "atom %d %.4s offset %#llx\n", |
| 47 | atom->size, (char*)&atom->tag, atom->offset); | 47 | atom->size, (char*)&atom->tag, atom->offset); |
| 48 | return atom->size; | 48 | return atom->size; |
| 49 | } | 49 | } |
| @@ -61,16 +61,16 @@ static int r3d_read_red1(AVFormatContext *s) · 11 unmodified lines | |||
| 61 | 61 | ||
| 62 | tmp = get_byte(s->pb); // major version | 62 | tmp = get_byte(s->pb); // major version |
| 63 | tmp2 = get_byte(s->pb); // minor version | 63 | tmp2 = get_byte(s->pb); // minor version |
| 64 | dprintf(s, "version %d.%d\n", tmp, tmp2); | 64 | av_dlog(s, "version %d.%d\n", tmp, tmp2); |
| 65 | 65 | ||
| 66 | tmp = get_be16(s->pb); // unknown | 66 | tmp = get_be16(s->pb); // unknown |
| 67 | dprintf(s, "unknown1 %d\n", tmp); | 67 | av_dlog(s, "unknown1 %d\n", tmp); |
| 68 | 68 | ||
| 69 | tmp = get_be32(s->pb); | 69 | tmp = get_be32(s->pb); |
| 70 | av_set_pts_info(st, 32, 1, tmp); | 70 | av_set_pts_info(st, 32, 1, tmp); |
| 71 | 71 | ||
| 72 | tmp = get_be32(s->pb); // filenum | 72 | tmp = get_be32(s->pb); // filenum |
| 73 | dprintf(s, "filenum %d\n", tmp); | 73 | av_dlog(s, "filenum %d\n", tmp); |
| 74 | 74 | ||
| 75 | url_fskip(s->pb, 32); // unknown | 75 | url_fskip(s->pb, 32); // unknown |
| 76 | 76 | ||
| @@ -78,13 +78,13 @@ static int r3d_read_red1(AVFormatContext *s) · 1 unmodified line | |||
| 78 | st->codec->height = get_be32(s->pb); | 78 | st->codec->height = get_be32(s->pb); |
| 79 | 79 | ||
| 80 | tmp = get_be16(s->pb); // unknown | 80 | tmp = get_be16(s->pb); // unknown |
| 81 | dprintf(s, "unknown2 %d\n", tmp); | 81 | av_dlog(s, "unknown2 %d\n", tmp); |
| 82 | 82 | ||
| 83 | st->codec->time_base.den = get_be16(s->pb); | 83 | st->codec->time_base.den = get_be16(s->pb); |
| 84 | st->codec->time_base.num = get_be16(s->pb); | 84 | st->codec->time_base.num = get_be16(s->pb); |
| 85 | 85 | ||
| 86 | tmp = get_byte(s->pb); // audio channels | 86 | tmp = get_byte(s->pb); // audio channels |
| 87 | dprintf(s, "audio channels %d\n", tmp); | 87 | av_dlog(s, "audio channels %d\n", tmp); |
| 88 | if (tmp > 0) { | 88 | if (tmp > 0) { |
| 89 | AVStream *ast = av_new_stream(s, 1); | 89 | AVStream *ast = av_new_stream(s, 1); |
| 90 | if (!ast) | 90 | if (!ast) |
| @@ -99,10 +99,10 @@ static int r3d_read_red1(AVFormatContext *s) · 8 unmodified lines | |||
| 99 | filename[sizeof(filename)-1] = 0; | 99 | filename[sizeof(filename)-1] = 0; |
| 100 | av_metadata_set2(&st->metadata, "filename", filename, 0); | 100 | av_metadata_set2(&st->metadata, "filename", filename, 0); |
| 101 | 101 | ||
| 102 | dprintf(s, "filename %s\n", filename); | 102 | av_dlog(s, "filename %s\n", filename); |
| 103 | dprintf(s, "resolution %dx%d\n", st->codec->width, st->codec->height); | 103 | av_dlog(s, "resolution %dx%d\n", st->codec->width, st->codec->height); |
| 104 | dprintf(s, "timescale %d\n", st->time_base.den); | 104 | av_dlog(s, "timescale %d\n", st->time_base.den); |
| 105 | dprintf(s, "frame rate %d/%d\n", | 105 | av_dlog(s, "frame rate %d/%d\n", |
| 106 | st->codec->time_base.num, st->codec->time_base.den); | 106 | st->codec->time_base.num, st->codec->time_base.den); |
| 107 | 107 | ||
| 108 | return 0; | 108 | return 0; |
| @@ -125,13 +125,13 @@ static int r3d_read_rdvo(AVFormatContext *s, Atom *atom) · 16 unmodified lines | |||
| 125 | r3d->video_offsets_count = i; | 125 | r3d->video_offsets_count = i; |
| 126 | break; | 126 | break; |
| 127 | } | 127 | } |
| 128 | dprintf(s, "video offset %d: %#x\n", i, r3d->video_offsets[i]); | 128 | av_dlog(s, "video offset %d: %#x\n", i, r3d->video_offsets[i]); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | if (st->codec->time_base.den) | 131 | if (st->codec->time_base.den) |
| 132 | st->duration = (uint64_t)r3d->video_offsets_count* | 132 | st->duration = (uint64_t)r3d->video_offsets_count* |
| 133 | st->time_base.den*st->codec->time_base.num/st->codec->time_base.den; | 133 | st->time_base.den*st->codec->time_base.num/st->codec->time_base.den; |
| 134 | dprintf(s, "duration %lld\n", st->duration); | 134 | av_dlog(s, "duration %lld\n", st->duration); |
| 135 | 135 | ||
| 136 | return 0; | 136 | return 0; |
| 137 | } | 137 | } |
| @@ -147,10 +147,10 @@ static void r3d_read_reos(AVFormatContext *s) · 9 unmodified lines | |||
| 147 | get_be32(s->pb); // rdas offset | 147 | get_be32(s->pb); // rdas offset |
| 148 | 148 | ||
| 149 | tmp = get_be32(s->pb); | 149 | tmp = get_be32(s->pb); |
| 150 | dprintf(s, "num video chunks %d\n", tmp); | 150 | av_dlog(s, "num video chunks %d\n", tmp); |
| 151 | 151 | ||
| 152 | tmp = get_be32(s->pb); | 152 | tmp = get_be32(s->pb); |
| 153 | dprintf(s, "num audio chunks %d\n", tmp); | 153 | av_dlog(s, "num audio chunks %d\n", tmp); |
| 154 | 154 | ||
| 155 | url_fskip(s->pb, 6*4); | 155 | url_fskip(s->pb, 6*4); |
| 156 | } | 156 | } |
| @@ -176,7 +176,7 @@ static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap) · 19 unmodified lines | |||
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | s->data_offset = url_ftell(s->pb); | 178 | s->data_offset = url_ftell(s->pb); |
| 179 | dprintf(s, "data offset %#llx\n", s->data_offset); | 179 | av_dlog(s, "data offset %#llx\n", s->data_offset); |
| 180 | if (url_is_streamed(s->pb)) | 180 | if (url_is_streamed(s->pb)) |
| 181 | return 0; | 181 | return 0; |
| 182 | // find REOB/REOF/REOS to load index | 182 | // find REOB/REOF/REOS to load index |
| @@ -217,29 +217,29 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom) · 34 unmodified lines | |||
| 217 | dts = get_be32(s->pb); | 217 | dts = get_be32(s->pb); |
| 218 | 218 | ||
| 219 | tmp = get_be32(s->pb); | 219 | tmp = get_be32(s->pb); |
| 220 | dprintf(s, "frame num %d\n", tmp); | 220 | av_dlog(s, "frame num %d\n", tmp); |
| 221 | 221 | ||
| 222 | tmp = get_byte(s->pb); // major version | 222 | tmp = get_byte(s->pb); // major version |
| 223 | tmp2 = get_byte(s->pb); // minor version | 223 | tmp2 = get_byte(s->pb); // minor version |
| 224 | dprintf(s, "version %d.%d\n", tmp, tmp2); | 224 | av_dlog(s, "version %d.%d\n", tmp, tmp2); |
| 225 | 225 | ||
| 226 | tmp = get_be16(s->pb); // unknown | 226 | tmp = get_be16(s->pb); // unknown |
| 227 | dprintf(s, "unknown %d\n", tmp); | 227 | av_dlog(s, "unknown %d\n", tmp); |
| 228 | 228 | ||
| 229 | if (tmp > 4) { | 229 | if (tmp > 4) { |
| 230 | tmp = get_be16(s->pb); // unknown | 230 | tmp = get_be16(s->pb); // unknown |
| 231 | dprintf(s, "unknown %d\n", tmp); | 231 | av_dlog(s, "unknown %d\n", tmp); |
| 232 | 232 | ||
| 233 | tmp = get_be16(s->pb); // unknown | 233 | tmp = get_be16(s->pb); // unknown |
| 234 | dprintf(s, "unknown %d\n", tmp); | 234 | av_dlog(s, "unknown %d\n", tmp); |
| 235 | 235 | ||
| 236 | tmp = get_be32(s->pb); | 236 | tmp = get_be32(s->pb); |
| 237 | dprintf(s, "width %d\n", tmp); | 237 | av_dlog(s, "width %d\n", tmp); |
| 238 | tmp = get_be32(s->pb); | 238 | tmp = get_be32(s->pb); |
| 239 | dprintf(s, "height %d\n", tmp); | 239 | av_dlog(s, "height %d\n", tmp); |
| 240 | 240 | ||
| 241 | tmp = get_be32(s->pb); | 241 | tmp = get_be32(s->pb); |
| 242 | dprintf(s, "metadata len %d\n", tmp); | 242 | av_dlog(s, "metadata len %d\n", tmp); |
| 243 | } | 243 | } |
| 244 | tmp = atom->size - 8 - (url_ftell(s->pb) - pos); | 244 | tmp = atom->size - 8 - (url_ftell(s->pb) - pos); |
| 245 | if (tmp < 0) | 245 | if (tmp < 0) |
| @@ -255,7 +255,7 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom) · 9 unmodified lines | |||
| 255 | if (st->codec->time_base.den) | 255 | if (st->codec->time_base.den) |
| 256 | pkt->duration = (uint64_t)st->time_base.den* | 256 | pkt->duration = (uint64_t)st->time_base.den* |
| 257 | st->codec->time_base.num/st->codec->time_base.den; | 257 | st->codec->time_base.num/st->codec->time_base.den; |
| 258 | dprintf(s, "pkt dts %lld duration %d\n", pkt->dts, pkt->duration); | 258 | av_dlog(s, "pkt dts %lld duration %d\n", pkt->dts, pkt->duration); |
| 259 | 259 | ||
| 260 | return 0; | 260 | return 0; |
| 261 | } | 261 | } |
| @@ -275,17 +275,17 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom) · 13 unmodified lines | |||
| 275 | samples = get_be32(s->pb); | 275 | samples = get_be32(s->pb); |
| 276 | 276 | ||
| 277 | tmp = get_be32(s->pb); | 277 | tmp = get_be32(s->pb); |
| 278 | dprintf(s, "packet num %d\n", tmp); | 278 | av_dlog(s, "packet num %d\n", tmp); |
| 279 | 279 | ||
| 280 | tmp = get_be16(s->pb); // unkown | 280 | tmp = get_be16(s->pb); // unkown |
| 281 | dprintf(s, "unknown %d\n", tmp); | 281 | av_dlog(s, "unknown %d\n", tmp); |
| 282 | 282 | ||
| 283 | tmp = get_byte(s->pb); // major version | 283 | tmp = get_byte(s->pb); // major version |
| 284 | tmp2 = get_byte(s->pb); // minor version | 284 | tmp2 = get_byte(s->pb); // minor version |
| 285 | dprintf(s, "version %d.%d\n", tmp, tmp2); | 285 | av_dlog(s, "version %d.%d\n", tmp, tmp2); |
| 286 | 286 | ||
| 287 | tmp = get_be32(s->pb); // unknown | 287 | tmp = get_be32(s->pb); // unknown |
| 288 | dprintf(s, "unknown %d\n", tmp); | 288 | av_dlog(s, "unknown %d\n", tmp); |
| 289 | 289 | ||
| 290 | size = atom->size - 8 - (url_ftell(s->pb) - pos); | 290 | size = atom->size - 8 - (url_ftell(s->pb) - pos); |
| 291 | if (size < 0) | 291 | if (size < 0) |
| @@ -299,7 +299,7 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom) · 7 unmodified lines | |||
| 299 | pkt->stream_index = 1; | 299 | pkt->stream_index = 1; |
| 300 | pkt->dts = dts; | 300 | pkt->dts = dts; |
| 301 | pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate); | 301 | pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate); |
| 302 | dprintf(s, "pkt dts %lld duration %d samples %d sample rate %d\n", | 302 | av_dlog(s, "pkt dts %lld duration %d samples %d sample rate %d\n", |
| 303 | pkt->dts, pkt->duration, samples, st->codec->sample_rate); | 303 | pkt->dts, pkt->duration, samples, st->codec->sample_rate); |
| 304 | 304 | ||
| 305 | return 0; | 305 | return 0; |
| @@ -356,7 +356,7 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i · 50 unmodified lines | |||
| 356 | 356 | ||
| 357 | frame_num = sample_time*st->codec->time_base.den/ | 357 | frame_num = sample_time*st->codec->time_base.den/ |
| 358 | ((int64_t)st->codec->time_base.num*st->time_base.den); | 358 | ((int64_t)st->codec->time_base.num*st->time_base.den); |
| 359 | dprintf(s, "seek frame num %d timestamp %lld\n", frame_num, sample_time); | 359 | av_dlog(s, "seek frame num %d timestamp %lld\n", frame_num, sample_time); |
| 360 | 360 | ||
| 361 | if (frame_num < r3d->video_offsets_count) { | 361 | if (frame_num < r3d->video_offsets_count) { |
| 362 | url_fseek(s->pb, r3d->video_offsets_count, SEEK_SET); | 362 | url_fseek(s->pb, r3d->video_offsets_count, SEEK_SET); |
| @@ -324,9 +324,9 @@ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count) · 323 unmodified lines | |||
| 324 | len = url_close_dyn_buf(pb, &buf); | 324 | len = url_close_dyn_buf(pb, &buf); |
| 325 | if ((len > 0) && buf) { | 325 | if ((len > 0) && buf) { |
| 326 | int result; | 326 | int result; |
| 327 | dprintf(s->ic, "sending %d bytes of RR\n", len); | 327 | av_dlog(s->ic, "sending %d bytes of RR\n", len); |
| 328 | result= url_write(s->rtp_ctx, buf, len); | 328 | result= url_write(s->rtp_ctx, buf, len); |
| 329 | dprintf(s->ic, "result from url_write: %d\n", result); | 329 | av_dlog(s->ic, "result from url_write: %d\n", result); |
| 330 | av_free(buf); | 330 | av_free(buf); |
| 331 | } | 331 | } |
| 332 | return 0; | 332 | return 0; |
| @@ -192,7 +192,7 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time) · 191 unmodified lines | |||
| 192 | RTPMuxContext *s = s1->priv_data; | 192 | RTPMuxContext *s = s1->priv_data; |
| 193 | uint32_t rtp_ts; | 193 | uint32_t rtp_ts; |
| 194 | 194 | ||
| 195 | dprintf(s1, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp); | 195 | av_dlog(s1, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp); |
| 196 | 196 | ||
| 197 | s->last_rtcp_ntp_time = ntp_time; | 197 | s->last_rtcp_ntp_time = ntp_time; |
| 198 | rtp_ts = av_rescale_q(ntp_time - s->first_rtcp_ntp_time, (AVRational){1, 1000000}, | 198 | rtp_ts = av_rescale_q(ntp_time - s->first_rtcp_ntp_time, (AVRational){1, 1000000}, |
| @@ -215,7 +215,7 @@ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m) · 16 unmodified lines | |||
| 215 | { | 215 | { |
| 216 | RTPMuxContext *s = s1->priv_data; | 216 | RTPMuxContext *s = s1->priv_data; |
| 217 | 217 | ||
| 218 | dprintf(s1, "rtp_send_data size=%d\n", len); | 218 | av_dlog(s1, "rtp_send_data size=%d\n", len); |
| 219 | 219 | ||
| 220 | /* build the RTP header */ | 220 | /* build the RTP header */ |
| 221 | put_byte(s1->pb, (RTP_VERSION << 6)); | 221 | put_byte(s1->pb, (RTP_VERSION << 6)); |
| @@ -364,7 +364,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) · 142 unmodified lines | |||
| 364 | int rtcp_bytes; | 364 | int rtcp_bytes; |
| 365 | int size= pkt->size; | 365 | int size= pkt->size; |
| 366 | 366 | ||
| 367 | dprintf(s1, "%d: write len=%d\n", pkt->stream_index, size); | 367 | av_dlog(s1, "%d: write len=%d\n", pkt->stream_index, size); |
| 368 | 368 | ||
| 369 | rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) / | 369 | rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) / |
| 370 | RTCP_TX_RATIO_DEN; | 370 | RTCP_TX_RATIO_DEN; |
| @@ -247,7 +247,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, · 246 unmodified lines | |||
| 247 | struct sockaddr_storage sdp_ip; | 247 | struct sockaddr_storage sdp_ip; |
| 248 | int ttl; | 248 | int ttl; |
| 249 | 249 | ||
| 250 | dprintf(s, "sdp: %c='%s'\n", letter, buf); | 250 | av_dlog(s, "sdp: %c='%s'\n", letter, buf); |
| 251 | 251 | ||
| 252 | p = buf; | 252 | p = buf; |
| 253 | if (s1->skip_media && letter != 'm') | 253 | if (s1->skip_media && letter != 'm') |
| @@ -826,7 +826,7 @@ void ff_rtsp_skip_packet(AVFormatContext *s) · 572 unmodified lines | |||
| 826 | return; | 826 | return; |
| 827 | len = AV_RB16(buf + 1); | 827 | len = AV_RB16(buf + 1); |
| 828 | 828 | ||
| 829 | dprintf(s, "skipping RTP packet len=%d\n", len); | 829 | av_dlog(s, "skipping RTP packet len=%d\n", len); |
| 830 | 830 | ||
| 831 | /* skip payload */ | 831 | /* skip payload */ |
| 832 | while (len > 0) { | 832 | while (len > 0) { |
| @@ -860,7 +860,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, · 27 unmodified lines | |||
| 860 | for (;;) { | 860 | for (;;) { |
| 861 | ret = url_read_complete(rt->rtsp_hd, &ch, 1); | 861 | ret = url_read_complete(rt->rtsp_hd, &ch, 1); |
| 862 | #ifdef DEBUG_RTP_TCP | 862 | #ifdef DEBUG_RTP_TCP |
| 863 | dprintf(s, "ret=%d c=%02x [%c]\n", ret, ch, ch); | 863 | av_dlog(s, "ret=%d c=%02x [%c]\n", ret, ch, ch); |
| 864 | #endif | 864 | #endif |
| 865 | if (ret != 1) | 865 | if (ret != 1) |
| 866 | return AVERROR_EOF; | 866 | return AVERROR_EOF; |
| @@ -879,7 +879,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, · 12 unmodified lines | |||
| 879 | } | 879 | } |
| 880 | *q = '\0'; | 880 | *q = '\0'; |
| 881 | 881 | ||
| 882 | dprintf(s, "line='%s'\n", buf); | 882 | av_dlog(s, "line='%s'\n", buf); |
| 883 | 883 | ||
| 884 | /* test if last line */ | 884 | /* test if last line */ |
| 885 | if (buf[0] == '\0') | 885 | if (buf[0] == '\0') |
| @@ -984,7 +984,7 @@ static int ff_rtsp_send_cmd_with_content_async(AVFormatContext *s, · 98 unmodified lines | |||
| 984 | out_buf = base64buf; | 984 | out_buf = base64buf; |
| 985 | } | 985 | } |
| 986 | 986 | ||
| 987 | dprintf(s, "Sending:\n%s--\n", buf); | 987 | av_dlog(s, "Sending:\n%s--\n", buf); |
| 988 | 988 | ||
| 989 | url_write(rt->rtsp_hd_out, out_buf, strlen(out_buf)); | 989 | url_write(rt->rtsp_hd_out, out_buf, strlen(out_buf)); |
| 990 | if (send_content_length > 0 && send_content) { | 990 | if (send_content_length > 0 && send_content) { |
| @@ -184,7 +184,7 @@ int ff_rtsp_tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, · 183 unmodified lines | |||
| 184 | RTSPStream *rtsp_st; | 184 | RTSPStream *rtsp_st; |
| 185 | 185 | ||
| 186 | #ifdef DEBUG_RTP_TCP | 186 | #ifdef DEBUG_RTP_TCP |
| 187 | dprintf(s, "tcp_read_packet:\n"); | 187 | av_dlog(s, "tcp_read_packet:\n"); |
| 188 | #endif | 188 | #endif |
| 189 | redo: | 189 | redo: |
| 190 | for (;;) { | 190 | for (;;) { |
| @@ -205,7 +205,7 @@ redo: · 14 unmodified lines | |||
| 205 | id = buf[0]; | 205 | id = buf[0]; |
| 206 | len = AV_RB16(buf + 1); | 206 | len = AV_RB16(buf + 1); |
| 207 | #ifdef DEBUG_RTP_TCP | 207 | #ifdef DEBUG_RTP_TCP |
| 208 | dprintf(s, "id=%d len=%d\n", id, len); | 208 | av_dlog(s, "id=%d len=%d\n", id, len); |
| 209 | #endif | 209 | #endif |
| 210 | if (len > buf_size || len < 12) | 210 | if (len > buf_size || len < 12) |
| 211 | goto redo; | 211 | goto redo; |
| @@ -114,13 +114,6 @@ · 113 unmodified lines | |||
| 114 | 114 | ||
| 115 | /* debug stuff */ | 115 | /* debug stuff */ |
| 116 | 116 | ||
| 117 | /* dprintf macros */ | ||
| 118 | #ifdef DEBUG | ||
| 119 | # define dprintf(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__) | ||
| 120 | #else | ||
| 121 | # define dprintf(pctx, ...) | ||
| 122 | #endif | ||
| 123 | |||
| 124 | #define av_abort() do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0) | 117 | #define av_abort() do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0) |
| 125 | 118 | ||
| 126 | /* math */ | 119 | /* math */ |
| @@ -135,6 +135,17 @@ void av_log_set_callback(void (*)(void*, int, const char*, va_list)); · 134 unmodified lines | |||
| 135 | void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl); | 135 | void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl); |
| 136 | const char* av_default_item_name(void* ctx); | 136 | const char* av_default_item_name(void* ctx); |
| 137 | 137 | ||
| 138 | /** | ||
| 139 | * av_dlog macros | ||
| 140 | * Useful to print debug messages that shouldn't get compiled in normally. | ||
| 141 | */ | ||
| 142 | |||
| 143 | #ifdef DEBUG | ||
| 144 | # define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__) | ||
| 145 | #else | ||
| 146 | # define av_dlog(pctx, ...) | ||
| 147 | #endif | ||
| 148 | |||
| 138 | /** | 149 | /** |
| 139 | * Skip repeated messages, this requires the user app to use av_log() instead of | 150 | * Skip repeated messages, this requires the user app to use av_log() instead of |
| 140 | * (f)printf as the 2 would otherwise interfere and lead to | 151 | * (f)printf as the 2 would otherwise interfere and lead to |