summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-08-17 20:45:35 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-08-18 10:24:01 -0400
commit229843aa359ae0c9519977d7fa952688db63f559 (patch)
treef931598935b67d8d9b2a64190876a9b829e1f287 /libavformat
parentad7d972e08dddb1788ac6a434d1be314febcb09d (diff)
Replace av_dlog with ff_dlog.
ff_dlog checks compilability, and is non-public. av_dlog is deprecated and no longer exists if FF_API_DLOG=0.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avienc.c5
-rw-r--r--libavformat/ffmdec.c9
-rw-r--r--libavformat/ftp.c23
-rw-r--r--libavformat/mov.c3
-rw-r--r--libavformat/mpegts.c3
-rw-r--r--libavformat/segment.c3
-rw-r--r--libavformat/swfdec.c3
7 files changed, 28 insertions, 21 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index e5609d998c..a79f156ab2 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -29,6 +29,7 @@
#include "mpegts.h"
#include "libavformat/avlanguage.h"
#include "libavutil/avstring.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "libavutil/avassert.h"
@@ -618,7 +619,7 @@ static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts)
AVIStream *avist = s->streams[stream_index]->priv_data;
AVCodecContext *enc = s->streams[stream_index]->codec;
- av_dlog(s, "dts:%s packet_count:%d stream_index:%d\n", av_ts2str(dts), avist->packet_count, stream_index);
+ ff_dlog(s, "dts:%s packet_count:%d stream_index:%d\n", av_ts2str(dts), avist->packet_count, stream_index);
while (enc->block_align == 0 && dts != AV_NOPTS_VALUE &&
dts > avist->packet_count && enc->codec_id != AV_CODEC_ID_XSUB && avist->packet_count) {
AVPacket empty_packet;
@@ -633,7 +634,7 @@ static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts)
empty_packet.data = NULL;
empty_packet.stream_index = stream_index;
avi_write_packet(s, &empty_packet);
- av_dlog(s, "dup dts:%s packet_count:%d\n", av_ts2str(dts), avist->packet_count);
+ ff_dlog(s, "dup dts:%s packet_count:%d\n", av_ts2str(dts), avist->packet_count);
}
return 0;
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 7af1bd3cf4..110d31540f 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -21,6 +21,7 @@
#include <stdint.h>
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "libavutil/opt.h"
@@ -160,7 +161,7 @@ static int64_t ffm_seek1(AVFormatContext *s, int64_t pos1)
pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE);
pos = FFMAX(pos, FFM_PACKET_SIZE);
- av_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
+ ff_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);
return avio_seek(pb, pos, SEEK_SET);
}
@@ -172,7 +173,7 @@ static int64_t get_dts(AVFormatContext *s, int64_t pos)
ffm_seek1(s, pos);
avio_skip(pb, 4);
dts = avio_rb64(pb);
- av_dlog(s, "dts=%0.6f\n", dts / 1000000.0);
+ ff_dlog(s, "dts=%0.6f\n", dts / 1000000.0);
return dts;
}
@@ -608,7 +609,7 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt)
if ((ret = ffm_is_avail_data(s, FRAME_HEADER_SIZE+4)) < 0)
return ret;
- av_dlog(s, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n",
+ ff_dlog(s, "pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n",
avio_tell(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)
@@ -666,7 +667,7 @@ static int ffm_seek(AVFormatContext *s, int stream_index, int64_t wanted_pts, in
int64_t pts_min, pts_max, pts;
double pos1;
- av_dlog(s, "wanted_pts=%0.6f\n", wanted_pts / 1000000.0);
+ ff_dlog(s, "wanted_pts=%0.6f\n", wanted_pts / 1000000.0);
/* find the position using linear interpolation (better than
dichotomy in typical cases) */
if (ffm->write_index && ffm->write_index < ffm->file_size) {
diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index f603379e5b..db233c9b4b 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -19,6 +19,7 @@
*/
#include "libavutil/avstring.h"
+#include "libavutil/internal.h"
#include "libavutil/parseutils.h"
#include "avformat.h"
#include "internal.h"
@@ -200,7 +201,7 @@ static int ftp_send_command(FTPContext *s, const char *command,
{
int err;
- av_dlog(s, "%s", command);
+ ff_dlog(s, "%s", command);
if (response)
*response = NULL;
@@ -283,7 +284,7 @@ static int ftp_passive_mode_epsv(FTPContext *s)
end[-1] = '\0';
s->server_data_port = atoi(start);
- av_dlog(s, "Server data port: %d\n", s->server_data_port);
+ ff_dlog(s, "Server data port: %d\n", s->server_data_port);
av_free(res);
return 0;
@@ -329,7 +330,7 @@ static int ftp_passive_mode(FTPContext *s)
start = av_strtok(end, ",", &end);
if (!start) goto fail;
s->server_data_port += atoi(start);
- av_dlog(s, "Server data port: %d\n", s->server_data_port);
+ ff_dlog(s, "Server data port: %d\n", s->server_data_port);
av_free(res);
return 0;
@@ -698,7 +699,7 @@ static int ftp_open(URLContext *h, const char *url, int flags)
FTPContext *s = h->priv_data;
int err;
- av_dlog(h, "ftp protocol open\n");
+ ff_dlog(h, "ftp protocol open\n");
if ((err = ftp_connect(h, url)) < 0)
goto fail;
@@ -726,7 +727,7 @@ static int64_t ftp_seek(URLContext *h, int64_t pos, int whence)
int err;
int64_t new_pos, fake_pos;
- av_dlog(h, "ftp protocol seek %"PRId64" %d\n", pos, whence);
+ ff_dlog(h, "ftp protocol seek %"PRId64" %d\n", pos, whence);
switch(whence) {
case AVSEEK_SIZE:
@@ -768,7 +769,7 @@ static int ftp_read(URLContext *h, unsigned char *buf, int size)
FTPContext *s = h->priv_data;
int read, err, retry_done = 0;
- av_dlog(h, "ftp protocol read %d bytes\n", size);
+ ff_dlog(h, "ftp protocol read %d bytes\n", size);
retry:
if (s->state == DISCONNECTED) {
/* optimization */
@@ -826,7 +827,7 @@ static int ftp_write(URLContext *h, const unsigned char *buf, int size)
FTPContext *s = h->priv_data;
int written;
- av_dlog(h, "ftp protocol write %d bytes\n", size);
+ ff_dlog(h, "ftp protocol write %d bytes\n", size);
if (s->state == DISCONNECTED) {
if ((err = ftp_connect_data_connection(h)) < 0)
@@ -853,7 +854,7 @@ static int ftp_close(URLContext *h)
{
FTPContext *s = h->priv_data;
- av_dlog(h, "ftp protocol close\n");
+ ff_dlog(h, "ftp protocol close\n");
ftp_close_both_connections(s);
av_freep(&s->user);
@@ -869,7 +870,7 @@ static int ftp_get_file_handle(URLContext *h)
{
FTPContext *s = h->priv_data;
- av_dlog(h, "ftp protocol get_file_handle\n");
+ ff_dlog(h, "ftp protocol get_file_handle\n");
if (s->conn_data)
return ffurl_get_file_handle(s->conn_data);
@@ -881,7 +882,7 @@ static int ftp_shutdown(URLContext *h, int flags)
{
FTPContext *s = h->priv_data;
- av_dlog(h, "ftp protocol shutdown\n");
+ ff_dlog(h, "ftp protocol shutdown\n");
if (s->conn_data)
return ffurl_shutdown(s->conn_data, flags);
@@ -933,7 +934,7 @@ static int ftp_parse_entry_nlst(char *line, AVIODirEntry *next)
static int ftp_parse_entry_mlsd(char *mlsd, AVIODirEntry *next)
{
char *fact, *value;
- av_dlog(NULL, "%s\n", mlsd);
+ ff_dlog(NULL, "%s\n", mlsd);
while(fact = av_strtok(mlsd, ";", &mlsd)) {
if (fact[0] == ' ') {
next->name = av_strdup(&fact[1]);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 154d2f83f5..aa89a5e389 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -29,6 +29,7 @@
#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "libavutil/mathematics.h"
@@ -1393,7 +1394,7 @@ static int mov_read_aclr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_log(c, AV_LOG_WARNING, "ignored unknown aclr value (%d)\n", range_value);
break;
}
- av_dlog(c, "color_range: %d\n", codec->color_range);
+ ff_dlog(c, "color_range: %d\n", codec->color_range);
} else {
/* For some reason the whole atom was not added to the extradata */
av_log(c, AV_LOG_ERROR, "aclr not decoded - incomplete atom\n");
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 42e5489d64..eac6d9e66c 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -21,6 +21,7 @@
#include "libavutil/buffer.h"
#include "libavutil/crc.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/dict.h"
@@ -2458,7 +2459,7 @@ static int mpegts_probe(AVProbeData *p)
sumscore = sumscore * CHECK_COUNT / check_count;
maxscore = maxscore * CHECK_COUNT / CHECK_BLOCK;
- av_dlog(0, "TS score: %d %d\n", sumscore, maxscore);
+ ff_dlog(0, "TS score: %d %d\n", sumscore, maxscore);
if (sumscore > 6) return AVPROBE_SCORE_MAX + sumscore - CHECK_COUNT;
else if (maxscore > 6) return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 42471bb190..0d66211962 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -33,6 +33,7 @@
#include "internal.h"
#include "libavutil/avassert.h"
+#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/avstring.h"
@@ -774,7 +775,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
- av_dlog(s, "packet stream:%d pts:%s pts_time:%s duration_time:%s is_key:%d frame:%d\n",
+ ff_dlog(s, "packet stream:%d pts:%s pts_time:%s duration_time:%s is_key:%d frame:%d\n",
pkt->stream_index, av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base),
av_ts2timestr(pkt->duration, &st->time_base),
pkt->flags & AV_PKT_FLAG_KEY,
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index ce1ad8fc9f..74531d8888 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -23,6 +23,7 @@
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/imgutils.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/get_bits.h"
#include "swf.h"
@@ -342,7 +343,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
out_len = colormapsize * colormapbpp + linesize * height;
- av_dlog(s, "bitmap: ch=%d fmt=%d %dx%d (linesize=%d) len=%d->%ld pal=%d\n",
+ ff_dlog(s, "bitmap: ch=%d fmt=%d %dx%d (linesize=%d) len=%d->%ld pal=%d\n",
ch_id, bmp_fmt, width, height, linesize, len, out_len, colormapsize);
zbuf = av_malloc(len);