From 7dc7b900c622235d595337c988a0c75280084b7c Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 16 Dec 2013 20:40:02 +0100 Subject: Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsg The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless. --- audio/decode/ad_lavc.c | 10 ++--- audio/decode/dec_audio.c | 10 ++--- audio/filter/af.c | 2 +- audio/filter/af_ladspa.c | 4 +- audio/filter/af_lavcac3enc.c | 6 +-- audio/mixer.c | 10 ++--- audio/out/ao.c | 4 +- demux/demux.c | 18 ++++----- demux/demux_libass.c | 2 +- demux/demux_mkv.c | 28 ++++++------- mpvcore/input/joystick.c | 18 ++++----- mpvcore/input/lirc.c | 6 +-- mpvcore/m_config.c | 28 ++++++------- mpvcore/m_option.c | 15 +++---- mpvcore/m_property.c | 4 +- mpvcore/mp_msg.h | 6 +-- mpvcore/parser-mpcmd.c | 10 ++--- mpvcore/player/command.c | 24 +++++------ mpvcore/player/configfiles.c | 8 ++-- mpvcore/player/main.c | 2 +- mpvcore/player/mp_core.h | 2 - mpvcore/player/osd.c | 13 +----- mpvcore/player/playloop.c | 6 +-- mpvcore/player/screenshot.c | 2 +- mpvcore/player/sub.c | 4 +- osdep/priority.c | 2 +- stream/ai_alsa1x.c | 32 +++++++-------- stream/ai_oss.c | 20 +++++----- stream/audio_in.c | 12 +++--- stream/cache.c | 4 +- stream/cdinfo.c | 6 +-- stream/stream.c | 22 +++++------ stream/stream_bluray.c | 6 +-- stream/stream_cdda.c | 6 +-- stream/stream_dvd.c | 38 +++++++++--------- stream/stream_dvd_common.c | 10 ++--- stream/stream_dvdnav.c | 2 +- stream/stream_file.c | 6 +-- stream/stream_radio.c | 94 ++++++++++++++++++++++---------------------- stream/stream_smb.c | 4 +- stream/stream_vcd.c | 8 ++-- stream/tv.c | 62 ++++++++++++++--------------- stream/tvi_v4l2.c | 2 +- sub/sd_srt.c | 4 +- video/decode/dec_video.c | 18 ++++----- video/decode/vd_lavc.c | 22 +++++------ video/filter/vf.c | 8 ++-- video/filter/vf_crop.c | 2 +- video/out/x11_common.c | 2 +- 49 files changed, 309 insertions(+), 325 deletions(-) diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c index 1ff8769cd7..f972bc581f 100644 --- a/audio/decode/ad_lavc.c +++ b/audio/decode/ad_lavc.c @@ -144,7 +144,7 @@ static int setup_format(struct dec_audio *da) // If not set, try container samplerate. // (Maybe this can't happen, and it's an artifact from the past.) da->decoded.rate = sh_audio->wf->nSamplesPerSec; - mp_tmsg(MSGT_DECAUDIO, MSGL_WARN, "ad_lavc: using container rate.\n"); + mp_msg(MSGT_DECAUDIO, MSGL_WARN, "ad_lavc: using container rate.\n"); } struct mp_chmap lavc_chmap; @@ -198,7 +198,7 @@ static int init(struct dec_audio *da, const char *decoder) lavc_codec = avcodec_find_decoder_by_name(decoder); if (!lavc_codec) { - mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, + mp_msg(MSGT_DECAUDIO, MSGL_ERR, "Cannot find codec '%s' in libavcodec...\n", decoder); uninit(da); return 0; @@ -254,7 +254,7 @@ static int init(struct dec_audio *da, const char *decoder) /* open it */ if (avcodec_open2(lavc_context, lavc_codec, NULL) < 0) { - mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, "Could not open codec.\n"); + mp_msg(MSGT_DECAUDIO, MSGL_ERR, "Could not open codec.\n"); uninit(da); return 0; } @@ -293,7 +293,7 @@ static void uninit(struct dec_audio *da) if (lavc_context) { if (avcodec_close(lavc_context) < 0) - mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Could not close codec.\n"); + mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Could not close codec.\n"); av_freep(&lavc_context->extradata); av_freep(&lavc_context); } @@ -378,7 +378,7 @@ static int decode_new_packet(struct dec_audio *da) da->pts_offset = 0; } - mp_dbg(MSGT_DECAUDIO, MSGL_DBG2, "Decoded %d -> %d samples\n", in_len, + mp_msg(MSGT_DECAUDIO, MSGL_DBG2, "Decoded %d -> %d samples\n", in_len, priv->frame.samples); return 0; } diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c index 6f07b4729d..1c34c6abe9 100644 --- a/audio/decode/dec_audio.c +++ b/audio/decode/dec_audio.c @@ -80,7 +80,7 @@ static bool reinit_audio_buffer(struct dec_audio *da) static void uninit_decoder(struct dec_audio *d_audio) { if (d_audio->ad_driver) { - mp_tmsg(MSGT_DECAUDIO, MSGL_V, "Uninit audio decoder.\n"); + mp_msg(MSGT_DECAUDIO, MSGL_V, "Uninit audio decoder.\n"); d_audio->ad_driver->uninit(d_audio); } d_audio->ad_driver = NULL; @@ -91,7 +91,7 @@ static void uninit_decoder(struct dec_audio *d_audio) static int init_audio_codec(struct dec_audio *d_audio, const char *decoder) { if (!d_audio->ad_driver->init(d_audio, decoder)) { - mp_tmsg(MSGT_DECAUDIO, MSGL_V, "Audio decoder init failed.\n"); + mp_msg(MSGT_DECAUDIO, MSGL_V, "Audio decoder init failed.\n"); d_audio->ad_driver = NULL; uninit_decoder(d_audio); return 0; @@ -148,14 +148,14 @@ int audio_init_best_codec(struct dec_audio *d_audio, char *audio_decoders) const struct ad_functions *driver = find_driver(sel->family); if (!driver) continue; - mp_tmsg(MSGT_DECAUDIO, MSGL_V, "Opening audio decoder %s:%s\n", + mp_msg(MSGT_DECAUDIO, MSGL_V, "Opening audio decoder %s:%s\n", sel->family, sel->decoder); d_audio->ad_driver = driver; if (init_audio_codec(d_audio, sel->decoder)) { decoder = sel; break; } - mp_tmsg(MSGT_DECAUDIO, MSGL_WARN, "Audio decoder init failed for " + mp_msg(MSGT_DECAUDIO, MSGL_WARN, "Audio decoder init failed for " "%s:%s\n", sel->family, sel->decoder); } @@ -218,7 +218,7 @@ int audio_init_filters(struct dec_audio *d_audio, int in_samplerate, char *s_from = mp_audio_config_to_str(&afs->input); char *s_to = mp_audio_config_to_str(&afs->output); - mp_tmsg(MSGT_DECAUDIO, MSGL_V, + mp_msg(MSGT_DECAUDIO, MSGL_V, "Building audio filter chain for %s -> %s...\n", s_from, s_to); talloc_free(s_from); talloc_free(s_to); diff --git a/audio/filter/af.c b/audio/filter/af.c index f37081c75a..e2f712d09e 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -177,7 +177,7 @@ static struct af_instance *af_create(struct af_stream *s, char *name, { struct m_obj_desc desc; if (!m_obj_list_find(&desc, &af_obj_list, bstr0(name))) { - mp_tmsg(MSGT_VFILTER, MSGL_ERR, + mp_msg(MSGT_VFILTER, MSGL_ERR, "Couldn't find audio filter '%s'.\n", name); return NULL; } diff --git a/audio/filter/af_ladspa.c b/audio/filter/af_ladspa.c index 3a05ced3cd..2b8066e9a7 100644 --- a/audio/filter/af_ladspa.c +++ b/audio/filter/af_ladspa.c @@ -818,13 +818,13 @@ static int af_open(struct af_instance *af) { if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor) && val < hint.LowerBound) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is below lower boundary of %0.4f.\n", + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is below lower boundary of %0.4f.\n", setup->myname, i, hint.LowerBound); return AF_ERROR; } if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor) && val > hint.UpperBound) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is above upper boundary of %0.4f.\n", + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is above upper boundary of %0.4f.\n", setup->myname, i, hint.UpperBound); return AF_ERROR; } diff --git a/audio/filter/af_lavcac3enc.c b/audio/filter/af_lavcac3enc.c index a27418f2f7..4331122299 100644 --- a/audio/filter/af_lavcac3enc.c +++ b/audio/filter/af_lavcac3enc.c @@ -121,7 +121,7 @@ static int control(struct af_instance *af, int cmd, void *arg) s->lavc_actx->bit_rate = bit_rate; if (avcodec_open2(s->lavc_actx, s->lavc_acodec, NULL) < 0) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Couldn't open codec %s, br=%d.\n", "ac3", bit_rate); + mp_msg(MSGT_AFILTER, MSGL_ERR, "Couldn't open codec %s, br=%d.\n", "ac3", bit_rate); return AF_ERROR; } } @@ -257,13 +257,13 @@ static int af_open(struct af_instance* af){ s->lavc_acodec = avcodec_find_encoder_by_name("ac3"); if (!s->lavc_acodec) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't find encoder for codec %s.\n", "ac3"); + mp_msg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't find encoder for codec %s.\n", "ac3"); return AF_ERROR; } s->lavc_actx = avcodec_alloc_context3(s->lavc_acodec); if (!s->lavc_actx) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't allocate context!\n"); + mp_msg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't allocate context!\n"); return AF_ERROR; } const enum AVSampleFormat *fmts = s->lavc_acodec->sample_fmts; diff --git a/audio/mixer.c b/audio/mixer.c index cc2bd8964d..0972b80533 100644 --- a/audio/mixer.c +++ b/audio/mixer.c @@ -113,16 +113,16 @@ static void setvolume_internal(struct mixer *mixer, float l, float r) struct ao_control_vol vol = {.left = l, .right = r}; if (!mixer->softvol) { if (ao_control(mixer->ao, AOCONTROL_SET_VOLUME, &vol) != CONTROL_OK) - mp_tmsg(MSGT_GLOBAL, MSGL_ERR, + mp_msg(MSGT_GLOBAL, MSGL_ERR, "[Mixer] Failed to change audio output volume.\n"); return; } float gain = (l + r) / 2.0 / 100.0 * mixer->opts->softvol_max / 100.0; if (!af_control_any_rev(mixer->af, AF_CONTROL_SET_VOLUME, &gain)) { - mp_tmsg(MSGT_GLOBAL, MSGL_V, "[Mixer] Inserting volume filter.\n"); + mp_msg(MSGT_GLOBAL, MSGL_V, "[Mixer] Inserting volume filter.\n"); if (!(af_add(mixer->af, "volume", NULL) && af_control_any_rev(mixer->af, AF_CONTROL_SET_VOLUME, &gain))) - mp_tmsg(MSGT_GLOBAL, MSGL_ERR, + mp_msg(MSGT_GLOBAL, MSGL_ERR, "[Mixer] No volume control available.\n"); } } @@ -223,7 +223,7 @@ void mixer_setbalance(struct mixer *mixer, float val) return; if (!(af_pan_balance = af_add(mixer->af, "pan", NULL))) { - mp_tmsg(MSGT_GLOBAL, MSGL_ERR, + mp_msg(MSGT_GLOBAL, MSGL_ERR, "[Mixer] No balance control available.\n"); return; } @@ -264,7 +264,7 @@ static void probe_softvol(struct mixer *mixer) ao_control_vol_t vol; if (ao_control(mixer->ao, AOCONTROL_GET_VOLUME, &vol) != CONTROL_OK) { mixer->softvol = true; - mp_tmsg(MSGT_GLOBAL, MSGL_WARN, + mp_msg(MSGT_GLOBAL, MSGL_WARN, "[mixer] Hardware volume control unavailable.\n"); } } diff --git a/audio/out/ao.c b/audio/out/ao.c index 562689c80b..9c09730ec8 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -181,14 +181,14 @@ struct ao *ao_init_best(struct mpv_global *global, for (int n = 0; ao_list[n].name; n++) { if (strlen(ao_list[n].name) == 0) goto autoprobe; - mp_tmsg(MSGT_AO, MSGL_V, "Trying preferred audio driver '%s'\n", + mp_msg(MSGT_AO, MSGL_V, "Trying preferred audio driver '%s'\n", ao_list[n].name); struct ao *ao = ao_create(false, global, input_ctx, encode_lavc_ctx, samplerate, format, channels, ao_list[n].name, ao_list[n].attribs); if (ao) return ao; - mp_tmsg(MSGT_AO, MSGL_WARN, "Failed to initialize audio driver '%s'\n", + mp_msg(MSGT_AO, MSGL_WARN, "Failed to initialize audio driver '%s'\n", ao_list[n].name); } return NULL; diff --git a/demux/demux.c b/demux/demux.c index 1e395a94d1..7ae9328e3b 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -355,7 +355,7 @@ int demuxer_add_packet(demuxer_t *demuxer, struct sh_stream *stream, if (stream->type != STREAM_VIDEO && dp->pts == MP_NOPTS_VALUE) dp->pts = dp->dts; - mp_dbg(MSGT_DEMUXER, MSGL_DBG2, + mp_msg(MSGT_DEMUXER, MSGL_DBG2, "DEMUX: Append packet to %s, len=%d pts=%5.3f pos=%"PRIu64" " "[packs: A=%d V=%d S=%d]\n", stream_type_name(stream->type), dp->len, dp->pts, dp->pos, count_packs(demuxer, STREAM_AUDIO), @@ -375,13 +375,13 @@ static bool demux_check_queue_full(demuxer_t *demux) overflow: if (!demux->warned_queue_overflow) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many packets in the demuxer " + mp_msg(MSGT_DEMUXER, MSGL_ERR, "\nToo many packets in the demuxer " "packet queue (video: %d packets in %d bytes, audio: %d " "packets in %d bytes, sub: %d packets in %d bytes).\n", count_packs(demux, STREAM_VIDEO), count_bytes(demux, STREAM_VIDEO), count_packs(demux, STREAM_AUDIO), count_bytes(demux, STREAM_AUDIO), count_packs(demux, STREAM_SUB), count_bytes(demux, STREAM_SUB)); - mp_tmsg(MSGT_DEMUXER, MSGL_HINT, "Maybe you are playing a non-" + mp_msg(MSGT_DEMUXER, MSGL_HINT, "Maybe you are playing a non-" "interleaved stream/file or the codec failed?\n"); } demux->warned_queue_overflow = true; @@ -401,7 +401,7 @@ static void ds_get_packets(struct sh_stream *sh) { struct demux_stream *ds = sh->ds; demuxer_t *demux = sh->demuxer; - mp_dbg(MSGT_DEMUXER, MSGL_DBG3, "ds_get_packets (%s) called\n", + mp_msg(MSGT_DEMUXER, MSGL_DBG3, "ds_get_packets (%s) called\n", stream_type_name(sh->type)); while (1) { if (ds->head) @@ -532,10 +532,10 @@ static struct demuxer *open_given_type(struct MPOpts *opts, if (ret >= 0) { demuxer->params = NULL; if (demuxer->filetype) - mp_tmsg(MSGT_DEMUXER, MSGL_INFO, "Detected file format: %s (%s)\n", + mp_msg(MSGT_DEMUXER, MSGL_INFO, "Detected file format: %s (%s)\n", demuxer->filetype, desc->desc); else - mp_tmsg(MSGT_DEMUXER, MSGL_INFO, "Detected file format: %s\n", + mp_msg(MSGT_DEMUXER, MSGL_INFO, "Detected file format: %s\n", desc->desc); if (stream_manages_timeline(demuxer->stream)) { // Incorrect, but fixes some behavior with DVD/BD @@ -622,7 +622,7 @@ void demux_flush(demuxer_t *demuxer) int demux_seek(demuxer_t *demuxer, float rel_seek_secs, int flags) { if (!demuxer->seekable) { - mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "Cannot seek in this file.\n"); + mp_msg(MSGT_DEMUXER, MSGL_WARN, "Cannot seek in this file.\n"); return 0; } @@ -718,7 +718,7 @@ int demux_info_add_bstr(demuxer_t *demuxer, struct bstr opt, struct bstr param) if (oldval) { if (bstrcmp0(param, oldval) == 0) return 0; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Demuxer info %.*s changed to %.*s\n", + mp_msg(MSGT_DEMUX, MSGL_INFO, "Demuxer info %.*s changed to %.*s\n", BSTR_P(opt), BSTR_P(param)); } @@ -734,7 +734,7 @@ int demux_info_print(demuxer_t *demuxer) if (!info || !info->num_keys) return 0; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Clip info:\n"); + mp_msg(MSGT_DEMUX, MSGL_INFO, "Clip info:\n"); for (n = 0; n < info->num_keys; n++) { mp_msg(MSGT_DEMUX, MSGL_INFO, " %s: %s\n", info->keys[n], info->values[n]); diff --git a/demux/demux_libass.c b/demux/demux_libass.c index 73c8b3a5c8..f304757ae3 100644 --- a/demux/demux_libass.c +++ b/demux/demux_libass.c @@ -73,7 +73,7 @@ static int d_check_file(struct demuxer *demuxer, enum demux_check check) bstr buf = stream_read_complete(s, NULL, 100000000); if (!buf.start) { - mp_tmsg(MSGT_ASS, MSGL_ERR, "Refusing to load subtitle file " + mp_msg(MSGT_ASS, MSGL_ERR, "Refusing to load subtitle file " "larger than 100 MB: %s\n", demuxer->filename); return -1; } diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index 5f1e2a5c0a..94af8bf6b9 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -278,7 +278,7 @@ static bstr demux_mkv_decode(mkv_track_t *track, bstr data, uint32_t type) zstream.zfree = (free_func) 0; zstream.opaque = (voidpf) 0; if (inflateInit(&zstream) != Z_OK) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] zlib initialization failed.\n"); goto error; } @@ -294,7 +294,7 @@ static bstr demux_mkv_decode(mkv_track_t *track, bstr data, uint32_t type) zstream.next_out = (Bytef *) (dest + zstream.total_out); result = inflate(&zstream, Z_NO_FLUSH); if (result != Z_OK && result != Z_STREAM_END) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] zlib decompression failed.\n"); talloc_free(dest); dest = NULL; @@ -323,7 +323,7 @@ static bstr demux_mkv_decode(mkv_track_t *track, bstr data, uint32_t type) if (result == 0) break; if (!(result & AV_LZO_OUTPUT_FULL)) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] lzo decompression failed.\n"); talloc_free(dest); dest = NULL; @@ -400,7 +400,7 @@ static int demux_mkv_read_info(demuxer_t *demuxer) } } } - mp_tmsg(MSGT_DEMUX, MSGL_INFO, + mp_msg(MSGT_DEMUX, MSGL_INFO, "[mkv] This is not one of the wanted files. " "Stopping attempt to open.\n"); res = -2; @@ -439,18 +439,18 @@ static void parse_trackencodings(struct demuxer *demuxer, } if (e.type == 1) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, "[mkv] Track " + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Track " "number %u has been encrypted and " "decryption has not yet been\n" "[mkv] implemented. Skipping track.\n", track->tnum); } else if (e.type != 0) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown content encoding type for " "track %u. Skipping track.\n", track->tnum); } else if (e.comp_algo != 0 && e.comp_algo != 2 && e.comp_algo != 3) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Track %u has been compressed with " "an unknown/unsupported compression\n" "[mkv] algorithm (%" PRIu64 "). Skipping track.\n", @@ -458,7 +458,7 @@ static void parse_trackencodings(struct demuxer *demuxer, } #if !HAVE_ZLIB else if (e.comp_algo == 0) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Track %u was compressed with zlib " "but mpv has not been compiled\n" "[mkv] with support for zlib compression. " @@ -1171,12 +1171,12 @@ static void display_create_tracks(demuxer_t *demuxer) break; } if (mkv_d->tracks[i]->name) - mp_tmsg(MSGT_DEMUX, MSGL_V, + mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] Track ID %u: %s (%s) \"%s\"\n", mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id, mkv_d->tracks[i]->name); else - mp_tmsg(MSGT_DEMUX, MSGL_V, "[mkv] Track ID %u: %s (%s)\n", + mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] Track ID %u: %s (%s)\n", mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id); } } @@ -1286,7 +1286,7 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track) extradata_size = track->private_size; } if (!vi->id) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported " + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported " "CodecID (%s) or missing/bad CodecPrivate\n" "[mkv] data (track %u).\n", track->codec_id, track->tnum); @@ -1652,7 +1652,7 @@ static int demux_mkv_open_audio(demuxer_t *demuxer, mkv_track_t *track) return 0; error: - mp_tmsg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported audio " + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported audio " "codec ID '%s' for track %u or missing/faulty\n[mkv] " "private codec data.\n", track->codec_id, track->tnum); return 1; @@ -1707,7 +1707,7 @@ static int demux_mkv_open_sub(demuxer_t *demuxer, mkv_track_t *track) sh->default_track = track->default_track; if (!subtitle_type) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, + mp_msg(MSGT_DEMUX, MSGL_ERR, "[mkv] Subtitle type '%s' is not supported.\n", track->codec_id); } @@ -1829,7 +1829,7 @@ static int demux_mkv_open(demuxer_t *demuxer, enum demux_check check) while (1) { uint32_t id = ebml_read_id(s, NULL); if (s->eof) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, + mp_msg(MSGT_DEMUX, MSGL_WARN, "[mkv] Unexpected end of file (no clusters found)\n"); break; } diff --git a/mpvcore/input/joystick.c b/mpvcore/input/joystick.c index 2ab38f6311..d8e9d13423 100644 --- a/mpvcore/input/joystick.c +++ b/mpvcore/input/joystick.c @@ -51,11 +51,11 @@ int mp_input_joystick_init(char* dev) { int initialized = 0; struct js_event ev; - mp_tmsg(MSGT_INPUT,MSGL_V,"Opening joystick device %s\n",dev ? dev : JS_DEV); + mp_msg(MSGT_INPUT,MSGL_V,"Opening joystick device %s\n",dev ? dev : JS_DEV); fd = open( dev ? dev : JS_DEV , O_RDONLY | O_NONBLOCK ); if(fd < 0) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,"Can't open joystick device %s: %s\n",dev ? dev : JS_DEV,strerror(errno)); + mp_msg(MSGT_INPUT,MSGL_ERR,"Can't open joystick device %s: %s\n",dev ? dev : JS_DEV,strerror(errno)); return -1; } @@ -70,7 +70,7 @@ int mp_input_joystick_init(char* dev) { initialized = 1; break; } - mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno)); + mp_msg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno)); close(fd); return -1; } @@ -78,7 +78,7 @@ int mp_input_joystick_init(char* dev) { } if((unsigned int)l < sizeof(struct js_event)) { if(l > 0) - mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l); + mp_msg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l); break; } if(ev.type == JS_EVENT_BUTTON) @@ -102,9 +102,9 @@ int mp_input_joystick_read(void *ctx, int fd) { else if(errno == EAGAIN) return MP_INPUT_NOTHING; if( r < 0) - mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno)); + mp_msg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno)); else - mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n","EOF"); + mp_msg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n","EOF"); return MP_INPUT_DEAD; } l += r; @@ -112,12 +112,12 @@ int mp_input_joystick_read(void *ctx, int fd) { if((unsigned int)l < sizeof(struct js_event)) { if(l > 0) - mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l); + mp_msg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l); return MP_INPUT_NOTHING; } if(ev.type & JS_EVENT_INIT) { - mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: warning init event, we have lost sync with driver.\n"); + mp_msg(MSGT_INPUT,MSGL_WARN,"Joystick: warning init event, we have lost sync with driver.\n"); ev.type &= ~JS_EVENT_INIT; if(ev.type == JS_EVENT_BUTTON) { int s = (btns >> ev.number) & 1; @@ -154,7 +154,7 @@ int mp_input_joystick_read(void *ctx, int fd) { } else return MP_INPUT_NOTHING; } else { - mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick warning unknown event type %d\n",ev.type); + mp_msg(MSGT_INPUT,MSGL_WARN,"Joystick warning unknown event type %d\n",ev.type); return MP_INPUT_ERROR; } diff --git a/mpvcore/input/lirc.c b/mpvcore/input/lirc.c index 059d548f95..052fffbd74 100644 --- a/mpvcore/input/lirc.c +++ b/mpvcore/input/lirc.c @@ -40,9 +40,9 @@ mp_input_lirc_init(void) { int lirc_sock; int mode; - mp_tmsg(MSGT_LIRC,MSGL_V,"Setting up LIRC support...\n"); + mp_msg(MSGT_LIRC,MSGL_V,"Setting up LIRC support...\n"); if((lirc_sock=lirc_init("mpv",0))==-1){ - mp_tmsg(MSGT_LIRC,MSGL_V,"Failed to open LIRC support. You will not be able to use your remote control.\n"); + mp_msg(MSGT_LIRC,MSGL_V,"Failed to open LIRC support. You will not be able to use your remote control.\n"); return -1; } @@ -55,7 +55,7 @@ mp_input_lirc_init(void) { } if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){ - mp_tmsg(MSGT_LIRC,MSGL_ERR,"Failed to read LIRC config file %s.\n", + mp_msg(MSGT_LIRC,MSGL_ERR,"Failed to read LIRC config file %s.\n", lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile); lirc_deinit(); return -1; diff --git a/mpvcore/m_config.c b/mpvcore/m_config.c index 851b54489e..203796055f 100644 --- a/mpvcore/m_config.c +++ b/mpvcore/m_config.c @@ -75,11 +75,11 @@ static int parse_profile(struct m_config *config, const struct m_option *opt, if (!bstrcmp0(param, "help")) { struct m_profile *p; if (!config->profiles) { - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, + mp_msg(MSGT_CFGPARSER, MSGL_INFO, "No profiles have been defined.\n"); return M_OPT_EXIT - 1; } - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "Available profiles:\n"); + mp_msg(MSGT_CFGPARSER, MSGL_INFO, "Available profiles:\n"); for (p = config->profiles; p; p = p->next) mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\t%s\t%s\n", p->name, p->desc ? p->desc : ""); @@ -96,7 +96,7 @@ static int parse_profile(struct m_config *config, const struct m_option *opt, for (int i = 0; list[i]; i++) { struct m_profile *p = m_config_get_profile0(config, list[i]); if (!p) { - mp_tmsg(MSGT_CFGPARSER, MSGL_WARN, "Unknown profile '%s'.\n", + mp_msg(MSGT_CFGPARSER, MSGL_WARN, "Unknown profile '%s'.\n", list[i]); r = M_OPT_INVALID; } else if (set) @@ -113,12 +113,12 @@ static int show_profile(struct m_config *config, bstr param) if (!param.len) return M_OPT_MISSING_PARAM; if (!(p = m_config_get_profile(config, param))) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Unknown profile '%.*s'.\n", + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Unknown profile '%.*s'.\n", BSTR_P(param)); return M_OPT_EXIT - 1; } if (!config->profile_depth) - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "Profile %s: %s\n", p->name, + mp_msg(MSGT_CFGPARSER, MSGL_INFO, "Profile %s: %s\n", p->name, p->desc ? p->desc : ""); config->profile_depth++; for (i = 0; i < p->num_opts; i++) { @@ -284,7 +284,7 @@ void m_config_backup_opt(struct m_config *config, const char *opt) if (co) { ensure_backup(config, co); } else { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Option %s not found.\n", opt); + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s not found.\n", opt); } } @@ -496,14 +496,14 @@ static int m_config_parse_option(struct m_config *config, struct bstr name, // Check if this option isn't forbidden in the current mode if ((flags & M_SETOPT_FROM_CONFIG_FILE) && (co->opt->flags & M_OPT_NOCFG)) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %.*s option can't be used in a config file.\n", BSTR_P(name)); return M_OPT_INVALID; } if (flags & M_SETOPT_BACKUP) { if (co->opt->flags & M_OPT_GLOBAL) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %.*s option is global and can't be set per-file.\n", BSTR_P(name)); return M_OPT_INVALID; @@ -563,7 +563,7 @@ static int parse_subopts(struct m_config *config, char *name, char *prefix, r = m_config_parse_option(config,bstr0(n), bstr0(lst[2 * i + 1]), flags); if (r < 0) { if (r > M_OPT_EXIT) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing suboption %s/%s (%s)\n", name, lst[2 * i], m_option_strerror(r)); r = M_OPT_INVALID; @@ -582,7 +582,7 @@ int m_config_parse_suboptions(struct m_config *config, char *name, return 0; int r = parse_subopts(config, name, "", bstr0(subopts), 0); if (r < 0 && r > M_OPT_EXIT) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing suboption %s (%s)\n", + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing suboption %s (%s)\n", name, m_option_strerror(r)); r = M_OPT_INVALID; } @@ -594,7 +594,7 @@ int m_config_set_option_ext(struct m_config *config, struct bstr name, { int r = m_config_parse_option(config, name, param, flags); if (r < 0 && r > M_OPT_EXIT) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing option %.*s (%s)\n", + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing option %.*s (%s)\n", BSTR_P(name), m_option_strerror(r)); r = M_OPT_INVALID; } @@ -633,7 +633,7 @@ void m_config_print_option_list(const struct m_config *config) int count = 0; const char *prefix = config->is_toplevel ? "--" : ""; - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "Options:\n\n"); + mp_msg(MSGT_CFGPARSER, MSGL_INFO, "Options:\n\n"); for (int i = 0; i < config->num_opts; i++) { struct m_config_option *co = &config->opts[i]; const struct m_option *opt = co->opt; @@ -675,7 +675,7 @@ void m_config_print_option_list(const struct m_config *config) mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\n"); count++; } - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d options\n", count); + mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d options\n", count); } struct m_profile *m_config_get_profile(const struct m_config *config, bstr name) @@ -731,7 +731,7 @@ void m_config_set_profile(struct m_config *config, struct m_profile *p, int flags) { if (config->profile_depth > MAX_PROFILE_DEPTH) { - mp_tmsg(MSGT_CFGPARSER, MSGL_WARN, + mp_msg(MSGT_CFGPARSER, MSGL_WARN, "WARNING: Profile inclusion too deep.\n"); return; } diff --git a/mpvcore/m_option.c b/mpvcore/m_option.c index 066500cd71..85ac974861 100644 --- a/mpvcore/m_option.c +++ b/mpvcore/m_option.c @@ -45,18 +45,18 @@ char *m_option_strerror(int code) { switch (code) { case M_OPT_UNKNOWN: - return mp_gtext("option not found"); + return "option not found"; case M_OPT_MISSING_PARAM: - return mp_gtext("option requires parameter"); + return "option requires parameter"; case M_OPT_INVALID: - return mp_gtext("option parameter could not be parsed"); + return "option parameter could not be parsed"; case M_OPT_OUT_OF_RANGE: - return mp_gtext("parameter is outside values allowed for option"); + return "parameter is outside values allowed for option"; case M_OPT_DISALLOW_PARAM: - return mp_gtext("option doesn't take a parameter"); + return "option doesn't take a parameter"; case M_OPT_PARSER_ERR: default: - return mp_gtext("parser error"); + return "parser error"; } } @@ -1161,7 +1161,8 @@ static int parse_print(const m_option_t *opt, struct bstr name, struct bstr param, void *dst) { if (opt->type == CONF_TYPE_PRINT) { - mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", mp_gtext(opt->p)); + const char *msg = opt->p; + mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", msg); } else { char *name0 = bstrdup0(NULL, name); char *param0 = bstrdup0(NULL, param); diff --git a/mpvcore/m_property.c b/mpvcore/m_property.c index 4ae33c9d1e..aba9ca4ec8 100644 --- a/mpvcore/m_property.c +++ b/mpvcore/m_property.c @@ -306,7 +306,7 @@ void m_properties_print_help_list(const m_option_t *list) char min[50], max[50]; int i, count = 0; - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, + mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\n Name Type Min Max\n\n"); for (i = 0; list[i].name; i++) { const m_option_t *opt = &list[i]; @@ -326,7 +326,7 @@ void m_properties_print_help_list(const m_option_t *list) max); count++; } - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d properties\n", count); + mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d properties\n", count); } int m_property_int_ro(const m_option_t *prop, int action, diff --git a/mpvcore/mp_msg.h b/mpvcore/mp_msg.h index 306b8145e1..976ed5e3f8 100644 --- a/mpvcore/mp_msg.h +++ b/mpvcore/mp_msg.h @@ -137,13 +137,9 @@ bool mp_msg_test_log(struct mp_log *log, int lev); #include "config.h" #include "mpvcore/mp_common.h" -#define mp_gtext(x) ((char*)(x)) - // Note: using mp_msg_log or the MP_ERR/... macros is preferred. void mp_msg_va(int mod, int lev, const char *format, va_list va); void mp_msg(int mod, int lev, const char *format, ... ) PRINTF_ATTRIBUTE(3, 4); -#define mp_tmsg mp_msg -#define mp_dbg mp_msg struct mp_log *mp_log_new(void *talloc_ctx, struct mp_log *parent, const char *name); @@ -170,7 +166,7 @@ void mp_msg_log(struct mp_log *log, int lev, const char *format, ...) #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_DBG2, __VA_ARGS__) +#define mp_dbg(log, ...) mp_msg_log(log, MSGL_DBG2, __VA_ARGS__) #define mp_trace(log, ...) mp_msg_log(log, MSGL_DBG5, __VA_ARGS__) struct mpv_global; diff --git a/mpvcore/parser-mpcmd.c b/mpvcore/parser-mpcmd.c index 6890e94fe0..97398954cc 100644 --- a/mpvcore/parser-mpcmd.c +++ b/mpvcore/parser-mpcmd.c @@ -104,7 +104,7 @@ static bool split_opt(struct parse_state *p) return r == 0; p->error = true; - mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL, + mp_msg(MSGT_CFGPARSER, MSGL_FATAL, "Error parsing commandline option %.*s: %s\n", BSTR_P(p->arg), m_option_strerror(r)); return false; @@ -138,7 +138,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, goto err_out; } if (r < 0) { - mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL, + mp_msg(MSGT_CFGPARSER, MSGL_FATAL, "Setting commandline option --%.*s=%.*s failed.\n", BSTR_P(p.arg), BSTR_P(p.param)); goto err_out; @@ -192,7 +192,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, struct playlist *pl = playlist_parse_file(param0, opts); talloc_free(param0); if (!pl) { - mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL, + mp_msg(MSGT_CFGPARSER, MSGL_FATAL, "Error reading playlist '%.*s'", BSTR_P(p.param)); goto err_out; } @@ -233,7 +233,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, playlist_add_file(files, f); } } else - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Invalid play entry %s\n", file0); } else // dvd:// or dvd://x entry @@ -252,7 +252,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, goto err_out; if (mode != GLOBAL) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Missing closing --} on command line.\n"); goto err_out; } diff --git a/mpvcore/player/command.c b/mpvcore/player/command.c index e36675bf05..10dfb4c261 100644 --- a/mpvcore/player/command.c +++ b/mpvcore/player/command.c @@ -1022,7 +1022,7 @@ static int property_switch_track(m_option_t *prop, int action, void *arg, else { char *lang = track->lang; if (!lang) - lang = mp_gtext("unknown"); + lang = "unknown"; if (track->title) *(char **)arg = talloc_asprintf(NULL, "(%d) %s (\"%s\")", @@ -2148,7 +2148,7 @@ static void show_property_osd(MPContext *mpctx, const char *pname, int osd_mode) for (p = property_osd_display; p->name; p++) { if (!strcmp(p->name, prop.name)) { osd_progbar = p->seek_bar ? 1 : p->osd_progbar; - osd_name = p->seek_msg ? "" : mp_gtext(p->osd_name); + osd_name = p->seek_msg ? "" : p->osd_name; break; } } @@ -2215,7 +2215,7 @@ static void show_property_osd(MPContext *mpctx, const char *pname, int osd_mode) int index = p - property_osd_display; osd_id = p->osd_id ? p->osd_id : OSD_MSG_PROPERTY + index; } - set_osd_tmsg(mpctx, osd_id, 1, opts->osd_duration, "%s", osd_msg); + set_osd_msg(mpctx, osd_id, 1, opts->osd_duration, "%s", osd_msg); } talloc_free(tmp); @@ -2314,7 +2314,7 @@ static int edit_filters_osd(struct MPContext *mpctx, enum stream_type mediatype, const char *prop = filter_opt[mediatype]; show_property_osd(mpctx, prop, MP_ON_OSD_MSG); } else { - set_osd_tmsg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration, + set_osd_msg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration, "Changing filters failed!"); } } @@ -2729,7 +2729,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) if (cmd->id == MP_CMD_SUB_STEP) { opts->sub_delay += a[0]; osd_changed_all(mpctx->osd); - set_osd_tmsg(mpctx, OSD_MSG_SUB_DELAY, osdl, osd_duration, + set_osd_msg(mpctx, OSD_MSG_SUB_DELAY, osdl, osd_duration, "Sub delay: %d ms", ROUND(opts->sub_delay * 1000)); } else { // We can easily get stuck by failing to seek to the video @@ -2760,7 +2760,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) else opts->osd_level = v > max ? max : v; if (msg_osd && opts->osd_level <= 1) - set_osd_tmsg(mpctx, OSD_MSG_OSD_STATUS, 0, osd_duration, + set_osd_msg(mpctx, OSD_MSG_OSD_STATUS, 0, osd_duration, "OSD: %s", opts->osd_level ? "yes" : "no"); else rm_osd_msg(mpctx, OSD_MSG_OSD_STATUS); @@ -2810,7 +2810,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) mp_set_playlist_entry(mpctx, e ? e : mpctx->playlist->first); } } else { - mp_tmsg(MSGT_CPLAYER, MSGL_ERR, + mp_msg(MSGT_CPLAYER, MSGL_ERR, "\nUnable to load playlist %s.\n", filename); } break; @@ -2877,7 +2877,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) else radio_step_channel(mpctx->stream, RADIO_CHANNEL_LOWER); if (radio_get_channel_name(mpctx->stream)) { - set_osd_tmsg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration, + set_osd_msg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration, "Channel: %s", radio_get_channel_name(mpctx->stream)); } @@ -2888,7 +2888,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) if (mpctx->stream && mpctx->stream->type == STREAMTYPE_RADIO) { radio_set_channel(mpctx->stream, cmd->args[0].v.s); if (radio_get_channel_name(mpctx->stream)) { - set_osd_tmsg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration, + set_osd_msg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration, "Channel: %s", radio_get_channel_name(mpctx->stream)); } @@ -2951,7 +2951,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) tv_step_channel(get_tvh(mpctx), TV_CHANNEL_LOWER); } if (tv_channel_list) { - set_osd_tmsg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, + set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, "Channel: %s", tv_channel_current->name); } } @@ -2987,7 +2987,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) if (get_tvh(mpctx)) { tv_set_channel(get_tvh(mpctx), cmd->args[0].v.s); if (tv_channel_list) { - set_osd_tmsg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, + set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, "Channel: %s", tv_channel_current->name); } } @@ -3018,7 +3018,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) if (get_tvh(mpctx)) { tv_last_channel(get_tvh(mpctx)); if (tv_channel_list) { - set_osd_tmsg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, + set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, "Channel: %s", tv_channel_current->name); } } diff --git a/mpvcore/player/configfiles.c b/mpvcore/player/configfiles.c index 21450b482d..ac95f6fdf4 100644 --- a/mpvcore/player/configfiles.c +++ b/mpvcore/player/configfiles.c @@ -95,7 +95,7 @@ void mp_load_per_protocol_config(m_config_t *conf, const char * const file) protocol[strlen(PROFILE_CFG_PROTOCOL) + strlen(file) - strlen(str)] = '\0'; p = m_config_get_profile0(conf, protocol); if (p) { - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, + mp_msg(MSGT_CPLAYER, MSGL_INFO, "Loading protocol-related profile '%s'\n", protocol); m_config_set_profile(conf, p, FILE_LOCAL_FLAGS); } @@ -118,7 +118,7 @@ void mp_load_per_extension_config(m_config_t *conf, const char * const file) strncat(extension, ++str, 7); p = m_config_get_profile0(conf, extension); if (p) { - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, + mp_msg(MSGT_CPLAYER, MSGL_INFO, "Loading extension-related profile '%s'\n", extension); m_config_set_profile(conf, p, FILE_LOCAL_FLAGS); } @@ -135,7 +135,7 @@ void mp_load_per_output_config(m_config_t *conf, char *cfg, char *out) sprintf(profile, "%s%s", cfg, out); p = m_config_get_profile0(conf, profile); if (p) { - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, + mp_msg(MSGT_CPLAYER, MSGL_INFO, "Loading extension-related profile '%s'\n", profile); m_config_set_profile(conf, p, FILE_LOCAL_FLAGS); } @@ -149,7 +149,7 @@ static int try_load_config(m_config_t *conf, const char *file, int flags) { if (!mp_path_exists(file)) return 0; - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Loading config '%s'\n", file); + mp_msg(MSGT_CPLAYER, MSGL_INFO, "Loading config '%s'\n", file); m_config_parse_config_file(conf, file, flags); return 1; } diff --git a/mpvcore/player/main.c b/mpvcore/player/main.c index 1a3bd15fe1..685ae16792 100644 --- a/mpvcore/player/main.c +++ b/mpvcore/player/main.c @@ -366,7 +366,7 @@ static int mpv_main(int argc, char *argv[]) if (!mpctx->playlist->first && !opts->player_idle_mode) { mp_print_version(true); - MP_INFO(mpctx, "%s", mp_gtext(mp_help_text)); + MP_INFO(mpctx, "%s", mp_help_text); exit_player(mpctx, EXIT_NONE); } diff --git a/mpvcore/player/mp_core.h b/mpvcore/player/mp_core.h index 517ddbd37b..e1c7997907 100644 --- a/mpvcore/player/mp_core.h +++ b/mpvcore/player/mp_core.h @@ -408,8 +408,6 @@ void set_osd_bar(struct MPContext *mpctx, int type, const char* name, double min, double max, double val); void set_osd_msg(struct MPContext *mpctx, int id, int level, int time, const char* fmt, ...) PRINTF_ATTRIBUTE(5,6); -void set_osd_tmsg(struct MPContext *mpctx, int id, int level, int time, - const char* fmt, ...) PRINTF_ATTRIBUTE(5,6); void rm_osd_msg(struct MPContext *mpctx, int id); void set_osd_function(struct MPContext *mpctx, int osd_function); void set_osd_subtitle(struct MPContext *mpctx, const char *text); diff --git a/mpvcore/player/osd.c b/mpvcore/player/osd.c index 1674fcab8b..42409b555f 100644 --- a/mpvcore/player/osd.c +++ b/mpvcore/player/osd.c @@ -213,15 +213,6 @@ void set_osd_msg(struct MPContext *mpctx, int id, int level, int time, va_end(ap); } -void set_osd_tmsg(struct MPContext *mpctx, int id, int level, int time, - const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - set_osd_msg_va(mpctx, id, level, time, mp_gtext(fmt), ap); - va_end(ap); -} - /** * \brief Remove a message from the OSD stack * @@ -451,14 +442,14 @@ static void add_seek_osd_messages(struct MPContext *mpctx) } if (mpctx->add_osd_seek_info & OSD_SEEK_INFO_CHAPTER_TEXT) { char *chapter = chapter_display_name(mpctx, get_current_chapter(mpctx)); - set_osd_tmsg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration, + set_osd_msg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration, "Chapter: %s", chapter); talloc_free(chapter); } if ((mpctx->add_osd_seek_info & OSD_SEEK_INFO_EDITION) && mpctx->master_demuxer) { - set_osd_tmsg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration, + set_osd_msg(mpctx, OSD_MSG_TEXT, 1, mpctx->opts->osd_duration, "Playing edition %d of %d.", mpctx->master_demuxer->edition + 1, mpctx->master_demuxer->num_editions); diff --git a/mpvcore/player/playloop.c b/mpvcore/player/playloop.c index b2eae3807c..dbc87a7ec6 100644 --- a/mpvcore/player/playloop.c +++ b/mpvcore/player/playloop.c @@ -606,7 +606,7 @@ static void update_avsync(struct MPContext *mpctx) mpctx->last_av_difference = MP_NOPTS_VALUE; if (mpctx->last_av_difference > 0.5 && mpctx->drop_frame_cnt > 50 && !mpctx->drop_message_shown) { - MP_WARN(mpctx, "%s", mp_gtext(av_desync_help_text)); + MP_WARN(mpctx, "%s", av_desync_help_text); mpctx->drop_message_shown = true; } } @@ -1017,7 +1017,7 @@ void run_playloop(struct MPContext *mpctx) } } - mp_dbg(MSGT_AVSYNC, MSGL_DBG2, "*** ftime=%5.3f ***\n", frame_time); + mp_msg(MSGT_AVSYNC, MSGL_DBG2, "*** ftime=%5.3f ***\n", frame_time); if (mpctx->d_video->vfilter && mpctx->d_video->vfilter->initialized < 0) { MP_FATAL(mpctx, "\nFATAL: Could not initialize video filters " @@ -1059,7 +1059,7 @@ void run_playloop(struct MPContext *mpctx) mpctx->time_frame -= get_relative_time(mpctx); if (full_audio_buffers && !mpctx->restart_playback) { buffered_audio = ao_get_delay(mpctx->ao); - mp_dbg(MSGT_AVSYNC, MSGL_DBG2, "delay=%f\n", buffered_audio); + mp_msg(MSGT_AVSYNC, MSGL_DBG2, "delay=%f\n", buffered_audio); if (opts->autosync) { /* Smooth reported playback position from AO by averaging diff --git a/mpvcore/player/screenshot.c b/mpvcore/player/screenshot.c index d719495f9e..7aaba5f05a 100644 --- a/mpvcore/player/screenshot.c +++ b/mpvcore/player/screenshot.c @@ -80,7 +80,7 @@ static void screenshot_msg(screenshot_ctx *ctx, int status, const char *msg, mp_msg(MSGT_CPLAYER, status == SMSG_ERR ? MSGL_ERR : MSGL_INFO, "%s\n", s); if (ctx->osd) { - set_osd_tmsg(ctx->mpctx, OSD_MSG_TEXT, 1, ctx->mpctx->opts->osd_duration, + set_osd_msg(ctx->mpctx, OSD_MSG_TEXT, 1, ctx->mpctx->opts->osd_duration, "%s", s); } diff --git a/mpvcore/player/sub.c b/mpvcore/player/sub.c index f514d3345b..26c8eebdb9 100644 --- a/mpvcore/player/sub.c +++ b/mpvcore/player/sub.c @@ -107,7 +107,7 @@ void update_subtitles(struct MPContext *mpctx) if (!demux_has_packet(sh_stream)) break; if (subpts_s > curpts_s) { - mp_dbg(MSGT_CPLAYER, MSGL_DBG2, + mp_msg(MSGT_CPLAYER, MSGL_DBG2, "Sub early: c_pts=%5.3f s_pts=%5.3f\n", curpts_s, subpts_s); // Libass handled subs can be fed to it in advance @@ -118,7 +118,7 @@ void update_subtitles(struct MPContext *mpctx) break; } struct demux_packet *pkt = demux_read_packet(sh_stream); - mp_dbg(MSGT_CPLAYER, MSGL_V, "Sub: c_pts=%5.3f s_pts=%5.3f " + mp_msg(MSGT_CPLAYER, MSGL_V, "Sub: c_pts=%5.3f s_pts=%5.3f " "duration=%5.3f len=%d\n", curpts_s, pkt->pts, pkt->duration, pkt->len); sub_decode(dec_sub, pkt); diff --git a/osdep/priority.c b/osdep/priority.c index 76b381c6ef..211ab8bd31 100644 --- a/osdep/priority.c +++ b/osdep/priority.c @@ -58,7 +58,7 @@ void set_priority(void) if (strcasecmp(priority_presets_defs[i].name, proc_priority) == 0) break; } - mp_tmsg(MSGT_CPLAYER, MSGL_STATUS, "Setting process priority: %s\n", + mp_msg(MSGT_CPLAYER, MSGL_STATUS, "Setting process priority: %s\n", priority_presets_defs[i].name); SetPriorityClass(GetCurrentProcess(), priority_presets_defs[i].prio); diff --git a/stream/ai_alsa1x.c b/stream/ai_alsa1x.c index 750e43b2dd..2cf0382150 100644 --- a/stream/ai_alsa1x.c +++ b/stream/ai_alsa1x.c @@ -40,27 +40,27 @@ int ai_alsa_setup(audio_in_t *ai) err = snd_pcm_hw_params_any(ai->alsa.handle, params); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Broken configuration for this PCM: no configurations available.\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Broken configuration for this PCM: no configurations available.\n"); return -1; } err = snd_pcm_hw_params_set_access(ai->alsa.handle, params, SND_PCM_ACCESS_RW_INTERLEAVED); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Access type not available.\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Access type not available.\n"); return -1; } err = snd_pcm_hw_params_set_format(ai->alsa.handle, params, SND_PCM_FORMAT_S16_LE); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Sample format not available.\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Sample format not available.\n"); return -1; } err = snd_pcm_hw_params_set_channels(ai->alsa.handle, params, ai->req_channels); if (err < 0) { snd_pcm_hw_params_get_channels(params, &ai->channels); - mp_tmsg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n", + mp_msg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n", ai->channels); } else { ai->channels = ai->req_channels; @@ -70,7 +70,7 @@ int ai_alsa_setup(audio_in_t *ai) rate = ai->req_samplerate; err = snd_pcm_hw_params_set_rate_near(ai->alsa.handle, params, &rate, &dir); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set samplerate.\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Cannot set samplerate.\n"); } ai->samplerate = rate; @@ -79,7 +79,7 @@ int ai_alsa_setup(audio_in_t *ai) err = snd_pcm_hw_params_set_buffer_time_near(ai->alsa.handle, params, &ai->alsa.buffer_time, &dir); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set buffer time.\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Cannot set buffer time.\n"); } dir = 0; @@ -87,12 +87,12 @@ int ai_alsa_setup(audio_in_t *ai) err = snd_pcm_hw_params_set_period_time_near(ai->alsa.handle, params, &ai->alsa.period_time, &dir); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set period time.\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Cannot set period time.\n"); } err = snd_pcm_hw_params(ai->alsa.handle, params); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install hardware parameters: %s", snd_strerror(err)); + mp_msg(MSGT_TV, MSGL_ERR, "Unable to install hardware parameters: %s", snd_strerror(err)); snd_pcm_hw_params_dump(params, ai->alsa.log); return -1; } @@ -102,7 +102,7 @@ int ai_alsa_setup(audio_in_t *ai) snd_pcm_hw_params_get_buffer_size(params, &buffer_size); ai->alsa.chunk_size = period_size; if (period_size == buffer_size) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Can't use period equal to buffer size (%u == %lu)\n", ai->alsa.chunk_size, (long)buffer_size); + mp_msg(MSGT_TV, MSGL_ERR, "Can't use period equal to buffer size (%u == %lu)\n", ai->alsa.chunk_size, (long)buffer_size); return -1; } @@ -113,7 +113,7 @@ int ai_alsa_setup(audio_in_t *ai) err = snd_pcm_sw_params_set_stop_threshold(ai->alsa.handle, swparams, buffer_size); if (snd_pcm_sw_params(ai->alsa.handle, swparams) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n"); snd_pcm_sw_params_dump(swparams, ai->alsa.log); return -1; } @@ -137,7 +137,7 @@ int ai_alsa_init(audio_in_t *ai) err = snd_pcm_open(&ai->alsa.handle, ai->alsa.device, SND_PCM_STREAM_CAPTURE, 0); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err)); + mp_msg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err)); return -1; } @@ -171,7 +171,7 @@ int ai_alsa_xrun(audio_in_t *ai) snd_pcm_status_alloca(&status); if ((res = snd_pcm_status(ai->alsa.handle, status))<0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res)); + mp_msg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res)); return -1; } if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) { @@ -179,18 +179,18 @@ int ai_alsa_xrun(audio_in_t *ai) gettimeofday(&now, 0); snd_pcm_status_get_trigger_tstamp(status, &tstamp); timersub(&now, &tstamp, &diff); - mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun!!! (at least %.3f ms long)\n", + mp_msg(MSGT_TV, MSGL_ERR, "ALSA xrun!!! (at least %.3f ms long)\n", diff.tv_sec * 1000 + diff.tv_usec / 1000.0); if (mp_msg_test(MSGT_TV, MSGL_V)) { - mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA Status:\n"); + mp_msg(MSGT_TV, MSGL_ERR, "ALSA Status:\n"); snd_pcm_status_dump(status, ai->alsa.log); } if ((res = snd_pcm_prepare(ai->alsa.handle))<0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun: prepare error: %s", snd_strerror(res)); + mp_msg(MSGT_TV, MSGL_ERR, "ALSA xrun: prepare error: %s", snd_strerror(res)); return -1; } return 0; /* ok, data should be accepted again */ } - mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA read/write error"); + mp_msg(MSGT_TV, MSGL_ERR, "ALSA read/write error"); return -1; } diff --git a/stream/ai_oss.c b/stream/ai_oss.c index d222490430..b5829ea07a 100644 --- a/stream/ai_oss.c +++ b/stream/ai_oss.c @@ -60,7 +60,7 @@ int ai_oss_set_channels(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "ioctl dsp channels: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_CHANNELS, &ioctl_param)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set channel count: %d\n", + mp_msg(MSGT_TV, MSGL_ERR, "Unable to set channel count: %d\n", ai->req_channels); return -1; } @@ -73,7 +73,7 @@ int ai_oss_set_channels(audio_in_t *ai) err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_STEREO, &ioctl_param), ioctl_param); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set stereo: %d\n", + mp_msg(MSGT_TV, MSGL_ERR, "Unable to set stereo: %d\n", ai->req_channels == 2); return -1; } @@ -90,7 +90,7 @@ int ai_oss_init(audio_in_t *ai) ai->oss.audio_fd = open(ai->oss.device, O_RDONLY | O_CLOEXEC); if (ai->oss.audio_fd < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to open '%s': %s\n", + mp_msg(MSGT_TV, MSGL_ERR, "Unable to open '%s': %s\n", ai->oss.device, strerror(errno)); return -1; } @@ -101,13 +101,13 @@ int ai_oss_init(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "Supported formats: %x\n", ioctl_param); if (!(ioctl_param & AFMT_S16_LE)) - mp_tmsg(MSGT_TV, MSGL_ERR, "unsupported format\n"); + mp_msg(MSGT_TV, MSGL_ERR, "unsupported format\n"); ioctl_param = AFMT_S16_LE; mp_msg(MSGT_TV, MSGL_V, "ioctl dsp setfmt: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SETFMT, &ioctl_param)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set audio format."); + mp_msg(MSGT_TV, MSGL_ERR, "Unable to set audio format."); return -1; } @@ -117,7 +117,7 @@ int ai_oss_init(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "ioctl dsp speed: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SPEED, &ioctl_param)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set samplerate: %d\n", + mp_msg(MSGT_TV, MSGL_ERR, "Unable to set samplerate: %d\n", ai->req_samplerate); return -1; } @@ -130,7 +130,7 @@ int ai_oss_init(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "ioctl dsp trigger: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SETTRIGGER, &ioctl_param)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set trigger: %d\n", + mp_msg(MSGT_TV, MSGL_ERR, "Unable to set trigger: %d\n", PCM_ENABLE_INPUT); } @@ -138,17 +138,17 @@ int ai_oss_init(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "ioctl dsp getblocksize: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_GETBLKSIZE, &ai->blocksize)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to get block size!\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Unable to get block size!\n"); } mp_msg(MSGT_TV, MSGL_V, "blocksize: %d\n", ai->blocksize); // correct the blocksize to a reasonable value if (ai->blocksize <= 0) { ai->blocksize = 4096*ai->channels*2; - mp_tmsg(MSGT_TV, MSGL_ERR, "Audio block size is zero, setting to %d!\n", ai->blocksize); + mp_msg(MSGT_TV, MSGL_ERR, "Audio block size is zero, setting to %d!\n", ai->blocksize); } else if (ai->blocksize < 4096*ai->channels*2) { ai->blocksize *= 4096*ai->channels*2/ai->blocksize; - mp_tmsg(MSGT_TV, MSGL_ERR, "Audio block size too low, setting to %d!\n", ai->blocksize); + mp_msg(MSGT_TV, MSGL_ERR, "Audio block size too low, setting to %d!\n", ai->blocksize); } ai->samplesize = 16; diff --git a/stream/audio_in.c b/stream/audio_in.c index 6cfbcda129..605e144f71 100644 --- a/stream/audio_in.c +++ b/stream/audio_in.c @@ -247,16 +247,16 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer) ret = snd_pcm_readi(ai->alsa.handle, buffer, ai->alsa.chunk_size); if (ret != ai->alsa.chunk_size) { if (ret < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret)); + mp_msg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret)); if (ret == -EPIPE) { if (ai_alsa_xrun(ai) == 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n"); } else { - mp_tmsg(MSGT_TV, MSGL_ERR, "Fatal error, cannot recover!\n"); + mp_msg(MSGT_TV, MSGL_ERR, "Fatal error, cannot recover!\n"); } } } else { - mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n"); + mp_msg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n"); } return -1; } @@ -281,9 +281,9 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer) ret = sio_read(ai->sndio.hdl, buffer, ai->blocksize); if (ret != ai->blocksize) { if (ret < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno)); + mp_msg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno)); } else { - mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n"); + mp_msg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n"); } return -1; } diff --git a/stream/cache.c b/stream/cache.c index 65b2c86b51..1884dcfb18 100644 --- a/stream/cache.c +++ b/stream/cache.c @@ -546,7 +546,7 @@ int stream_cache_init(stream_t *cache, stream_t *stream, int64_t size, if (size < 1) return -1; - mp_tmsg(MSGT_NETWORK, MSGL_INFO, "Cache size set to %" PRId64 " KiB\n", + mp_msg(MSGT_NETWORK, MSGL_INFO, "Cache size set to %" PRId64 " KiB\n", size / 1024); if (size > SIZE_MAX) { @@ -610,7 +610,7 @@ int stream_cache_init(stream_t *cache, stream_t *stream, int64_t size, break; if (stream_control(s->cache, STREAM_CTRL_GET_CACHE_IDLE, &idle) < 0) break; - mp_tmsg(MSGT_CACHE, MSGL_STATUS, "\rCache fill: %5.2f%% " + mp_msg(MSGT_CACHE, MSGL_STATUS, "\rCache fill: %5.2f%% " "(%" PRId64 " bytes) ", 100.0 * fill / s->buffer_size, fill); if (fill >= min) break; diff --git a/stream/cdinfo.c b/stream/cdinfo.c index cf4e984a6b..43180448a3 100644 --- a/stream/cdinfo.c +++ b/stream/cdinfo.c @@ -40,7 +40,7 @@ cd_info_new(void) { cd_info = malloc(sizeof(cd_info_t)); if( cd_info==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); + mp_msg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); return NULL; } @@ -74,14 +74,14 @@ cd_info_add_track(cd_info_t *cd_info, char *track_name, unsigned int track_nb, u cd_track = malloc(sizeof(cd_track_t)); if( cd_track==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); + mp_msg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); return NULL; } memset(cd_track, 0, sizeof(cd_track_t)); cd_track->name = malloc(strlen(track_name)+1); if( cd_track->name==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); + mp_msg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); free(cd_track); return NULL; } diff --git a/stream/stream.c b/stream/stream.c index dd1fc34435..2429d55576 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -228,13 +228,13 @@ static bool parse_url(struct stream *st, struct m_config *config) if (f[n].len) { const char *opt = find_url_opt(st, f_names[n]); if (!opt) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, "Stream type '%s' accepts no '%s' " + mp_msg(MSGT_OPEN, MSGL_ERR, "Stream type '%s' accepts no '%s' " "field in URLs.\n", st->info->name, f_names[n]); return false; } int r = m_config_set_option(config, bstr0(opt), f[n]); if (r < 0) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, "Error setting stream option: %s\n", + mp_msg(MSGT_OPEN, MSGL_ERR, "Erro