msg: rename mp_msg_log -> mp_msg

Same for companion functions.
This commit is contained in:
wm4 2013-12-21 21:49:13 +01:00
parent eba5d025d2
commit eef36f03ea
22 changed files with 96 additions and 96 deletions

View File

@ -130,7 +130,7 @@ static struct ao *ao_create(bool probing, struct mpv_global *global,
struct mp_log *log = mp_log_new(NULL, global->log, "ao");
struct m_obj_desc desc;
if (!m_obj_list_find(&desc, &ao_obj_list, bstr0(name))) {
mp_msg_log(log, MSGL_ERR, "Audio output %s not found!\n", name);
mp_msg(log, MSGL_ERR, "Audio output %s not found!\n", name);
talloc_free(log);
return NULL;
};

View File

@ -271,7 +271,7 @@ static int init(struct ao *ao)
selected_device = p->opt_device_id;
}
if (mp_msg_test_log(ao->log, MSGL_V)) {
if (mp_msg_test(ao->log, MSGL_V)) {
char *name;
err = CA_GET_STR(selected_device, kAudioObjectPropertyName, &name);
CHECK_CA_ERROR("could not get selected audio device name");

View File

@ -57,7 +57,7 @@ bool check_ca_st(struct ao *ao, int level, OSStatus code, const char *message)
if (code == noErr) return true;
char *error_string = fourcc_repr(NULL, code);
mp_msg_log(ao->log, level, "%s (%s)\n", message, error_string);
mp_msg(ao->log, level, "%s (%s)\n", message, error_string);
talloc_free(error_string);
return false;

View File

@ -134,12 +134,12 @@ static void mp_msg_av_log_callback(void *ptr, int level, const char *fmt,
struct mp_log *log = get_av_log(ptr);
if (mp_msg_test_log(log, mp_level)) {
if (mp_msg_test(log, mp_level)) {
if (log_print_prefix)
mp_msg_log(log, mp_level, "%s: ", avc ? avc->item_name(ptr) : "?");
mp_msg(log, mp_level, "%s: ", avc ? avc->item_name(ptr) : "?");
log_print_prefix = fmt[strlen(fmt) - 1] == '\n';
mp_msg_log_va(log, mp_level, fmt, vl);
mp_msg_va(log, mp_level, fmt, vl);
}
pthread_mutex_unlock(&log_lock);
@ -184,16 +184,16 @@ void uninit_libav(struct mpv_global *global)
static void print_version(struct mp_log *log, int v, char *name,
unsigned buildv, unsigned runv)
{
mp_msg_log(log, v, " %-15s %d.%d.%d", name, V(buildv));
mp_msg(log, v, " %-15s %d.%d.%d", name, V(buildv));
if (buildv != runv)
mp_msg_log(log, v, " (runtime %d.%d.%d)", V(runv));
mp_msg_log(log, v, "\n");
mp_msg(log, v, " (runtime %d.%d.%d)", V(runv));
mp_msg(log, v, "\n");
}
#undef V
void print_libav_versions(struct mp_log *log, int v)
{
mp_msg_log(log, v, "%s library versions:\n", LIB_PREFIX);
mp_msg(log, v, "%s library versions:\n", LIB_PREFIX);
print_version(log, v, "libavutil", LIBAVUTIL_VERSION_INT, avutil_version());
print_version(log, v, "libavcodec", LIBAVCODEC_VERSION_INT, avcodec_version());

View File

@ -133,14 +133,14 @@ struct mp_decoder_list *mp_select_decoders(struct mp_decoder_list *all,
void mp_print_decoders(struct mp_log *log, int msgl, const char *header,
struct mp_decoder_list *list)
{
mp_msg_log(log, msgl, "%s\n", header);
mp_msg(log, msgl, "%s\n", header);
for (int n = 0; n < list->num_entries; n++) {
struct mp_decoder_entry *entry = &list->entries[n];
mp_msg_log(log, msgl, " %s:%s", entry->family, entry->decoder);
mp_msg(log, msgl, " %s:%s", entry->family, entry->decoder);
if (strcmp(entry->decoder, entry->codec) != 0)
mp_msg_log(log, msgl, " (%s)", entry->codec);
mp_msg_log(log, msgl, " - %s\n", entry->desc);
mp_msg(log, msgl, " (%s)", entry->codec);
mp_msg(log, msgl, " - %s\n", entry->desc);
}
if (list->num_entries == 0)
mp_msg_log(log, msgl, " (no decoders)\n");
mp_msg(log, msgl, " (no decoders)\n");
}

View File

@ -1046,7 +1046,7 @@ void encode_lavc_fail(struct encode_lavc_context *ctx, const char *format, ...)
{
va_list va;
va_start(va, format);
mp_msg_log_va(ctx->log, MSGL_ERR, format, va);
mp_msg_va(ctx->log, MSGL_ERR, format, va);
if (ctx->failed)
return;
ctx->failed = true;

View File

@ -115,7 +115,7 @@ static void update_loglevel(struct mp_log *log)
}
// Return whether the message at this verbosity level would be actually printed.
bool mp_msg_test_log(struct mp_log *log, int lev)
bool mp_msg_test(struct mp_log *log, int lev)
{
if (mp_msg_mute || !log->root)
return false;
@ -142,9 +142,9 @@ static void set_msg_color(FILE* stream, int lev)
terminal_set_foreground_color(stream, v_colors[lev]);
}
void mp_msg_log_va(struct mp_log *log, int lev, const char *format, va_list va)
void mp_msg_va(struct mp_log *log, int lev, const char *format, va_list va)
{
if (!mp_msg_test_log(log, lev))
if (!mp_msg_test(log, lev))
return; // do not display
pthread_mutex_lock(&mp_msg_lock);
@ -258,11 +258,11 @@ void mp_msg_uninit(struct mpv_global *global)
global->log = NULL;
}
void mp_msg_log(struct mp_log *log, int lev, const char *format, ...)
void mp_msg(struct mp_log *log, int lev, const char *format, ...)
{
va_list va;
va_start(va, format);
mp_msg_log_va(log, lev, format, va);
mp_msg_va(log, lev, format, va);
va_end(va);
}

View File

@ -52,25 +52,25 @@ enum {
struct mp_log *mp_log_new(void *talloc_ctx, struct mp_log *parent,
const char *name);
void mp_msg_log(struct mp_log *log, int lev, const char *format, ...)
void mp_msg(struct mp_log *log, int lev, const char *format, ...)
PRINTF_ATTRIBUTE(3, 4);
void mp_msg_log_va(struct mp_log *log, int lev, const char *format, va_list va);
void mp_msg_va(struct mp_log *log, int lev, const char *format, va_list va);
bool mp_msg_test_log(struct mp_log *log, int lev);
bool mp_msg_test(struct mp_log *log, int lev);
// Convenience macros.
#define mp_fatal(log, ...) mp_msg_log(log, MSGL_FATAL, __VA_ARGS__)
#define mp_err(log, ...) mp_msg_log(log, MSGL_ERR, __VA_ARGS__)
#define mp_warn(log, ...) mp_msg_log(log, MSGL_WARN, __VA_ARGS__)
#define mp_info(log, ...) mp_msg_log(log, MSGL_INFO, __VA_ARGS__)
#define mp_verbose(log, ...) mp_msg_log(log, MSGL_V, __VA_ARGS__)
#define mp_dbg(log, ...) mp_msg_log(log, MSGL_DEBUG, __VA_ARGS__)
#define mp_trace(log, ...) mp_msg_log(log, MSGL_TRACE, __VA_ARGS__)
#define mp_fatal(log, ...) mp_msg(log, MSGL_FATAL, __VA_ARGS__)
#define mp_err(log, ...) mp_msg(log, MSGL_ERR, __VA_ARGS__)
#define mp_warn(log, ...) mp_msg(log, MSGL_WARN, __VA_ARGS__)
#define mp_info(log, ...) mp_msg(log, MSGL_INFO, __VA_ARGS__)
#define mp_verbose(log, ...) mp_msg(log, MSGL_V, __VA_ARGS__)
#define mp_dbg(log, ...) mp_msg(log, MSGL_DEBUG, __VA_ARGS__)
#define mp_trace(log, ...) mp_msg(log, MSGL_TRACE, __VA_ARGS__)
// Convenience macros, typically called with a pointer to a context struct
// as first argument, which has a "struct mp_log log;" member.
#define MP_MSG(obj, lev, ...) mp_msg_log((obj)->log, lev, __VA_ARGS__)
#define MP_MSG(obj, lev, ...) mp_msg((obj)->log, lev, __VA_ARGS__)
#define MP_FATAL(obj, ...) MP_MSG(obj, MSGL_FATAL, __VA_ARGS__)
#define MP_ERR(obj, ...) MP_MSG(obj, MSGL_ERR, __VA_ARGS__)

View File

@ -560,13 +560,13 @@ static struct playlist *do_parse(struct stream* stream, bool forced,
if(success)
mp_verbose(log, "Playlist successfully parsed\n");
else {
mp_msg_log(log,((forced==1)?MSGL_ERR:MSGL_V),"Error while parsing playlist\n");
mp_msg(log,((forced==1)?MSGL_ERR:MSGL_V),"Error while parsing playlist\n");
talloc_free(p.pl);
p.pl = NULL;
}
if (p.pl && !p.pl->first)
mp_msg_log(log, ((forced==1)?MSGL_WARN:MSGL_V),"Warning: empty playlist\n");
mp_msg(log, ((forced==1)?MSGL_WARN:MSGL_V),"Warning: empty playlist\n");
return p.pl;
}

View File

@ -1464,7 +1464,7 @@ static mp_cmd_t *get_cmd_from_keys(struct input_ctx *ictx, char *force_section,
mp_cmd_t *ret = mp_input_parse_cmd(ictx, bstr0(cmd->cmd), cmd->location);
if (ret) {
ret->input_section = cmd->owner->section;
if (mp_msg_test_log(ictx->log, MSGL_DEBUG)) {
if (mp_msg_test(ictx->log, MSGL_DEBUG)) {
char *keyname = get_key_combo_name(keys, n);
MP_DBG(ictx, "key '%s' -> '%s' in '%s'\n",
keyname, cmd->cmd, ret->input_section);
@ -1578,7 +1578,7 @@ static void interpret_key(struct input_ctx *ictx, int code, double scale)
if (unmod >= 32 && unmod < MP_KEY_BASE)
code &= ~MP_KEY_MODIFIER_SHIFT;
if (mp_msg_test_log(ictx->log, MSGL_DEBUG)) {
if (mp_msg_test(ictx->log, MSGL_DEBUG)) {
int noflags = code & ~(MP_KEY_STATE_DOWN | MP_KEY_STATE_UP);
char *key = get_key_name(noflags, NULL);
MP_DBG(ictx, "key code=%#x '%s'%s%s\n",

View File

@ -865,29 +865,29 @@ static struct mp_resolve_result *resolve_url(const char *filename,
static void print_resolve_contents(struct mp_log *log,
struct mp_resolve_result *res)
{
mp_msg_log(log, MSGL_V, "Resolve:\n");
mp_msg_log(log, MSGL_V, " title: %s\n", res->title);
mp_msg_log(log, MSGL_V, " url: %s\n", res->url);
mp_msg(log, MSGL_V, "Resolve:\n");
mp_msg(log, MSGL_V, " title: %s\n", res->title);
mp_msg(log, MSGL_V, " url: %s\n", res->url);
for (int n = 0; n < res->num_srcs; n++) {
mp_msg_log(log, MSGL_V, " source %d:\n", n);
mp_msg(log, MSGL_V, " source %d:\n", n);
if (res->srcs[n]->url)
mp_msg_log(log, MSGL_V, " url: %s\n", res->srcs[n]->url);
mp_msg(log, MSGL_V, " url: %s\n", res->srcs[n]->url);
if (res->srcs[n]->encid)
mp_msg_log(log, MSGL_V, " encid: %s\n", res->srcs[n]->encid);
mp_msg(log, MSGL_V, " encid: %s\n", res->srcs[n]->encid);
}
for (int n = 0; n < res->num_subs; n++) {
mp_msg_log(log, MSGL_V, " subtitle %d:\n", n);
mp_msg(log, MSGL_V, " subtitle %d:\n", n);
if (res->subs[n]->url)
mp_msg_log(log, MSGL_V, " url: %s\n", res->subs[n]->url);
mp_msg(log, MSGL_V, " url: %s\n", res->subs[n]->url);
if (res->subs[n]->lang)
mp_msg_log(log, MSGL_V, " lang: %s\n", res->subs[n]->lang);
mp_msg(log, MSGL_V, " lang: %s\n", res->subs[n]->lang);
if (res->subs[n]->data) {
mp_msg_log(log, MSGL_V, " data: %zd bytes\n",
mp_msg(log, MSGL_V, " data: %zd bytes\n",
strlen(res->subs[n]->data));
}
}
if (res->playlist) {
mp_msg_log(log, MSGL_V, " playlist with %d entries\n",
mp_msg(log, MSGL_V, " playlist with %d entries\n",
playlist_entry_count(res->playlist));
}
}

View File

@ -287,10 +287,10 @@ static int script_log(lua_State *L)
const char *s = lua_tostring(L, -1);
if (s == NULL)
return luaL_error(L, "Invalid argument");
mp_msg_log(ctx->log, msgl, "%s%s", s, i > 0 ? " " : "");
mp_msg(ctx->log, msgl, "%s%s", s, i > 0 ? " " : "");
lua_pop(L, 1); // args... tostring
}
mp_msg_log(ctx->log, msgl, "\n");
mp_msg(ctx->log, msgl, "\n");
return 0;
}

View File

@ -97,10 +97,10 @@ const char mp_help_text[] =
void mp_print_version(struct mp_log *log, int always)
{
int v = always ? MSGL_INFO : MSGL_V;
mp_msg_log(log, v,
mp_msg(log, v,
"%s (C) 2000-2013 mpv/MPlayer/mplayer2 projects\n built on %s\n", mplayer_version, mplayer_builddate);
print_libav_versions(log, v);
mp_msg_log(log, v, "\n");
mp_msg(log, v, "\n");
}
static MP_NORETURN void exit_player(struct MPContext *mpctx,

View File

@ -118,7 +118,7 @@ int ai_alsa_setup(audio_in_t *ai)
return -1;
}
if (mp_msg_test_log(ai->log, MSGL_V)) {
if (mp_msg_test(ai->log, MSGL_V)) {
snd_pcm_dump(ai->alsa.handle, ai->alsa.log);
}
@ -181,7 +181,7 @@ int ai_alsa_xrun(audio_in_t *ai)
timersub(&now, &tstamp, &diff);
MP_ERR(ai, "ALSA xrun!!! (at least %.3f ms long)\n",
diff.tv_sec * 1000 + diff.tv_usec / 1000.0);
if (mp_msg_test_log(ai->log, MSGL_V)) {
if (mp_msg_test(ai->log, MSGL_V)) {
MP_ERR(ai, "ALSA Status:\n");
snd_pcm_status_dump(status, ai->alsa.log);
}

View File

@ -811,7 +811,7 @@ static int open_s(stream_t *stream, int mode)
return STREAM_UNSUPPORTED;
}
tt_srpt = vmg_file->tt_srpt;
if (mp_msg_test_log(stream->log, MSGL_SMODE))
if (mp_msg_test(stream->log, MSGL_SMODE))
{
int title_no; ///< title number
MP_SMODE(stream, "ID_DVD_TITLES=%d\n", tt_srpt->nr_of_srpts);
@ -821,7 +821,7 @@ static int open_s(stream_t *stream, int mode)
MP_SMODE(stream, "ID_DVD_TITLE_%d_ANGLES=%d\n", title_no + 1, tt_srpt->title[title_no].nr_of_angles);
}
}
if (mp_msg_test_log(stream->log, MSGL_SMODE))
if (mp_msg_test(stream->log, MSGL_SMODE))
{
char volid[32];
unsigned char discid [16]; ///< disk ID, a 128 bit MD5 sum

View File

@ -219,9 +219,9 @@ static void message_callback(int level, const char *format, va_list va, void *ct
if (!log)
return;
level = map_ass_level[level];
mp_msg_log_va(log, level, format, va);
mp_msg_va(log, level, format, va);
// libass messages lack trailing \n
mp_msg_log(log, level, "\n");
mp_msg(log, level, "\n");
}
ASS_Library *mp_ass_init(struct mpv_global *global, struct mp_log *log)

View File

@ -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,

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
};