History

Replace dprintf with av_dlog

dprintf clashes with POSIX.1-2008

Luca Barbato committed 15 years ago

Commit dfd2a001 parent 243f82447 files · +312 −308Browse files

Showing the changes to libavformat (17 of 47 files). Show all

Unified · Split

17 files
  1. libavformat/asfdec.c +7 −7
  2. libavformat/avidec.c +2 −2
  3. libavformat/ffmdec.c +1 −1
  4. libavformat/flvdec.c +1 −1
  5. libavformat/http.c +3 −3
  6. libavformat/isom.c +4 −4
  7. libavformat/mmsh.c +6 −6
  8. libavformat/mmst.c +10 −10
  9. libavformat/mov.c +36 −36
  10. libavformat/mpegts.c +15 −15
  11. libavformat/mxf.h +1 −1
  12. libavformat/mxfdec.c +12 −12
  13. libavformat/r3d.c +30 −30
  14. libavformat/rtpdec.c +2 −2
  15. libavformat/rtpenc.c +3 −3
  16. libavformat/rtsp.c +5 −5
  17. libavformat/rtspdec.c +2 −2
libavformat/asfdec.c+7−7
@@ -57,7 +57,7 @@ int ff_guidcmp(const void *g1, const void *g2) · 56 unmodified lines
57#ifdef DEBUG57#ifdef DEBUG
58#define PRINT_IF_GUID(g,cmp) \58#define PRINT_IF_GUID(g,cmp) \
59if (!ff_guidcmp(g, &cmp)) \59if (!ff_guidcmp(g, &cmp)) \
60 dprintf(NULL, "(GUID: %s) ", #cmp)60 av_dlog(NULL, "(GUID: %s) ", #cmp)
61 61
62static void print_guid(const ff_asf_guid *g)62static 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 else89 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_GUID95#undef PRINT_IF_GUID
96#else96#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
libavformat/avidec.c+2−2
@@ -85,7 +85,7 @@ static int avi_load_index(AVFormatContext *s); · 84 unmodified lines
85static int guess_ni_flag(AVFormatContext *s);85static 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'))
libavformat/ffmdec.c+1−1
@@ -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)
libavformat/flvdec.c+1−1
@@ -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 else425 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
libavformat/http.c+3−3
@@ -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 we230 /* 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;
libavformat/isom.c+4−4
@@ -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 else397 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);
libavformat/mmsh.c+6−6
@@ -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;
309fail:309fail:
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
libavformat/mmst.c+10−10
@@ -206,11 +206,11 @@ static int send_media_file_request(MMSTContext *mmst) · 205 unmodified lines
206static void handle_packet_stream_changing_type(MMSTContext *mmst)206static 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
216static int send_keepalive_packet(MMSTContext *mmst)216static 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 < 0275 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;
576fail:576fail:
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 }
libavformat/mov.c+36−36
@@ -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 + flags351 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
583static int mov_read_moof(MOVContext *c, ByteIOContext *pb, MOVAtom atom)583static 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); // fake698 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;
libavformat/mpegts.c+15−15
@@ -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 DEBUG996#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#endif999#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_loop1031 //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 DEBUG1116#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#endif1119#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 DEBUG1160#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#endif1163#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 {
libavformat/mxf.h+1−1
@@ -63,7 +63,7 @@ extern const MXFCodecUL ff_mxf_codec_uls[]; · 62 unmodified lines
63 63
64int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt);64int 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 */
libavformat/mxfdec.c+12−12
@@ -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
518static int mxf_read_index_table_segment(void *arg, ByteIOContext *pb, int tag, int size, UID uid)518static 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 */
libavformat/r3d.c+30−30
@@ -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 version62 tmp = get_byte(s->pb); // major version
63 tmp2 = get_byte(s->pb); // minor version63 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); // unknown66 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); // filenum72 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); // unknown75 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); // unknown80 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 channels86 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 offset147 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 index182 // 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 version222 tmp = get_byte(s->pb); // major version
223 tmp2 = get_byte(s->pb); // minor version223 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); // unknown226 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); // unknown230 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); // unknown233 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); // unkown280 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 version283 tmp = get_byte(s->pb); // major version
284 tmp2 = get_byte(s->pb); // minor version284 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); // unknown287 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);
libavformat/rtpdec.c+2−2
@@ -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;
libavformat/rtpenc.c+3−3
@@ -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;
libavformat/rtsp.c+5−5
@@ -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_TCP862#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#endif864#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) {
libavformat/rtspdec.c+2−2
@@ -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_TCP186#ifdef DEBUG_RTP_TCP
187 dprintf(s, "tcp_read_packet:\n");187 av_dlog(s, "tcp_read_packet:\n");
188#endif188#endif
189redo:189redo:
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_TCP207#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#endif209#endif
210 if (len > buf_size || len < 12)210 if (len > buf_size || len < 12)
211 goto redo;211 goto redo;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t