From d8d42b44fc717c695af59c14213d54885088ea37 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 19:45:42 +0100 Subject: 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. --- common/av_log.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'common/av_log.c') 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 } -- cgit v1.2.3