path: root/common
diff options
authorwm4 <wm4@nowhere>2013-12-21 19:45:42 +0100
committerwm4 <wm4@nowhere>2013-12-21 21:05:02 +0100
commitd8d42b44fc717c695af59c14213d54885088ea37 (patch)
tree9dbfd597e3352249cb5d1fda996d2c0ce1602fe9 /common
parenta2d144fc8f146f96e4fe97b1b2c15828e24f8494 (diff)
m_option, m_config: mp_msg conversions
Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
Diffstat (limited to 'common')
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());
- print_version(v, "libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version());
+ print_version(log, v, "libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version());
- print_version(v, "libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version());
+ print_version(log, v, "libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version());
- print_version(v, "libswresample", LIBSWRESAMPLE_VERSION_INT, swresample_version());
+ print_version(log, v, "libswresample", LIBSWRESAMPLE_VERSION_INT, swresample_version());
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);