aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2011-01-29 17:46:18 +0100
committerLuca Barbato <lu_zero@gentoo.org>2011-01-29 23:55:37 +0100
commitdfd2a005eb29e4b9f2fdb97036eb7d5c38ae4bd4 (patch)
tree21b297b37ea12443540479d44fadbc1a54f32f00 /libavformat
parent243f8241dbf4a451e1197661ccd387c519ae3349 (diff)
downloadffmpeg-dfd2a005eb29e4b9f2fdb97036eb7d5c38ae4bd4.tar.gz
Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/asfdec.c14
-rw-r--r--libavformat/avidec.c4
-rw-r--r--libavformat/ffmdec.c2
-rw-r--r--libavformat/flvdec.c2
-rw-r--r--libavformat/http.c6
-rw-r--r--libavformat/isom.c8
-rw-r--r--libavformat/mmsh.c12
-rw-r--r--libavformat/mmst.c20
-rw-r--r--libavformat/mov.c72
-rw-r--r--libavformat/mpegts.c30
-rw-r--r--libavformat/mxf.h2
-rw-r--r--libavformat/mxfdec.c24
-rw-r--r--libavformat/r3d.c60
-rw-r--r--libavformat/rtpdec.c4
-rw-r--r--libavformat/rtpenc.c6
-rw-r--r--libavformat/rtsp.c10
-rw-r--r--libavformat/rtspdec.c4
17 files changed, 140 insertions, 140 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index eafb71d956..35e892c439 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -57,7 +57,7 @@ int ff_guidcmp(const void *g1, const void *g2)
#ifdef DEBUG
#define PRINT_IF_GUID(g,cmp) \
if (!ff_guidcmp(g, &cmp)) \
- dprintf(NULL, "(GUID: %s) ", #cmp)
+ av_dlog(NULL, "(GUID: %s) ", #cmp)
static void print_guid(const ff_asf_guid *g)
{
@@ -87,10 +87,10 @@ static void print_guid(const ff_asf_guid *g)
else PRINT_IF_GUID(g, stream_bitrate_guid);
else PRINT_IF_GUID(g, ff_asf_language_guid);
else
- dprintf(NULL, "(GUID: unknown) ");
+ av_dlog(NULL, "(GUID: unknown) ");
for(i=0;i<16;i++)
- dprintf(NULL, " 0x%02x,", (*g)[i]);
- dprintf(NULL, "}\n");
+ av_dlog(NULL, " 0x%02x,", (*g)[i]);
+ av_dlog(NULL, "}\n");
}
#undef PRINT_IF_GUID
#else
@@ -177,9 +177,9 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
int ret;
ff_get_guid(pb, &g);
gsize = get_le64(pb);
- dprintf(s, "%08"PRIx64": ", gpos);
+ av_dlog(s, "%08"PRIx64": ", gpos);
print_guid(&g);
- dprintf(s, " size=0x%"PRIx64"\n", gsize);
+ av_dlog(s, " size=0x%"PRIx64"\n", gsize);
if (!ff_guidcmp(&g, &ff_asf_data_header)) {
asf->data_object_offset = url_ftell(pb);
// 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)
if (packet_length < asf->hdr.min_pktsize)
padsize += asf->hdr.min_pktsize - packet_length;
asf->packet_padsize = padsize;
- dprintf(s, "packet: size=%d padsize=%d left=%d\n", s->packet_size, asf->packet_padsize, asf->packet_size_left);
+ av_dlog(s, "packet: size=%d padsize=%d left=%d\n", s->packet_size, asf->packet_padsize, asf->packet_size_left);
return 0;
}
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 312bf76b76..d8d4726ae9 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -85,7 +85,7 @@ static int avi_load_index(AVFormatContext *s);
static int guess_ni_flag(AVFormatContext *s);
#define print_tag(str, tag, size) \
- dprintf(NULL, "%s: tag=%c%c%c%c size=0x%x\n", \
+ av_dlog(NULL, "%s: tag=%c%c%c%c size=0x%x\n", \
str, tag & 0xff, \
(tag >> 8) & 0xff, \
(tag >> 16) & 0xff, \
@@ -380,7 +380,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
avi->movi_list = url_ftell(pb) - 4;
if(size) avi->movi_end = avi->movi_list + size + (size & 1);
else avi->movi_end = url_fsize(pb);
- dprintf(NULL, "movi end=%"PRIx64"\n", avi->movi_end);
+ av_dlog(NULL, "movi end=%"PRIx64"\n", avi->movi_end);
goto end_of_header;
}
else if (tag1 == MKTAG('I', 'N', 'F', 'O'))
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index b2fc0cd8b1..91da6504b6 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -408,7 +408,7 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt)
if ((ret = ffm_is_avail_data(s, FRAME_HEADER_SIZE+4)) < 0)
return ret;
- dprintf(s, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n",
+ av_dlog(s, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n",
url_ftell(s->pb), s->pb->pos, ffm->write_index, ffm->file_size);
if (ffm_read_data(s, ffm->header, FRAME_HEADER_SIZE, 1) !=
FRAME_HEADER_SIZE)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index e442caca64..e6081d9840 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -424,7 +424,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
st->codec->sample_rate = cfg.ext_sample_rate;
else
st->codec->sample_rate = cfg.sample_rate;
- dprintf(s, "mp4a config channels %d sample rate %d\n",
+ av_dlog(s, "mp4a config channels %d sample rate %d\n",
st->codec->channels, st->codec->sample_rate);
}
diff --git a/libavformat/http.c b/libavformat/http.c
index 3d63a6d00c..b3499d143a 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -225,7 +225,7 @@ static int process_line(URLContext *h, char *line, int line_count,
p++;
s->http_code = strtol(p, &end, 10);
- dprintf(NULL, "http_code=%d\n", s->http_code);
+ av_dlog(NULL, "http_code=%d\n", s->http_code);
/* error codes are 4xx and 5xx, but regard 401 as a success, so we
* 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,
if (http_get_line(s, line, sizeof(line)) < 0)
return AVERROR(EIO);
- dprintf(NULL, "header='%s'\n", line);
+ av_dlog(NULL, "header='%s'\n", line);
err = process_line(h, line, s->line_count, new_location);
if (err < 0)
@@ -387,7 +387,7 @@ static int http_read(URLContext *h, uint8_t *buf, int size)
s->chunksize = strtoll(line, NULL, 16);
- dprintf(NULL, "Chunked encoding data size: %"PRId64"'\n", s->chunksize);
+ av_dlog(NULL, "Chunked encoding data size: %"PRId64"'\n", s->chunksize);
if (!s->chunksize)
return 0;
diff --git a/libavformat/isom.c b/libavformat/isom.c
index bf0140103a..23ef82a1ce 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -350,7 +350,7 @@ int ff_mp4_read_descr(AVFormatContext *fc, ByteIOContext *pb, int *tag)
int len;
*tag = get_byte(pb);
len = ff_mp4_read_descr_len(pb);
- dprintf(fc, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);
+ av_dlog(fc, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);
return len;
}
@@ -373,10 +373,10 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, ByteIOContex
get_be32(pb); /* avg bitrate */
st->codec->codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);
- dprintf(fc, "esds object type id 0x%02x\n", object_type_id);
+ av_dlog(fc, "esds object type id 0x%02x\n", object_type_id);
len = ff_mp4_read_descr(fc, pb, &tag);
if (tag == MP4DecSpecificDescrTag) {
- dprintf(fc, "Specific MPEG4 header len=%d\n", len);
+ av_dlog(fc, "Specific MPEG4 header len=%d\n", len);
if((uint64_t)len > (1<<30))
return -1;
av_free(st->codec->extradata);
@@ -396,7 +396,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, ByteIOContex
st->codec->sample_rate = cfg.ext_sample_rate;
else
st->codec->sample_rate = cfg.sample_rate;
- dprintf(fc, "mp4a config channels %d obj %d ext obj %d "
+ av_dlog(fc, "mp4a config channels %d obj %d ext obj %d "
"sample rate %d ext sample rate %d\n", st->codec->channels,
cfg.object_type, cfg.ext_object_type,
cfg.sample_rate, cfg.ext_sample_rate);
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index b0acd1020f..257b973225 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -122,7 +122,7 @@ static int read_data_packet(MMSHContext *mmsh, const int len)
return AVERROR(EIO);
}
res = url_read_complete(mms->mms_hd, mms->in_buffer, len);
- dprintf(NULL, "Data packet len = %d\n", len);
+ av_dlog(NULL, "Data packet len = %d\n", len);
if (res != len) {
av_log(NULL, AV_LOG_ERROR, "Read data packet failed!\n");
return AVERROR(EIO);
@@ -156,7 +156,7 @@ static int get_http_header_data(MMSHContext *mmsh)
if (mms->asf_header) {
if (len != mms->asf_header_size) {
mms->asf_header_size = len;
- dprintf(NULL, "Header len changed from %d to %d\n",
+ av_dlog(NULL, "Header len changed from %d to %d\n",
mms->asf_header_size, len);
av_freep(&mms->asf_header);
}
@@ -201,7 +201,7 @@ static int get_http_header_data(MMSHContext *mmsh)
av_log(NULL, AV_LOG_ERROR, "Read other chunk type data failed!\n");
return AVERROR(EIO);
} else {
- dprintf(NULL, "Skip chunk type %d \n", chunk_type);
+ av_dlog(NULL, "Skip chunk type %d \n", chunk_type);
continue;
}
}
@@ -290,7 +290,7 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
av_log(NULL, AV_LOG_ERROR, "Build play request failed!\n");
goto fail;
}
- dprintf(NULL, "out_buffer is %s", headers);
+ av_dlog(NULL, "out_buffer is %s", headers);
ff_http_set_headers(mms->mms_hd, headers);
err = url_connect(mms->mms_hd);
@@ -304,12 +304,12 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
goto fail;
}
- dprintf(NULL, "Connection successfully open\n");
+ av_dlog(NULL, "Connection successfully open\n");
return 0;
fail:
av_freep(&stream_selection);
mmsh_close(h);
- dprintf(NULL, "Connection failed with error %d\n", err);
+ av_dlog(NULL, "Connection failed with error %d\n", err);
return err;
}
diff --git a/libavformat/mmst.c b/libavformat/mmst.c
index d3417d1659..8464d3b3d1 100644
--- a/libavformat/mmst.c
+++ b/libavformat/mmst.c
@@ -206,11 +206,11 @@ static int send_media_file_request(MMSTContext *mmst)
static void handle_packet_stream_changing_type(MMSTContext *mmst)
{
MMSContext *mms = &mmst->mms;
- dprintf(NULL, "Stream changing!\n");
+ av_dlog(NULL, "Stream changing!\n");
// 40 is the packet header size, 7 is the prefix size.
mmst->header_packet_id= AV_RL32(mms->in_buffer + 40 + 7);
- dprintf(NULL, "Changed header prefix to 0x%x", mmst->header_packet_id);
+ av_dlog(NULL, "Changed header prefix to 0x%x", mmst->header_packet_id);
}
static int send_keepalive_packet(MMSTContext *mmst)
@@ -270,7 +270,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst)
}
length_remaining= AV_RL32(mms->in_buffer+8) + 4;
- dprintf(NULL, "Length remaining is %d\n", length_remaining);
+ av_dlog(NULL, "Length remaining is %d\n", length_remaining);
// read the rest of the packet.
if (length_remaining < 0
|| length_remaining > sizeof(mms->in_buffer) - 12) {
@@ -350,7 +350,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst)
} else if(packet_id_type == mmst->packet_id) {
packet_type = SC_PKT_ASF_MEDIA;
} else {
- dprintf(NULL, "packet id type %d is old.", packet_id_type);
+ av_dlog(NULL, "packet id type %d is old.", packet_id_type);
continue;
}
}
@@ -376,7 +376,7 @@ static int mms_safe_send_recv(MMSTContext *mmst,
if(send_fun) {
int ret = send_fun(mmst);
if (ret < 0) {
- dprintf(NULL, "Send Packet error before expecting recv packet %d\n", expect_type);
+ av_dlog(NULL, "Send Packet error before expecting recv packet %d\n", expect_type);
return ret;
}
}
@@ -554,7 +554,7 @@ static int mms_open(URLContext *h, const char *uri, int flags)
}
err = ff_mms_asf_header_parser(mms);
if (err) {
- dprintf(NULL, "asf header parsed failed!\n");
+ av_dlog(NULL, "asf header parsed failed!\n");
goto fail;
}
mms->header_parsed = 1;
@@ -571,11 +571,11 @@ static int mms_open(URLContext *h, const char *uri, int flags)
if (err) {
goto fail;
}
- dprintf(NULL, "Leaving open (success)\n");
+ av_dlog(NULL, "Leaving open (success)\n");
return 0;
fail:
mms_close(h);
- dprintf(NULL, "Leaving open (failure: %d)\n", err);
+ av_dlog(NULL, "Leaving open (failure: %d)\n", err);
return err;
}
@@ -608,12 +608,12 @@ static int mms_read(URLContext *h, uint8_t *buf, int size)
// copy the data to the packet buffer.
result = ff_mms_read_data(mms, buf, size);
if (result == 0) {
- dprintf(NULL, "read asf media paket size is zero!\n");
+ av_dlog(NULL, "read asf media paket size is zero!\n");
break;
}
}
} else {
- dprintf(NULL, "read packet error!\n");
+ av_dlog(NULL, "read packet error!\n");
break;
}
}
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 7ad920fcb1..a48000fe52 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -266,7 +266,7 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
a.size = get_be32(pb);
a.type = get_le32(pb);
}
- dprintf(c->fc, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n",
+ av_dlog(c->fc, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n",
a.type, (char*)&a.type, (char*)&atom.type, a.size, total_size, atom.size);
total_size += 8;
if (a.size == 1) { /* 64 bit extended size */
@@ -349,7 +349,7 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
dref->type = get_le32(pb);
get_be32(pb); // version + flags
- dprintf(c->fc, "type %.4s size %d\n", (char*)&dref->type, size);
+ av_dlog(c->fc, "type %.4s size %d\n", (char*)&dref->type, size);
if (dref->type == MKTAG('a','l','i','s') && size > 150) {
/* macintosh alias record */
@@ -441,8 +441,8 @@ static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
ctype = get_le32(pb);
type = get_le32(pb); /* component subtype */
- dprintf(c->fc, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype);
- dprintf(c->fc, "stype= %.4s\n", (char*)&type);
+ av_dlog(c->fc, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype);
+ av_dlog(c->fc, "stype= %.4s\n", (char*)&type);
if (type == MKTAG('v','i','d','e'))
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
@@ -583,7 +583,7 @@ static int mov_read_moov(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
static int mov_read_moof(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
c->fragment.moof_offset = url_ftell(pb) - 8;
- dprintf(c->fc, "moof offset %llx\n", c->fragment.moof_offset);
+ av_dlog(c->fc, "moof offset %llx\n", c->fragment.moof_offset);
return mov_read_default(c, pb, atom);
}
@@ -655,7 +655,7 @@ static int mov_read_mvhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
mov_metadata_creation_time(&c->fc->metadata, creation_time);
c->time_scale = get_be32(pb); /* time scale */
- dprintf(c->fc, "time scale = %i\n", c->time_scale);
+ av_dlog(c->fc, "time scale = %i\n", c->time_scale);
c->duration = (version == 1) ? get_be64(pb) : get_be32(pb); /* duration */
get_be32(pb); /* preferred scale */
@@ -697,7 +697,7 @@ static int mov_read_smi(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
st->codec->extradata_size = 0x5a + atom.size;
memcpy(st->codec->extradata, "SVQ3", 4); // fake
get_buffer(pb, st->codec->extradata + 0x5a, atom.size);
- dprintf(c->fc, "Reading SMI %"PRId64" %s\n", atom.size, st->codec->extradata + 0x5a);
+ av_dlog(c->fc, "Reading SMI %"PRId64" %s\n", atom.size, st->codec->extradata + 0x5a);
return 0;
}
@@ -711,7 +711,7 @@ static int mov_read_enda(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
st = c->fc->streams[c->fc->nb_streams-1];
little_endian = get_be16(pb);
- dprintf(c->fc, "enda %d\n", little_endian);
+ av_dlog(c->fc, "enda %d\n", little_endian);
if (little_endian == 1) {
switch (st->codec->codec_id) {
case CODEC_ID_PCM_S24BE:
@@ -974,7 +974,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, ByteIOContext *pb, int entries)
}
}
- dprintf(c->fc, "size=%d 4CC= %c%c%c%c codec_type=%d\n", size,
+ av_dlog(c->fc, "size=%d 4CC= %c%c%c%c codec_type=%d\n", size,
(format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,
(format >> 24) & 0xff, st->codec->codec_type);
@@ -1009,7 +1009,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, ByteIOContext *pb, int entries)
st->codec->bits_per_coded_sample = get_be16(pb); /* depth */
st->codec->color_table_id = get_be16(pb); /* colortable id */
- dprintf(c->fc, "depth %d, ctab id %d\n",
+ av_dlog(c->fc, "depth %d, ctab id %d\n",
st->codec->bits_per_coded_sample, st->codec->color_table_id);
/* figure out the palette situation */
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)
get_be32(pb); /* vendor */
st->codec->channels = get_be16(pb); /* channel count */
- dprintf(c->fc, "audio channels %d\n", st->codec->channels);
+ av_dlog(c->fc, "audio channels %d\n", st->codec->channels);
st->codec->bits_per_coded_sample = get_be16(pb); /* sample size */
sc->audio_cid = get_be16(pb);
@@ -1100,7 +1100,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, ByteIOContext *pb, int entries)
st->codec->sample_rate = ((get_be32(pb) >> 16));
//Read QT version 1 fields. In version 0 these do not exist.
- dprintf(c->fc, "version =%d, isom =%d\n",version,c->isom);
+ av_dlog(c->fc, "version =%d, isom =%d\n",version,c->isom);
if(!c->isom) {
if(version==1) {
sc->samples_per_frame = get_be32(pb);
@@ -1271,7 +1271,7 @@ static int mov_read_stsc(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
entries = get_be32(pb);
- dprintf(c->fc, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);
+ av_dlog(c->fc, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);
if(entries >= UINT_MAX / sizeof(*sc->stsc_data))
return -1;
@@ -1311,7 +1311,7 @@ static int mov_read_stps(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
for (i = 0; i < entries; i++) {
sc->stps_data[i] = get_be32(pb);
- //dprintf(c->fc, "stps %d\n", sc->stps_data[i]);
+ //av_dlog(c->fc, "stps %d\n", sc->stps_data[i]);
}
return 0;
@@ -1333,7 +1333,7 @@ static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
entries = get_be32(pb);
- dprintf(c->fc, "keyframe_count = %d\n", entries);
+ av_dlog(c->fc, "keyframe_count = %d\n", entries);
if(entries >= UINT_MAX / sizeof(int))
return -1;
@@ -1344,7 +1344,7 @@ static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
for(i=0; i<entries; i++) {
sc->keyframes[i] = get_be32(pb);
- //dprintf(c->fc, "keyframes[]=%d\n", sc->keyframes[i]);
+ //av_dlog(c->fc, "keyframes[]=%d\n", sc->keyframes[i]);
}
return 0;
}
@@ -1377,7 +1377,7 @@ static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
}
entries = get_be32(pb);
- dprintf(c->fc, "sample_size = %d sample_count = %d\n", sc->sample_size, entries);
+ av_dlog(c->fc, "sample_size = %d sample_count = %d\n", sc->sample_size, entries);
sc->sample_count = entries;
if (sample_size)
@@ -1434,7 +1434,7 @@ static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
get_be24(pb); /* flags */
entries = get_be32(pb);
- dprintf(c->fc, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries);
+ av_dlog(c->fc, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries);
if(entries >= UINT_MAX / sizeof(*sc->stts_data))
return -1;
@@ -1452,7 +1452,7 @@ static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
sc->stts_data[i].count= sample_count;
sc->stts_data[i].duration= sample_duration;
- dprintf(c->fc, "sample_count=%d, sample_duration=%d\n",sample_count,sample_duration);
+ av_dlog(c->fc, "sample_count=%d, sample_duration=%d\n",sample_count,sample_duration);
duration+=(int64_t)sample_duration*sample_count;
total_sample_count+=sample_count;
@@ -1479,7 +1479,7 @@ static int mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
get_be24(pb); /* flags */
entries = get_be32(pb);
- dprintf(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);
+ av_dlog(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);
if(entries >= UINT_MAX / sizeof(*sc->ctts_data))
return -1;
@@ -1498,7 +1498,7 @@ static int mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
sc->dts_shift = FFMAX(sc->dts_shift, -duration);
}
- dprintf(c->fc, "dts shift %d\n", sc->dts_shift);
+ av_dlog(c->fc, "dts shift %d\n", sc->dts_shift);
return 0;
}
@@ -1578,7 +1578,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
e->size = sample_size;
e->min_distance = distance;
e->flags = keyframe ? AVINDEX_KEYFRAME : 0;
- dprintf(mov->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
+ av_dlog(mov->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
"size %d, distance %d, keyframe %d\n", st->index, current_sample,
current_offset, current_dts, sample_size, distance, keyframe);
}
@@ -1626,7 +1626,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
total += chunk_count * count;
}
- dprintf(mov->fc, "chunk count %d\n", total);
+ av_dlog(mov->fc, "chunk count %d\n", total);
if (total >= UINT_MAX / sizeof(*st->index_entries))
return;
st->index_entries = av_malloc(total*sizeof(*st->index_entries));
@@ -1670,7 +1670,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
e->size = size;
e->min_distance = 0;
e->flags = AVINDEX_KEYFRAME;
- dprintf(mov->fc, "AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", "
+ av_dlog(mov->fc, "AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", "
"size %d, duration %d\n", st->index, i, current_offset, current_dts,
size, samples);
@@ -1764,7 +1764,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
!st->codec->frame_size && sc->stts_count == 1) {
st->codec->frame_size = av_rescale(sc->stts_data[0].duration,
st->codec->sample_rate, sc->time_scale);
- dprintf(c->fc, "frame size %d\n", st->codec->frame_size);
+ av_dlog(c->fc, "frame size %d\n", st->codec->frame_size);
}
mov_build_index(c, st);
@@ -1961,7 +1961,7 @@ static int mov_read_tfhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
frag->duration = flags & 0x08 ? get_be32(pb) : trex->duration;
frag->size = flags & 0x10 ? get_be32(pb) : trex->size;
frag->flags = flags & 0x20 ? get_be32(pb) : trex->flags;
- dprintf(c->fc, "frag flags 0x%x\n", frag->flags);
+ av_dlog(c->fc, "frag flags 0x%x\n", frag->flags);
return 0;
}
@@ -2019,7 +2019,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
get_byte(pb); /* version */
flags = get_be24(pb);
entries = get_be32(pb);
- dprintf(c->fc, "flags 0x%x entries %d\n", flags, entries);
+ av_dlog(c->fc, "flags 0x%x entries %d\n", flags, entries);
if (flags & 0x001) data_offset = get_be32(pb);
if (flags & 0x004) first_sample_flags = get_be32(pb);
if (flags & 0x800) {
@@ -2035,7 +2035,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
dts = st->duration;
offset = frag->base_data_offset + data_offset;
distance = 0;
- dprintf(c->fc, "first sample flags 0x%x\n", first_sample_flags);
+ av_dlog(c->fc, "first sample flags 0x%x\n", first_sample_flags);
for (i = 0; i < entries; i++) {
unsigned sample_size = frag->size;
int sample_flags = i ? frag->flags : first_sample_flags;
@@ -2055,7 +2055,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
distance = 0;
av_add_index_entry(st, offset, dts, sample_size, distance,
keyframe ? AVINDEX_KEYFRAME : 0);
- dprintf(c->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
+ av_dlog(c->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
"size %d, distance %d, keyframe %d\n", st->index, sc->sample_count+i,
offset, dts, sample_size, distance, keyframe);
distance++;
@@ -2172,7 +2172,7 @@ static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
av_log(c->fc, AV_LOG_WARNING, "multiple edit list entries, "
"a/v desync might occur, patch welcome\n");
- dprintf(c->fc, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count);
+ av_dlog(c->fc, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count);
return 0;
}
@@ -2363,7 +2363,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_log(s, AV_LOG_ERROR, "moov atom not found\n");
return -1;
}
- dprintf(mov->fc, "on_parse_exit_offset=%lld\n", url_ftell(pb));
+ av_dlog(mov->fc, "on_parse_exit_offset=%lld\n", url_ftell(pb));
if (!url_is_streamed(pb) && mov->chapter_track > 0)
mov_read_chapters(s);
@@ -2382,7 +2382,7 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
if (msc->pb && msc->current_sample < avst->nb_index_entries) {
AVIndexEntry *current_sample = &avst->index_entries[msc->current_sample];
int64_t dts = av_rescale(current_sample->timestamp, AV_TIME_BASE, msc->time_scale);
- dprintf(s, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts);
+ av_dlog(s, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts);
if (!sample || (url_is_streamed(s->pb) && current_sample->pos < sample->pos) ||
(!url_is_streamed(s->pb) &&
((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
@@ -2412,7 +2412,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 ||
url_feof(s->pb))
return AVERROR_EOF;
- dprintf(s, "read fragments, offset 0x%llx\n", url_ftell(s->pb));
+ av_dlog(s, "read fragments, offset 0x%llx\n", url_ftell(s->pb));
goto retry;
}
sc = st->priv_data;
@@ -2463,7 +2463,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
goto retry;
pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? AV_PKT_FLAG_KEY : 0;
pkt->pos = sample->pos;
- dprintf(s, "stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n",
+ av_dlog(s, "stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n",
pkt->stream_index, pkt->pts, pkt->dts, pkt->pos, pkt->duration);
return 0;
}
@@ -2475,13 +2475,13 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp,
int i;
sample = av_index_search_timestamp(st, timestamp, flags);
- dprintf(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample);
+ av_dlog(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample);
if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp)
sample = 0;
if (sample < 0) /* not sure what to do */
return -1;
sc->current_sample = sample;
- dprintf(s, "stream %d, found sample %d\n", st->index, sc->current_sample);
+ av_dlog(s, "stream %d, found sample %d\n", st->index, sc->current_sample);
/* adjust ctts index */
if (sc->ctts_data) {
time_sample = 0;
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index e8f31d6d0b..f2b580a2ef 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -289,7 +289,7 @@ static MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts, unsigned int
MpegTSFilter *filter;
MpegTSSectionFilter *sec;
- dprintf(ts->stream, "Filter: pid=0x%x\n", pid);
+ av_dlog(ts->stream, "Filter: pid=0x%x\n", pid);
if (pid >= NB_PID_MAX || ts->pids[pid])
return NULL;
@@ -678,7 +678,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
pes->header[2] == 0x01) {
/* it must be an mpeg2 PES stream */
code = pes->header[3] | 0x100;
- dprintf(pes->stream, "pid=%x pes_code=%#x\n", pes->pid, code);
+ av_dlog(pes->stream, "pid=%x pes_code=%#x\n", pes->pid, code);
if ((pes->st && pes->st->discard == AVDISCARD_ALL) ||
code == 0x1be) /* padding_stream */
@@ -714,7 +714,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */
pes->state = MPEGTS_PESHEADER;
if (pes->st->codec->codec_id == CODEC_ID_NONE) {
- dprintf(pes->stream, "pid=%x stream_type=%x probing\n",
+ av_dlog(pes->stream, "pid=%x stream_type=%x probing\n",
pes->pid, pes->stream_type);
pes->st->codec->codec_id = CODEC_ID_PROBE;
}
@@ -878,7 +878,7 @@ static int mp4_read_iods(AVFormatContext *s, const uint8_t *buf, unsigned size,
len = ff_mp4_read_descr(s, &pb, &tag);
if (tag == MP4ESDescrTag) {
*es_id = get_be16(&pb); /* ES_ID */
- dprintf(s, "ES_ID %#x\n", *es_id);
+ av_dlog(s, "ES_ID %#x\n", *es_id);
get_byte(&pb); /* priority */
len = ff_mp4_read_descr(s, &pb, &tag);
if (tag == MP4DecConfigDescrTag) {
@@ -912,7 +912,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
if (desc_end > desc_list_end)
return -1;
- dprintf(fc, "tag: 0x%02x len=%d\n", desc_tag, desc_len);
+ av_dlog(fc, "tag: 0x%02x len=%d\n", desc_tag, desc_len);
if (st->codec->codec_id == CODEC_ID_NONE &&
stream_type == STREAM_TYPE_PRIVATE_DATA)
@@ -967,7 +967,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
break;
case 0x05: /* registration descriptor */
st->codec->codec_tag = bytestream_get_le32(pp);
- dprintf(fc, "reg_desc=%.4s\n", (char*)&st->codec->codec_tag);
+ av_dlog(fc, "reg_desc=%.4s\n", (char*)&st->codec->codec_tag);
if (st->codec->codec_id == CODEC_ID_NONE &&
stream_type == STREAM_TYPE_PRIVATE_DATA)
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
int mp4_es_id = 0;
#ifdef DEBUG
- dprintf(ts->stream, "PMT: len %i\n", section_len);
+ av_dlog(ts->stream, "PMT: len %i\n", section_len);
av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len);
#endif
@@ -1003,7 +1003,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (parse_section_header(h, &p, p_end) < 0)
return;
- dprintf(ts->stream, "sid=0x%x sec_num=%d/%d\n",
+ av_dlog(ts->stream, "sid=0x%x sec_num=%d/%d\n",
h->id, h->sec_num, h->last_sec_num);
if (h->tid != PMT_TID)
@@ -1015,7 +1015,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
return;
add_pid_to_pmt(ts, h->id, pcr_pid);
- dprintf(ts->stream, "pcr_pid=0x%x\n", pcr_pid);
+ av_dlog(ts->stream, "pcr_pid=0x%x\n", pcr_pid);
program_info_length = get16(&p, p_end) & 0xfff;
if (program_info_length < 0)
@@ -1025,7 +1025,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
tag = get8(&p, p_end);
len = get8(&p, p_end);
- dprintf(ts->stream, "program tag: 0x%02x len=%d\n", tag, len);
+ av_dlog(ts->stream, "program tag: 0x%02x len=%d\n", tag, len);
if(len > program_info_length - 2)
//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
int sid, pmt_pid;
#ifdef DEBUG
- dprintf(ts->stream, "PAT:\n");
+ av_dlog(ts->stream, "PAT:\n");
av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len);
#endif
p_end = section + section_len - 4;
@@ -1133,7 +1133,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (pmt_pid < 0)
break;
- dprintf(ts->stream, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
+ av_dlog(ts->stream, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
if (sid == 0x0000) {
/* NIT info */
@@ -1158,7 +1158,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
char *name, *provider_name;
#ifdef DEBUG
- dprintf(ts->stream, "SDT:\n");
+ av_dlog(ts->stream, "SDT:\n");
av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len);
#endif
@@ -1196,7 +1196,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (desc_end > desc_list_end)
break;
- dprintf(ts->stream, "tag: 0x%02x len=%d\n",
+ av_dlog(ts->stream, "tag: 0x%02x len=%d\n",
desc_tag, desc_len);
switch(desc_tag) {
@@ -1484,7 +1484,7 @@ static int mpegts_read_header(AVFormatContext *s,
ts->auto_guess = 1;
- dprintf(ts->stream, "tuning done\n");
+ av_dlog(ts->stream, "tuning done\n");
s->ctx_flags |= AVFMTCTX_NOHEADER;
} else {
diff --git a/libavformat/mxf.h b/libavformat/mxf.h
index 9190da6e04..4f5d4c0d95 100644
--- a/libavformat/mxf.h
+++ b/libavformat/mxf.h
@@ -63,7 +63,7 @@ extern const MXFCodecUL ff_mxf_codec_uls[];
int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt);
-#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, \
+#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, \
(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])
#endif /* AVFORMAT_MXF_H */
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 5276c8b2fa..9193561944 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -309,7 +309,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
if (klv_read_packet(&klv, s->pb) < 0)
return -1;
PRINT_KEY(s, "read packet", klv.key);
- dprintf(s, "size %lld offset %#llx\n", klv.length, klv.offset);
+ av_dlog(s, "size %lld offset %#llx\n", klv.length, klv.offset);
if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) {
int res = mxf_decrypt_triplet(s, pkt, &klv);
if (res < 0) {
@@ -518,12 +518,12 @@ static int mxf_read_source_package(void *arg, ByteIOContext *pb, int tag, int si
static int mxf_read_index_table_segment(void *arg, ByteIOContext *pb, int tag, int size, UID uid)
{
switch(tag) {
- case 0x3F05: dprintf(NULL, "EditUnitByteCount %d\n", get_be32(pb)); break;
- case 0x3F06: dprintf(NULL, "IndexSID %d\n", get_be32(pb)); break;
- case 0x3F07: dprintf(NULL, "BodySID %d\n", get_be32(pb)); break;
- case 0x3F0B: dprintf(NULL, "IndexEditRate %d/%d\n", get_be32(pb), get_be32(pb)); break;
- case 0x3F0C: dprintf(NULL, "IndexStartPosition %lld\n", get_be64(pb)); break;
- case 0x3F0D: dprintf(NULL, "IndexDuration %lld\n", get_be64(pb)); break;
+ case 0x3F05: av_dlog(NULL, "EditUnitByteCount %d\n", get_be32(pb)); break;
+ case 0x3F06: av_dlog(NULL, "IndexSID %d\n", get_be32(pb)); break;
+ case 0x3F07: av_dlog(NULL, "BodySID %d\n", get_be32(pb)); break;
+ case 0x3F0B: av_dlog(NULL, "IndexEditRate %d/%d\n", get_be32(pb), get_be32(pb)); break;
+ case 0x3F0C: av_dlog(NULL, "IndexStartPosition %lld\n", get_be64(pb)); break;
+ case 0x3F0D: av_dlog(NULL, "IndexDuration %lld\n", get_be64(pb)); break;
}
return 0;
}
@@ -536,7 +536,7 @@ static void mxf_read_pixel_layout(ByteIOContext *pb, MXFDescriptor *descriptor)
do {
code = get_byte(pb);
value = get_byte(pb);
- dprintf(NULL, "pixel layout: code %#x\n", code);
+ av_dlog(NULL, "pixel layout: code %#x\n", code);
if (ofs < 16) {
layout[ofs++] = code;
@@ -666,7 +666,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
MXFPackage *temp_package = NULL;
int i, j, k;
- dprintf(mxf->fc, "metadata sets count %d\n", mxf->metadata_sets_count);
+ av_dlog(mxf->fc, "metadata sets count %d\n", mxf->metadata_sets_count);
/* TODO: handle multiple material packages (OP3x) */
for (i = 0; i < mxf->packages_count; i++) {
material_package = mxf_resolve_strong_ref(mxf, &mxf->packages_refs[i], MaterialPackage);
@@ -876,7 +876,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
uint64_t next = url_ftell(pb) + size;
UID uid = {0};
- dprintf(mxf->fc, "local tag %#04x size %d\n", tag, size);
+ av_dlog(mxf->fc, "local tag %#04x size %d\n", tag, size);
if (!size) { /* ignore empty tag, needed for some files with empty UMID tag */
av_log(mxf->fc, AV_LOG_ERROR, "local tag %#04x with 0 size\n", tag);
continue;
@@ -887,7 +887,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
int local_tag = AV_RB16(mxf->local_tags+i*18);
if (local_tag == tag) {
memcpy(uid, mxf->local_tags+i*18+2, 16);
- dprintf(mxf->fc, "local tag %#04x\n", local_tag);
+ av_dlog(mxf->fc, "local tag %#04x\n", local_tag);
PRINT_KEY(mxf->fc, "uid", uid);
}
}
@@ -920,7 +920,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (klv_read_packet(&klv, s->pb) < 0)
return -1;
PRINT_KEY(s, "read header", klv.key);
- dprintf(s, "size %lld offset %#llx\n", klv.length, klv.offset);
+ av_dlog(s, "size %lld offset %#llx\n", klv.length, klv.offset);
if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) ||
IS_KLV_KEY(klv.key, mxf_essence_element_key)) {
/* FIXME avoid seek */
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index 62c64e0651..9c9fa1bbcb 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -43,7 +43,7 @@ static int read_atom(AVFormatContext *s, Atom *atom)
if (atom->size < 8)
return -1;
atom->tag = get_le32(s->pb);
- dprintf(s, "atom %d %.4s offset %#llx\n",
+ av_dlog(s, "atom %d %.4s offset %#llx\n",
atom->size, (char*)&atom->tag, atom->offset);
return atom->size;
}
@@ -61,16 +61,16 @@ static int r3d_read_red1(AVFormatContext *s)
tmp = get_byte(s->pb); // major version
tmp2 = get_byte(s->pb); // minor version
- dprintf(s, "version %d.%d\n", tmp, tmp2);
+ av_dlog(s, "version %d.%d\n", tmp, tmp2);
tmp = get_be16(s->pb); // unknown
- dprintf(s, "unknown1 %d\n", tmp);
+ av_dlog(s, "unknown1 %d\n", tmp);
tmp = get_be32(s->pb);
av_set_pts_info(st, 32, 1, tmp);
tmp = get_be32(s->pb); // filenum
- dprintf(s, "filenum %d\n", tmp);
+ av_dlog(s, "filenum %d\n", tmp);
url_fskip(s->pb, 32); // unknown
@@ -78,13 +78,13 @@ static int r3d_read_red1(AVFormatContext *s)
st->codec->height = get_be32(s->pb);
tmp = get_be16(s->pb); // unknown
- dprintf(s, "unknown2 %d\n", tmp);
+ av_dlog(s, "unknown2 %d\n", tmp);
st->codec->time_base.den = get_be16(s->pb);
st->codec->time_base.num = get_be16(s->pb);
tmp = get_byte(s->pb); // audio channels
- dprintf(s, "audio channels %d\n", tmp);
+ av_dlog(s, "audio channels %d\n", tmp);
if (tmp > 0) {
AVStream *ast = av_new_stream(s, 1);
if (!ast)
@@ -99,10 +99,10 @@ static int r3d_read_red1(AVFormatContext *s)
filename[sizeof(filename)-1] = 0;
av_metadata_set2(&st->metadata, "filename", filename, 0);
- dprintf(s, "filename %s\n", filename);
- dprintf(s, "resolution %dx%d\n", st->codec->width, st->codec->height);
- dprintf(s, "timescale %d\n", st->time_base.den);
- dprintf(s, "frame rate %d/%d\n",
+ av_dlog(s, "filename %s\n", filename);
+ av_dlog(s, "resolution %dx%d\n", st->codec->width, st->codec->height);
+ av_dlog(s, "timescale %d\n", st->time_base.den);
+ av_dlog(s, "frame rate %d/%d\n",
st->codec->time_base.num, st->codec->time_base.den);
return 0;
@@ -125,13 +125,13 @@ static int r3d_read_rdvo(AVFormatContext *s, Atom *atom)
r3d->video_offsets_count = i;
break;
}
- dprintf(s, "video offset %d: %#x\n", i, r3d->video_offsets[i]);
+ av_dlog(s, "video offset %d: %#x\n", i, r3d->video_offsets[i]);
}
if (st->codec->time_base.den)
st->duration = (uint64_t)r3d->video_offsets_count*
st->time_base.den*st->codec->time_base.num/st->codec->time_base.den;
- dprintf(s, "duration %lld\n", st->duration);
+ av_dlog(s, "duration %lld\n", st->duration);
return 0;
}
@@ -147,10 +147,10 @@ static void r3d_read_reos(AVFormatContext *s)
get_be32(s->pb); // rdas offset
tmp = get_be32(s->pb);
- dprintf(s, "num video chunks %d\n", tmp);
+ av_dlog(s, "num video chunks %d\n", tmp);
tmp = get_be32(s->pb);
- dprintf(s, "num audio chunks %d\n", tmp);
+ av_dlog(s, "num audio chunks %d\n", tmp);
url_fskip(s->pb, 6*4);
}
@@ -176,7 +176,7 @@ static int r3d_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
s->data_offset = url_ftell(s->pb);
- dprintf(s, "data offset %#llx\n", s->data_offset);
+ av_dlog(s, "data offset %#llx\n", s->data_offset);
if (url_is_streamed(s->pb))
return 0;
// find REOB/REOF/REOS to load index
@@ -217,29 +217,29 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom)
dts = get_be32(s->pb);
tmp = get_be32(s->pb);
- dprintf(s, "frame num %d\n", tmp);
+ av_dlog(s, "frame num %d\n", tmp);
tmp = get_byte(s->pb); // major version
tmp2 = get_byte(s->pb); // minor version
- dprintf(s, "version %d.%d\n", tmp, tmp2);
+ av_dlog(s, "version %d.%d\n", tmp, tmp2);
tmp = get_be16(s->pb); // unknown
- dprintf(s, "unknown %d\n", tmp);
+ av_dlog(s, "unknown %d\n", tmp);
if (tmp > 4) {
tmp = get_be16(s->pb); // unknown
- dprintf(s, "unknown %d\n", tmp);
+ av_dlog(s, "unknown %d\n", tmp);
tmp = get_be16(s->pb); // unknown
- dprintf(s, "unknown %d\n", tmp);
+ av_dlog(s, "unknown %d\n", tmp);
tmp = get_be32(s->pb);
- dprintf(s, "width %d\n", tmp);
+ av_dlog(s, "width %d\n", tmp);
tmp = get_be32(s->pb);
- dprintf(s, "height %d\n", tmp);
+ av_dlog(s, "height %d\n", tmp);
tmp = get_be32(s->pb);
- dprintf(s, "metadata len %d\n", tmp);
+ av_dlog(s, "metadata len %d\n", tmp);
}
tmp = atom->size - 8 - (url_ftell(s->pb) - pos);
if (tmp < 0)
@@ -255,7 +255,7 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom)
if (st->codec->time_base.den)
pkt->duration = (uint64_t)st->time_base.den*
st->codec->time_base.num/st->codec->time_base.den;
- dprintf(s, "pkt dts %lld duration %d\n", pkt->dts, pkt->duration);
+ av_dlog(s, "pkt dts %lld duration %d\n", pkt->dts, pkt->duration);
return 0;
}
@@ -275,17 +275,17 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
samples = get_be32(s->pb);
tmp = get_be32(s->pb);
- dprintf(s, "packet num %d\n", tmp);
+ av_dlog(s, "packet num %d\n", tmp);
tmp = get_be16(s->pb); // unkown
- dprintf(s, "unknown %d\n", tmp);
+ av_dlog(s, "unknown %d\n", tmp);
tmp = get_byte(s->pb); // major version
tmp2 = get_byte(s->pb); // minor version
- dprintf(s, "version %d.%d\n", tmp, tmp2);
+ av_dlog(s, "version %d.%d\n", tmp, tmp2);
tmp = get_be32(s->pb); // unknown
- dprintf(s, "unknown %d\n", tmp);
+ av_dlog(s, "unknown %d\n", tmp);
size = atom->size - 8 - (url_ftell(s->pb) - pos);
if (size < 0)
@@ -299,7 +299,7 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
pkt->stream_index = 1;
pkt->dts = dts;
pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate);
- dprintf(s, "pkt dts %lld duration %d samples %d sample rate %d\n",
+ av_dlog(s, "pkt dts %lld duration %d samples %d sample rate %d\n",
pkt->dts, pkt->duration, samples, st->codec->sample_rate);
return 0;
@@ -356,7 +356,7 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i
frame_num = sample_time*st->codec->time_base.den/
((int64_t)st->codec->time_base.num*st->time_base.den);
- dprintf(s, "seek frame num %d timestamp %lld\n", frame_num, sample_time);
+ av_dlog(s, "seek frame num %d timestamp %lld\n", frame_num, sample_time);
if (frame_num < r3d->video_offsets_count) {
url_fseek(s->pb, r3d->video_offsets_count, SEEK_SET);
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 4f0ade167d..c81ba1cd02 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -324,9 +324,9 @@ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
len = url_close_dyn_buf(pb, &buf);
if ((len > 0) && buf) {
int result;
- dprintf(s->ic, "sending %d bytes of RR\n", len);
+ av_dlog(s->ic, "sending %d bytes of RR\n", len);
result= url_write(s->rtp_ctx, buf, len);
- dprintf(s->ic, "result from url_write: %d\n", result);
+ av_dlog(s->ic, "result from url_write: %d\n", result);
av_free(buf);
}
return 0;
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 839a05c338..22e68bac97 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -192,7 +192,7 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time)
RTPMuxContext *s = s1->priv_data;
uint32_t rtp_ts;
- dprintf(s1, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp);
+ av_dlog(s1, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp);
s->last_rtcp_ntp_time = ntp_time;
rtp_ts = av_rescale_q(ntp_time - s->first_rtcp_ntp_time, (AVRational){1, 1000000},
@@ -215,7 +215,7 @@ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
{
RTPMuxContext *s = s1->priv_data;
- dprintf(s1, "rtp_send_data size=%d\n", len);
+ av_dlog(s1, "rtp_send_data size=%d\n", len);
/* build the RTP header */
put_byte(s1->pb, (RTP_VERSION << 6));
@@ -364,7 +364,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
int rtcp_bytes;
int size= pkt->size;
- dprintf(s1, "%d: write len=%d\n", pkt->stream_index, size);
+ av_dlog(s1, "%d: write len=%d\n", pkt->stream_index, size);
rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) /
RTCP_TX_RATIO_DEN;
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index dec6995c46..9a6d6ad2b8 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -247,7 +247,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
struct sockaddr_storage sdp_ip;
int ttl;
- dprintf(s, "sdp: %c='%s'\n", letter, buf);
+ av_dlog(s, "sdp: %c='%s'\n", letter, buf);
p = buf;
if (s1->skip_media && letter != 'm')
@@ -826,7 +826,7 @@ void ff_rtsp_skip_packet(AVFormatContext *s)
return;
len = AV_RB16(buf + 1);
- dprintf(s, "skipping RTP packet len=%d\n", len);
+ av_dlog(s, "skipping RTP packet len=%d\n", len);
/* skip payload */
while (len > 0) {
@@ -860,7 +860,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
for (;;) {
ret = url_read_complete(rt->rtsp_hd, &ch, 1);
#ifdef DEBUG_RTP_TCP
- dprintf(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);
+ av_dlog(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);
#endif
if (ret != 1)
return AVERROR_EOF;
@@ -879,7 +879,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
}
*q = '\0';
- dprintf(s, "line='%s'\n", buf);
+ av_dlog(s, "line='%s'\n", buf);
/* test if last line */
if (buf[0] == '\0')
@@ -984,7 +984,7 @@ static int ff_rtsp_send_cmd_with_content_async(AVFormatContext *s,
out_buf = base64buf;
}
- dprintf(s, "Sending:\n%s--\n", buf);
+ av_dlog(s, "Sending:\n%s--\n", buf);
url_write(rt->rtsp_hd_out, out_buf, strlen(out_buf));
if (send_content_length > 0 && send_content) {
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index f95f7c3851..45ed7bb9bb 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -184,7 +184,7 @@ int ff_rtsp_tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
RTSPStream *rtsp_st;
#ifdef DEBUG_RTP_TCP
- dprintf(s, "tcp_read_packet:\n");
+ av_dlog(s, "tcp_read_packet:\n");
#endif
redo:
for (;;) {
@@ -205,7 +205,7 @@ redo:
id = buf[0];
len = AV_RB16(buf + 1);
#ifdef DEBUG_RTP_TCP
- dprintf(s, "id=%d len=%d\n", id, len);
+ av_dlog(s, "id=%d len=%d\n", id, len);
#endif
if (len > buf_size || len < 12)
goto redo;