summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-16 20:40:02 +0100
committerwm4 <wm4@nowhere>2013-12-16 20:41:08 +0100
commit7dc7b900c622235d595337c988a0c75280084b7c (patch)
tree7f896555c9478430edd28d56fb6fde5691b0e643 /audio
parent3e6cd3ef19aca7c79dfc73412f98b70b7de011b4 (diff)
downloadmpv-7dc7b900c622235d595337c988a0c75280084b7c.tar.bz2
mpv-7dc7b900c622235d595337c988a0c75280084b7c.tar.xz
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.
Diffstat (limited to 'audio')
-rw-r--r--audio/decode/ad_lavc.c10
-rw-r--r--audio/decode/dec_audio.c10
-rw-r--r--audio/filter/af.c2
-rw-r--r--audio/filter/af_ladspa.c4
-rw-r--r--audio/filter/af_lavcac3enc.c6
-rw-r--r--audio/mixer.c10
-rw-r--r--audio/out/ao.c4
7 files changed, 23 insertions, 23 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;