summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-21 21:49:13 +0100
committerwm4 <wm4@nowhere>2013-12-21 22:13:04 +0100
commiteef36f03ea76f97c10075ae4b08e1e53e5195479 (patch)
tree9bafeac9944e717a2defe9e6f8fc753d3cdb9964 /video
parenteba5d025d2ba682de358b792dd15e80529d6a0f1 (diff)
downloadmpv-eef36f03ea76f97c10075ae4b08e1e53e5195479.tar.bz2
mpv-eef36f03ea76f97c10075ae4b08e1e53e5195479.tar.xz
msg: rename mp_msg_log -> mp_msg
Same for companion functions.
Diffstat (limited to 'video')
-rw-r--r--video/decode/vda.c4
-rw-r--r--video/filter/vf.c18
-rw-r--r--video/out/gl_common.c38
-rw-r--r--video/out/gl_lcms.c12
-rw-r--r--video/out/gl_video.c4
-rw-r--r--video/out/vo.c2
6 files changed, 39 insertions, 39 deletions
diff --git a/video/decode/vda.c b/video/decode/vda.c
index ab6f033455..531107bec4 100644
--- a/video/decode/vda.c
+++ b/video/decode/vda.c
@@ -78,12 +78,12 @@ static void print_vda_error(struct mp_log *log, int lev, char *message,
{
for (int n = 0; vda_errors[n].code < 0; n++)
if (vda_errors[n].code == error_code) {
- mp_msg_log(log, lev, "%s: %s (%d)\n",
+ mp_msg(log, lev, "%s: %s (%d)\n",
message, vda_errors[n].reason, error_code);
return;
}
- mp_msg_log(log, lev, "%s: %d\n", message, error_code);
+ mp_msg(log, lev, "%s: %d\n", message, error_code);
}
static int probe(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info,
diff --git a/video/filter/vf.c b/video/filter/vf.c
index 13d1026b74..4600e9e375 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -198,26 +198,26 @@ static int vf_default_query_format(struct vf_instance *vf, unsigned int fmt)
static void print_fmt(struct mp_log *log, int msglevel, struct mp_image_params *p)
{
if (p && p->imgfmt) {
- mp_msg_log(log, msglevel, "%dx%d", p->w, p->h);
+ mp_msg(log, msglevel, "%dx%d", p->w, p->h);
if (p->w != p->d_w || p->h != p->d_h)
- mp_msg_log(log, msglevel, "->%dx%d", p->d_w, p->d_h);
- mp_msg_log(log, msglevel, " %s", mp_imgfmt_to_name(p->imgfmt));
- mp_msg_log(log, msglevel, " %s/%s", mp_csp_names[p->colorspace],
+ mp_msg(log, msglevel, "->%dx%d", p->d_w, p->d_h);
+ mp_msg(log, msglevel, " %s", mp_imgfmt_to_name(p->imgfmt));
+ mp_msg(log, msglevel, " %s/%s", mp_csp_names[p->colorspace],
mp_csp_levels_names[p->colorlevels]);
} else {
- mp_msg_log(log, msglevel, "???");
+ mp_msg(log, msglevel, "???");
}
}
void vf_print_filter_chain(struct vf_chain *c, int msglevel)
{
- if (!mp_msg_test_log(c->log, msglevel))
+ if (!mp_msg_test(c->log, msglevel))
return;
for (vf_instance_t *f = c->first; f; f = f->next) {
- mp_msg_log(c->log, msglevel, " [%s] ", f->info->name);
+ mp_msg(c->log, msglevel, " [%s] ", f->info->name);
print_fmt(c->log, msglevel, &f->fmt_out);
- mp_msg_log(c->log, msglevel, "\n");
+ mp_msg(c->log, msglevel, "\n");
}
}
@@ -507,7 +507,7 @@ int vf_reconfig(struct vf_chain *c, const struct mp_image_params *params)
int loglevel = r < 0 ? MSGL_WARN : MSGL_V;
if (r == -2)
MP_ERR(c, "Image formats incompatible.\n");
- mp_msg_log(c->log, loglevel, "Video filter chain:\n");
+ mp_msg(c->log, loglevel, "Video filter chain:\n");
vf_print_filter_chain(c, loglevel);
return r;
}
diff --git a/video/out/gl_common.c b/video/out/gl_common.c
index 87089cc9d0..e363206b08 100644
--- a/video/out/gl_common.c
+++ b/video/out/gl_common.c
@@ -67,8 +67,8 @@ void glCheckError(GL *gl, struct mp_log *log, const char *info)
GLenum error = gl->GetError();
if (error == GL_NO_ERROR)
break;
- mp_msg_log(log, MSGL_ERR, "%s: OpenGL error %s.\n", info,
- gl_error_to_string(error));
+ mp_msg(log, MSGL_ERR, "%s: OpenGL error %s.\n", info,
+ gl_error_to_string(error));
}
}
@@ -123,9 +123,9 @@ static void list_features(int set, struct mp_log *log, int msgl, bool invert)
{
for (const struct feature *f = &features[0]; f->id; f++) {
if (invert == !(f->id & set))
- mp_msg_log(log, msgl, " [%s]", f->name);
+ mp_msg(log, msgl, " [%s]", f->name);
}
- mp_msg_log(log, msgl, "\n");
+ mp_msg(log, msgl, "\n");
}
// This guesses if the current GL context is a suspected software renderer.
@@ -506,12 +506,12 @@ void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *),
const char *version = gl->GetString(GL_VERSION);
sscanf(version, "%d.%d", &major, &minor);
gl->version = MPGL_VER(major, minor);
- mp_msg_log(log, MSGL_V, "Detected OpenGL %d.%d.\n", major, minor);
+ mp_msg(log, MSGL_V, "Detected OpenGL %d.%d.\n", major, minor);
- mp_msg_log(log, MSGL_V, "GL_VENDOR='%s'\n", gl->GetString(GL_VENDOR));
- mp_msg_log(log, MSGL_V, "GL_RENDERER='%s'\n", gl->GetString(GL_RENDERER));
- mp_msg_log(log, MSGL_V, "GL_VERSION='%s'\n", gl->GetString(GL_VERSION));
- mp_msg_log(log, MSGL_V, "GL_SHADING_LANGUAGE_VERSION='%s'\n",
+ mp_msg(log, MSGL_V, "GL_VENDOR='%s'\n", gl->GetString(GL_VENDOR));
+ mp_msg(log, MSGL_V, "GL_RENDERER='%s'\n", gl->GetString(GL_RENDERER));
+ mp_msg(log, MSGL_V, "GL_VERSION='%s'\n", gl->GetString(GL_VERSION));
+ mp_msg(log, MSGL_V, "GL_SHADING_LANGUAGE_VERSION='%s'\n",
gl->GetString(GL_SHADING_LANGUAGE_VERSION));
// Note: This code doesn't handle CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
@@ -548,9 +548,9 @@ void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *),
}
if (has_legacy)
- mp_msg_log(log, MSGL_V, "OpenGL legacy compat. found.\n");
- mp_msg_log(log, MSGL_DEBUG, "Combined OpenGL extensions string:\n%s\n",
- gl->extensions);
+ mp_msg(log, MSGL_V, "OpenGL legacy compat. found.\n");
+ mp_msg(log, MSGL_DEBUG, "Combined OpenGL extensions string:\n%s\n",
+ gl->extensions);
for (int n = 0; n < sizeof(gl_functions) / sizeof(gl_functions[0]); n++) {
struct gl_functions *section = &gl_functions[n];
@@ -594,11 +594,11 @@ void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *),
if (!ptr) {
all_loaded = false;
if (!section->partial_ok) {
- mp_msg_log(log, MSGL_V, "Required function '%s' not "
- "found for %s/%d.%d.\n", fn->funcnames[0],
- section->extension ? section->extension : "native",
- MPGL_VER_GET_MAJOR(section->ver_core),
- MPGL_VER_GET_MINOR(section->ver_core));
+ mp_msg(log, MSGL_V, "Required function '%s' not "
+ "found for %s/%d.%d.\n", fn->funcnames[0],
+ section->extension ? section->extension : "native",
+ MPGL_VER_GET_MAJOR(section->ver_core),
+ MPGL_VER_GET_MINOR(section->ver_core));
break;
}
}
@@ -632,7 +632,7 @@ void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *),
if (!is_software_gl(gl))
gl->mpgl_caps |= MPGL_CAP_NO_SW;
- mp_msg_log(log, MSGL_V, "Detected OpenGL features:");
+ mp_msg(log, MSGL_V, "Detected OpenGL features:");
list_features(gl->mpgl_caps, log, MSGL_V, false);
}
@@ -1031,7 +1031,7 @@ void mp_log_source(struct mp_log *log, int lev, const char *src)
const char *next = end + 1;
if (!end)
next = end = src + strlen(src);
- mp_msg_log(log, lev, "[%3d] %.*s\n", line, (int)(end - src), src);
+ mp_msg(log, lev, "[%3d] %.*s\n", line, (int)(end - src), src);
line++;
src = next;
}
diff --git a/video/out/gl_lcms.c b/video/out/gl_lcms.c
index da6d520fa0..958e207951 100644
--- a/video/out/gl_lcms.c
+++ b/video/out/gl_lcms.c
@@ -87,7 +87,7 @@ static void lcms2_error_handler(cmsContext ctx, cmsUInt32Number code,
const char *msg)
{
if (lcms2_dumb_crap)
- mp_msg_log(lcms2_dumb_crap, MSGL_ERR, "lcms2: %s\n", msg);
+ mp_msg(lcms2_dumb_crap, MSGL_ERR, "lcms2: %s\n", msg);
}
static struct bstr load_file(void *talloc_ctx, const char *filename,
@@ -121,7 +121,7 @@ struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log,
struct lut3d *lut = NULL;
bool locked = false;
- mp_msg_log(log, MSGL_INFO, "Opening ICC profile '%s'\n", opts->profile);
+ mp_msg(log, MSGL_INFO, "Opening ICC profile '%s'\n", opts->profile);
struct bstr iccdata = load_file(tmp, opts->profile, global);
if (!iccdata.len)
goto error_exit;
@@ -131,7 +131,7 @@ struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log,
// check cache
if (opts->cache) {
- mp_msg_log(log, MSGL_INFO, "Opening 3D LUT cache in file '%s'.\n",
+ mp_msg(log, MSGL_INFO, "Opening 3D LUT cache in file '%s'.\n",
opts->cache);
struct bstr cachedata = load_file(tmp, opts->cache, global);
if (bstr_eatstart(&cachedata, bstr0(LUT3D_CACHE_HEADER))
@@ -142,7 +142,7 @@ struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log,
memcpy(output, cachedata.start, cachedata.len);
goto done;
} else {
- mp_msg_log(log, MSGL_WARN, "3D LUT cache invalid!\n");
+ mp_msg(log, MSGL_WARN, "3D LUT cache invalid!\n");
}
}
@@ -219,7 +219,7 @@ error_exit:
}
if (!lut)
- mp_msg_log(log, MSGL_FATAL, "Error loading ICC profile.\n");
+ mp_msg(log, MSGL_FATAL, "Error loading ICC profile.\n");
talloc_free(tmp);
return lut;
@@ -236,7 +236,7 @@ const struct m_sub_options mp_icc_conf = {
struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log,
struct mpv_global *global)
{
- mp_msg_log(log, MSGL_FATAL, "LCMS2 support not compiled.\n");
+ mp_msg(log, MSGL_FATAL, "LCMS2 support not compiled.\n");
return NULL;
}
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 324013aef6..0f50403687 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -693,7 +693,7 @@ static GLuint create_shader(struct gl_video *p, GLenum type, const char *header,
int pri = status ? (log_length > 1 ? MSGL_V : MSGL_DEBUG) : MSGL_ERR;
const char *typestr = type == GL_VERTEX_SHADER ? "vertex" : "fragment";
- if (mp_msg_test_log(p->log, pri)) {
+ if (mp_msg_test(p->log, pri)) {
MP_MSG(p, pri, "%s shader source:\n", typestr);
mp_log_source(p->log, pri, full_source);
}
@@ -728,7 +728,7 @@ static void link_shader(struct gl_video *p, GLuint program)
gl->GetProgramiv(program, GL_INFO_LOG_LENGTH, &log_length);
int pri = status ? (log_length > 1 ? MSGL_V : MSGL_DEBUG) : MSGL_ERR;
- if (mp_msg_test_log(p->log, pri)) {
+ if (mp_msg_test(p->log, pri)) {
GLchar *logstr = talloc_zero_size(NULL, log_length + 1);
gl->GetProgramInfoLog(program, log_length, NULL, logstr);
MP_MSG(p, pri, "shader link log (status=%d): %s\n", status, logstr);
diff --git a/video/out/vo.c b/video/out/vo.c
index 0222770131..9a98ebafb6 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -150,7 +150,7 @@ static struct vo *vo_create(struct mpv_global *global,
struct mp_log *log = mp_log_new(NULL, global->log, "vo");
struct m_obj_desc desc;
if (!m_obj_list_find(&desc, &vo_obj_list, bstr0(name))) {
- mp_msg_log(log, MSGL_ERR, "Video output %s not found!\n", name);
+ mp_msg(log, MSGL_ERR, "Video output %s not found!\n", name);
talloc_free(log);
return NULL;
};