summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/av_log.c27
-rw-r--r--common/av_log.h3
2 files changed, 16 insertions, 14 deletions
diff --git a/common/av_log.c b/common/av_log.c
index ba47500572..b007062d1e 100644
--- a/common/av_log.c
+++ b/common/av_log.c
@@ -147,30 +147,31 @@ void init_libav(void)
}
#define V(x) (x)>>16, (x)>>8 & 255, (x) & 255
-static void print_version(int v, char *name, unsigned buildv, unsigned runv)
+static void print_version(struct mp_log *log, int v, char *name,
+ unsigned buildv, unsigned runv)
{
- mp_msg(MSGT_CPLAYER, v, " %-15s %d.%d.%d", name, V(buildv));
+ mp_msg_log(log, v, " %-15s %d.%d.%d", name, V(buildv));
if (buildv != runv)
- mp_msg(MSGT_CPLAYER, v, " (runtime %d.%d.%d)", V(runv));
- mp_msg(MSGT_CPLAYER, v, "\n");
+ mp_msg_log(log, v, " (runtime %d.%d.%d)", V(runv));
+ mp_msg_log(log, v, "\n");
}
#undef V
-void print_libav_versions(int v)
+void print_libav_versions(struct mp_log *log, int v)
{
- mp_msg(MSGT_CPLAYER, v, "%s library versions:\n", LIB_PREFIX);
+ mp_msg_log(log, v, "%s library versions:\n", LIB_PREFIX);
- print_version(v, "libavutil", LIBAVUTIL_VERSION_INT, avutil_version());
- print_version(v, "libavcodec", LIBAVCODEC_VERSION_INT, avcodec_version());
- print_version(v, "libavformat", LIBAVFORMAT_VERSION_INT, avformat_version());
- print_version(v, "libswscale", LIBSWSCALE_VERSION_INT, swscale_version());
+ print_version(log, v, "libavutil", LIBAVUTIL_VERSION_INT, avutil_version());
+ print_version(log, v, "libavcodec", LIBAVCODEC_VERSION_INT, avcodec_version());
+ print_version(log, v, "libavformat", LIBAVFORMAT_VERSION_INT, avformat_version());
+ print_version(log, v, "libswscale", LIBSWSCALE_VERSION_INT, swscale_version());
#if HAVE_LIBAVFILTER
- print_version(v, "libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version());
+ print_version(log, v, "libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version());
#endif
#if HAVE_LIBAVRESAMPLE
- print_version(v, "libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version());
+ print_version(log, v, "libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version());
#endif
#if HAVE_LIBSWRESAMPLE
- print_version(v, "libswresample", LIBSWRESAMPLE_VERSION_INT, swresample_version());
+ print_version(log, v, "libswresample", LIBSWRESAMPLE_VERSION_INT, swresample_version());
#endif
}
diff --git a/common/av_log.h b/common/av_log.h
index d5c57b0aeb..e941220a11 100644
--- a/common/av_log.h
+++ b/common/av_log.h
@@ -1,2 +1,3 @@
void init_libav(void);
-void print_libav_versions(int v);
+struct mp_log;
+void print_libav_versions(struct mp_log *log, int v);