summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
Diffstat (limited to 'stream')
-rw-r--r--stream/ai_alsa1x.c32
-rw-r--r--stream/ai_oss.c20
-rw-r--r--stream/audio_in.c12
-rw-r--r--stream/cache.c4
-rw-r--r--stream/cdinfo.c6
-rw-r--r--stream/stream.c22
-rw-r--r--stream/stream_bluray.c6
-rw-r--r--stream/stream_cdda.c6
-rw-r--r--stream/stream_dvd.c38
-rw-r--r--stream/stream_dvd_common.c10
-rw-r--r--stream/stream_dvdnav.c2
-rw-r--r--stream/stream_file.c6
-rw-r--r--stream/stream_radio.c94
-rw-r--r--stream/stream_smb.c4
-rw-r--r--stream/stream_vcd.c8
-rw-r--r--stream/tv.c62
-rw-r--r--stream/tvi_v4l2.c2
17 files changed, 166 insertions, 168 deletions
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, "Error setting stream option: %s\n",
m_option_strerror(r));
return false;
}
@@ -302,7 +302,7 @@ static int open_internal(const stream_info_t *sinfo, struct stream *underlying,
struct m_config *config = m_config_from_obj_desc(s, &desc);
s->priv = config->optstruct;
if (s->info->url_options && !parse_url(s, config)) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, "URL parsing failed on url %s\n", url);
+ mp_msg(MSGT_OPEN, MSGL_ERR, "URL parsing failed on url %s\n", url);
talloc_free(s);
return STREAM_ERROR;
}
@@ -351,13 +351,13 @@ struct stream *stream_create(const char *url, int flags, struct MPOpts *options)
if (r == STREAM_NO_MATCH || r == STREAM_UNSUPPORTED)
continue;
if (r != STREAM_OK) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to open %s.\n", url);
+ mp_msg(MSGT_OPEN, MSGL_ERR, "Failed to open %s.\n", url);
return NULL;
}
}
if (!s) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, "No stream found to handle url %s\n", url);
+ mp_msg(MSGT_OPEN, MSGL_ERR, "No stream found to handle url %s\n", url);
return NULL;
}
@@ -432,7 +432,7 @@ void stream_set_capture_file(stream_t *s, const char *filename)
if (s->capture_file) {
s->capture_filename = talloc_strdup(NULL, filename);
} else {
- mp_tmsg(MSGT_GLOBAL, MSGL_ERR,
+ mp_msg(MSGT_GLOBAL, MSGL_ERR,
"Error opening capture file: %s\n", strerror(errno));
}
}
@@ -443,7 +443,7 @@ static void stream_capture_write(stream_t *s, void *buf, size_t len)
{
if (s->capture_file && len > 0) {
if (fwrite(buf, len, 1, s->capture_file) < 1) {
- mp_tmsg(MSGT_GLOBAL, MSGL_ERR, "Error writing capture file: %s\n",
+ mp_msg(MSGT_GLOBAL, MSGL_ERR, "Error writing capture file: %s\n",
strerror(errno));
stream_set_capture_file(s, NULL);
}
@@ -619,16 +619,16 @@ static int stream_seek_unbuffered(stream_t *s, int64_t newpos)
{
if (newpos != s->pos) {
if (newpos > s->pos && !(s->flags & MP_STREAM_SEEK_FW)) {
- mp_tmsg(MSGT_STREAM, MSGL_ERR, "Can not seek in this stream\n");
+ mp_msg(MSGT_STREAM, MSGL_ERR, "Can not seek in this stream\n");
return 0;
}
if (newpos < s->pos && !(s->flags & MP_STREAM_SEEK_BW)) {
- mp_tmsg(MSGT_STREAM, MSGL_ERR,
+ mp_msg(MSGT_STREAM, MSGL_ERR,
"Cannot seek backward in linear streams!\n");
return 1;
}
if (s->seek(s, newpos) <= 0) {
- mp_tmsg(MSGT_STREAM, MSGL_ERR, "Seek failed\n");
+ mp_msg(MSGT_STREAM, MSGL_ERR, "Seek failed\n");
return 0;
}
}
@@ -680,7 +680,7 @@ static int stream_seek_long(stream_t *s, int64_t pos)
int stream_seek(stream_t *s, int64_t pos)
{
- mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%llX\n", (long long)pos);
+ mp_msg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%llX\n", (long long)pos);
if (pos == stream_tell(s))
return 1;
diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c
index bcc299735f..f32e2b72d3 100644
--- a/stream/stream_bluray.c
+++ b/stream/stream_bluray.c
@@ -307,7 +307,7 @@ static int bluray_stream_open(stream_t *s, int mode)
device = bluray_device;
if (!device) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR,
+ mp_msg(MSGT_OPEN, MSGL_ERR,
"No Blu-ray device/location was specified ...\n");
return STREAM_UNSUPPORTED;
}
@@ -315,7 +315,7 @@ static int bluray_stream_open(stream_t *s, int mode)
/* open device */
bd = bd_open(device, NULL);
if (!bd) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, "Couldn't open Blu-ray device: %s\n",
+ mp_msg(MSGT_OPEN, MSGL_ERR, "Couldn't open Blu-ray device: %s\n",
device);
return STREAM_UNSUPPORTED;
}
@@ -400,7 +400,7 @@ err_no_info:
s->flags = MP_STREAM_SEEK;
s->priv = b;
- mp_tmsg(MSGT_OPEN, MSGL_V, "Blu-ray successfully opened.\n");
+ mp_msg(MSGT_OPEN, MSGL_V, "Blu-ray successfully opened.\n");
return STREAM_OK;
}
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c
index 9c7504a83d..678b06f343 100644
--- a/stream/stream_cdda.c
+++ b/stream/stream_cdda.c
@@ -340,7 +340,7 @@ static int open_cdda(stream_t *st, int m)
#endif
if (!cdd) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, "Can't open CDDA device.\n");
+ mp_msg(MSGT_OPEN, MSGL_ERR, "Can't open CDDA device.\n");
return STREAM_ERROR;
}
@@ -350,13 +350,13 @@ static int open_cdda(stream_t *st, int m)
cdd->nsectors = p->sector_size;
if (cdda_open(cdd) != 0) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, "Can't open disc.\n");
+ mp_msg(MSGT_OPEN, MSGL_ERR, "Can't open disc.\n");
cdda_close(cdd);
return STREAM_ERROR;
}
cd_info = cd_info_new();
- mp_tmsg(MSGT_OPEN, MSGL_INFO, "Found audio CD with %d tracks.\n",
+ mp_msg(MSGT_OPEN, MSGL_INFO, "Found audio CD with %d tracks.\n",
(int)cdda_tracks(cdd));
for (i = 0; i < cdd->tracks; i++) {
char track_name[80];
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index a05bb856b4..b006b52cc7 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -123,14 +123,14 @@ int dvd_aid_from_lang(stream_t *stream, char **lang) {
code = lang[n][1] | (lang[n][0] << 8);
for(i=0;i<d->nr_of_channels;i++) {
if(d->audio_streams[i].language==code) {
- mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD audio channel: %d language: %c%c\n",
+ mp_msg(MSGT_OPEN,MSGL_INFO,"Selected DVD audio channel: %d language: %c%c\n",
d->audio_streams[i].id, lang[n][0], lang[n][1]);
return d->audio_streams[i].id;
}
//printf("%X != %X (%c%c)\n",code,d->audio_streams[i].language,lang[0],lang[1]);
}
}
- mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n");
+ mp_msg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n");
return -1;
}
@@ -164,12 +164,12 @@ int dvd_sid_from_lang(stream_t *stream, char **lang) {
code = lang[n][1] | (lang[n][0] << 8);
for(i=0;i<d->nr_of_subtitles;i++) {
if(d->subtitles[i].language==code) {
- mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD subtitle channel: %d language: %c%c\n", i, lang[n][0], lang[n][1]);
+ mp_msg(MSGT_OPEN,MSGL_INFO,"Selected DVD subtitle channel: %d language: %c%c\n", i, lang[n][0], lang[n][1]);
return d->subtitles[i].id;
}
}
}
- mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD subtitle language found!\n");
+ mp_msg(MSGT_OPEN,MSGL_WARN,"No matching DVD subtitle language found!\n");
return -1;
}
@@ -772,12 +772,12 @@ static int open_s(stream_t *stream, int mode)
snprintf(temp_device, len, "/dev/rdisk%d", i);
dvd = DVDOpen(temp_device);
if(!dvd) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
+ mp_msg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
} else {
#if DVDREAD_VERSION <= LIBDVDREAD_VERSION(0,9,4)
dvd_file_t *dvdfile = DVDOpenFile(dvd,dvd_title,DVD_READ_INFO_FILE);
if(!dvdfile) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
+ mp_msg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
DVDClose(dvd);
continue;
}
@@ -796,7 +796,7 @@ static int open_s(stream_t *stream, int mode)
{
dvd = DVDOpen(dvd_device_current);
if(!dvd) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",dvd_device_current, strerror(errno));
+ mp_msg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",dvd_device_current, strerror(errno));
return STREAM_UNSUPPORTED;
}
}
@@ -809,7 +809,7 @@ static int open_s(stream_t *stream, int mode)
*/
vmg_file = ifoOpen(dvd, 0);
if(!vmg_file) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, "Can't open VMG info!\n");
+ mp_msg(MSGT_OPEN,MSGL_ERR, "Can't open VMG info!\n");
DVDClose( dvd );
return STREAM_UNSUPPORTED;
}
@@ -845,9 +845,9 @@ static int open_s(stream_t *stream, int mode)
/**
* Make sure our title number is valid.
*/
- mp_tmsg(MSGT_OPEN,MSGL_STATUS, "There are %d titles on this DVD.\n", tt_srpt->nr_of_srpts );
+ mp_msg(MSGT_OPEN,MSGL_STATUS, "There are %d titles on this DVD.\n", tt_srpt->nr_of_srpts );
if(dvd_title < 1 || dvd_title > tt_srpt->nr_of_srpts) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD title number: %d\n", dvd_title);
+ mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD title number: %d\n", dvd_title);
ifoClose( vmg_file );
DVDClose( dvd );
return STREAM_UNSUPPORTED;
@@ -857,9 +857,9 @@ static int open_s(stream_t *stream, int mode)
/**
* Make sure the angle number is valid for this title.
*/
- mp_tmsg(MSGT_OPEN,MSGL_STATUS, "There are %d angles in this DVD title.\n", tt_srpt->title[dvd_title].nr_of_angles);
+ mp_msg(MSGT_OPEN,MSGL_STATUS, "There are %d angles in this DVD title.\n", tt_srpt->title[dvd_title].nr_of_angles);
if(dvd_angle<1 || dvd_angle>tt_srpt->title[dvd_title].nr_of_angles) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD angle number: %d\n", dvd_angle);
+ mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD angle number: %d\n", dvd_angle);
goto fail;
}
@@ -869,7 +869,7 @@ static int open_s(stream_t *stream, int mode)
*/
vts_file = ifoOpen( dvd, tt_srpt->title[dvd_title].title_set_nr );
if(!vts_file) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, "Cannot open the IFO file for DVD title %d.\n", tt_srpt->title[dvd_title].title_set_nr );
+ mp_msg(MSGT_OPEN,MSGL_ERR, "Cannot open the IFO file for DVD title %d.\n", tt_srpt->title[dvd_title].title_set_nr );
goto fail;
}
/**
@@ -877,7 +877,7 @@ static int open_s(stream_t *stream, int mode)
*/
title = DVDOpenFile(dvd, tt_srpt->title[dvd_title].title_set_nr, DVD_READ_TITLE_VOBS);
if(!title) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, "Cannot open title VOBS (VTS_%02d_1.VOB).\n", tt_srpt->title[dvd_title].title_set_nr);
+ mp_msg(MSGT_OPEN,MSGL_ERR, "Cannot open title VOBS (VTS_%02d_1.VOB).\n", tt_srpt->title[dvd_title].title_set_nr);
ifoClose( vts_file );
goto fail;
}
@@ -936,7 +936,7 @@ static int open_s(stream_t *stream, int mode)
// 1 - stereo
// 5 - 5.1
audio_stream->channels=audio->channels;
- mp_tmsg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n",
+ mp_msg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n",
d->nr_of_channels,
dvd_audio_stream_types[ audio->audio_format ],
dvd_audio_stream_channels[ audio->channels ],
@@ -950,7 +950,7 @@ static int open_s(stream_t *stream, int mode)
d->nr_of_channels++;
}
}
- mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of audio channels on disk: %d.\n",d->nr_of_channels );
+ mp_msg(MSGT_OPEN,MSGL_STATUS,"number of audio channels on disk: %d.\n",d->nr_of_channels );
}
/**
@@ -982,13 +982,13 @@ static int open_s(stream_t *stream, int mode)
else if(video->display_aspect_ratio == 3) /* 16:9 */
sub_stream->id = pgc->subp_control[i] >> 8 & 31;
- mp_tmsg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", sub_stream->id, tmp);
+ mp_msg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", sub_stream->id, tmp);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sub_stream->id);
if(language && tmp[0])
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", sub_stream->id, tmp);
d->nr_of_subtitles++;
}
- mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of subtitles on disk: %d\n",d->nr_of_subtitles);
+ mp_msg(MSGT_OPEN,MSGL_STATUS,"number of subtitles on disk: %d\n",d->nr_of_subtitles);
}
/**
@@ -1038,7 +1038,7 @@ fail:
DVDClose(dvd);
return STREAM_UNSUPPORTED;
}
- mp_tmsg(MSGT_DVD,MSGL_ERR,"mpv was compiled without DVD support, exiting.\n");
+ mp_msg(MSGT_DVD,MSGL_ERR,"mpv was compiled without DVD support, exiting.\n");
return STREAM_UNSUPPORTED;
}
diff --git a/stream/stream_dvd_common.c b/stream/stream_dvd_common.c
index b079f97d06..8cf3f5e4b1 100644
--- a/stream/stream_dvd_common.c
+++ b/stream/stream_dvd_common.c
@@ -69,13 +69,13 @@ void dvd_set_speed(char *device, unsigned speed)
return;
case -1: /* restore default value */
if (dvd_speed == 0) return; /* we haven't touched the speed setting */
- mp_tmsg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... ");
+ mp_msg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... ");
break;
default: /* limit to <speed> KB/s */
// speed < 100 is multiple of DVD single speed (1350KB/s)
if (speed < 100)
speed *= 1350;
- mp_tmsg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed);
+ mp_msg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed);
break;
}
@@ -108,14 +108,14 @@ void dvd_set_speed(char *device, unsigned speed)
fd = open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC);
if (fd == -1) {
- mp_tmsg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
+ mp_msg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
return;
}
if (ioctl(fd, SG_IO, &sghdr) < 0)
- mp_tmsg(MSGT_OPEN, MSGL_INFO, "failed\n");
+ mp_msg(MSGT_OPEN, MSGL_INFO, "failed\n");
else
- mp_tmsg(MSGT_OPEN, MSGL_INFO, "successful\n");
+ mp_msg(MSGT_OPEN, MSGL_INFO, "successful\n");
close(fd);
#endif
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index c81cd820ab..d85853e723 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -661,7 +661,7 @@ static int open_s(stream_t *stream, int mode)
else
filename = DEFAULT_DVD_DEVICE;
if (!new_dvdnav_stream(priv, filename)) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, "Couldn't open DVD device: %s\n",
+ mp_msg(MSGT_OPEN, MSGL_ERR, "Couldn't open DVD device: %s\n",
filename);
return STREAM_UNSUPPORTED;
}
diff --git a/stream/stream_file.c b/stream/stream_file.c
index b0832b7529..dc53aeed82 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -123,7 +123,7 @@ static int open_f(stream_t *stream, int mode)
if (!strcmp(filename, "-")) {
if (mode == STREAM_READ) {
- mp_tmsg(MSGT_OPEN, MSGL_INFO, "Reading from stdin...\n");
+ mp_msg(MSGT_OPEN, MSGL_INFO, "Reading from stdin...\n");
fd = 0;
#if HAVE_SETMODE
setmode(fileno(stdin), O_BINARY);
@@ -144,14 +144,14 @@ static int open_f(stream_t *stream, int mode)
#endif
fd = open(filename, m | O_BINARY, openmode);
if (fd < 0) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, "Cannot open file '%s': %s\n",
+ mp_msg(MSGT_OPEN, MSGL_ERR, "Cannot open file '%s': %s\n",
filename, strerror(errno));
return STREAM_ERROR;
}
#ifndef __MINGW32__
struct stat st;
if (fstat(fd, &st) == 0 && S_ISDIR(st.st_mode)) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, "File is a directory: '%s'\n",
+ mp_msg(MSGT_OPEN, MSGL_ERR, "File is a directory: '%s'\n",
filename);
close(fd);
return STREAM_ERROR;
diff --git a/stream/stream_radio.c b/stream/stream_radio.c
index 5de81c4f90..31b9d38bd9 100644
--- a/stream/stream_radio.c
+++ b/stream/stream_radio.c
@@ -152,7 +152,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
/*parsing channels string*/
channels=priv->radio_param->channels;
- mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Radio channel names detected.\n");
+ mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Radio channel names detected.\n");
priv->radio_channel_list = malloc(sizeof(radio_channels_t));
priv->radio_channel_list->index=1;
priv->radio_channel_list->next=NULL;
@@ -170,7 +170,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
priv->radio_channel_current->freq=atof(tmp);
if ((priv->radio_channel_current->freq>priv->rangehigh)||(priv->radio_channel_current->freq<priv->rangelow))
- mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency for channel %s\n",
+ mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency for channel %s\n",
priv->radio_channel_current->name);
while ((sep=strchr(priv->radio_channel_current->name, '_'))) sep[0] = ' ';
@@ -196,17 +196,17 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
priv->radio_channel_current = priv->radio_channel_current->next;
if (priv->radio_channel_current->index!=channel){
if (((float)((int)freq_channel))!=freq_channel)
- mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %.2f\n",freq_channel);
+ mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %.2f\n",freq_channel);
else
- mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %d\n",(int)freq_channel);
+ mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %d\n",(int)freq_channel);
return STREAM_ERROR;
}
- mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
+ mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
priv->radio_channel_current->name, priv->radio_channel_current->freq);
*pfreq=priv->radio_channel_current->freq;
}else{
if (freq_channel){
- mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Radio frequency parameter detected.\n");
+ mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Radio frequency parameter detected.\n");
priv->radio_channel_list=malloc(sizeof(radio_channels_t));
priv->radio_channel_list->next=NULL;
priv->radio_channel_list->prev=NULL;
@@ -217,7 +217,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
*pfreq=freq_channel;
}
}
- mp_tmsg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n");
+ mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n");
return STREAM_OK;
}
@@ -240,25 +240,25 @@ static int init_frac_v4l2(radio_priv_t* priv){
memset(&tuner,0,sizeof(tuner));
tuner.index=0;
if (ioctl(priv->radio_fd, VIDIOC_G_TUNER, &tuner)<0){
- mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] Warning: ioctl get tuner failed: %s. Setting frac to %d.\n",strerror(errno),priv->frac);
+ mp_msg(MSGT_RADIO,MSGL_WARN,"[radio] Warning: ioctl get tuner failed: %s. Setting frac to %d.\n",strerror(errno),priv->frac);
return STREAM_ERROR;
}
if(tuner.type!=V4L2_TUNER_RADIO){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] %s is no radio device!\n",priv->radio_param->device);
+ mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] %s is no radio device!\n",priv->radio_param->device);
return STREAM_ERROR;
}
if(tuner.capability & V4L2_TUNER_CAP_LOW){
priv->frac=16000;
- mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:yes frac=%d\n",priv->frac);
+ mp_msg(MSGT_RADIO,MSGL_DBG2,"[radi