aboutsummaryrefslogtreecommitdiffhomepage
path: root/stream
diff options
context:
space:
mode:
authorGravatar Amar Takhar <mplayer@darkbeer.org>2009-07-07 01:15:02 +0300
committerGravatar Uoti Urpala <uau@glyph.nonexistent.invalid>2009-07-07 01:38:20 +0300
commite306174952d42e1cd6cc5efc50ae6bb0410501bc (patch)
treea7eb451f2c634f17d8e36a72b6305c1aff508904 /stream
parentb5972d6f14c04384d88d3f813b435d484562403f (diff)
Translation system changes part 2: replace macros by strings
Replace all MSGTR_ macros in the source by the corresponding English string.
Diffstat (limited to 'stream')
-rw-r--r--stream/ai_alsa.c26
-rw-r--r--stream/ai_alsa1x.c32
-rw-r--r--stream/ai_oss.c20
-rw-r--r--stream/asf_mmst_streaming.c52
-rw-r--r--stream/asf_streaming.c54
-rw-r--r--stream/audio_in.c12
-rw-r--r--stream/cache2.c2
-rw-r--r--stream/cdinfo.c6
-rw-r--r--stream/network.c40
-rw-r--r--stream/stream.c2
-rw-r--r--stream/stream_cdda.c6
-rw-r--r--stream/stream_cddb.c74
-rw-r--r--stream/stream_cue.c40
-rw-r--r--stream/stream_dvd.c56
-rw-r--r--stream/stream_dvdnav.c6
-rw-r--r--stream/stream_file.c4
-rw-r--r--stream/stream_live555.c2
-rw-r--r--stream/stream_radio.c128
-rw-r--r--stream/stream_smb.c4
-rw-r--r--stream/stream_vcd.c6
-rw-r--r--stream/tcp.c20
-rw-r--r--stream/tv.c89
-rw-r--r--stream/tvi_bsdbt848.c62
-rw-r--r--stream/tvi_dshow.c84
-rw-r--r--stream/tvi_vbi.c6
-rw-r--r--stream/url.c22
26 files changed, 434 insertions, 421 deletions
diff --git a/stream/ai_alsa.c b/stream/ai_alsa.c
index 20c3e4d168..002ea36f71 100644
--- a/stream/ai_alsa.c
+++ b/stream/ai_alsa.c
@@ -23,24 +23,24 @@ 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, MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_UnavailableAccessType);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt);
+ mp_tmsg(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) {
ai->channels = snd_pcm_hw_params_get_channels(params);
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableChanCount,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n",
ai->channels);
} else {
ai->channels = ai->req_channels;
@@ -61,14 +61,14 @@ int ai_alsa_setup(audio_in_t *ai)
assert(ai->alsa.period_time >= 0);
err = snd_pcm_hw_params(ai->alsa.handle, params);
if (err < 0) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallHWParams);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install hardware paramameters: %s");
snd_pcm_hw_params_dump(params, ai->alsa.log);
return -1;
}
ai->alsa.chunk_size = snd_pcm_hw_params_get_period_size(params, 0);
buffer_size = snd_pcm_hw_params_get_buffer_size(params);
if (ai->alsa.chunk_size == buffer_size) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize, ai->alsa.chunk_size, (long)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);
return -1;
}
snd_pcm_sw_params_current(ai->alsa.handle, swparams);
@@ -84,7 +84,7 @@ int ai_alsa_setup(audio_in_t *ai)
assert(err >= 0);
if (snd_pcm_sw_params(ai->alsa.handle, swparams) < 0) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n");
snd_pcm_sw_params_dump(swparams, ai->alsa.log);
return -1;
}
@@ -108,7 +108,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, MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio, snd_strerror(err));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err));
return -1;
}
@@ -142,7 +142,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, MSGTR_MPDEMUX_AIALSA_AlsaStatusError, snd_strerror(res));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res));
return -1;
}
if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) {
@@ -150,18 +150,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, MSGTR_MPDEMUX_AIALSA_AlsaXRUN,
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_AlsaStatus);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError, snd_strerror(res));
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA read/write error");
return -1;
}
diff --git a/stream/ai_alsa1x.c b/stream/ai_alsa1x.c
index 924fed941f..625ccdf387 100644
--- a/stream/ai_alsa1x.c
+++ b/stream/ai_alsa1x.c
@@ -24,27 +24,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, MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_UnavailableAccessType);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_UnavailableChanCount,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n",
ai->channels);
} else {
ai->channels = ai->req_channels;
@@ -54,7 +54,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, MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set samplerate.\n");
}
ai->samplerate = rate;
@@ -63,7 +63,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, MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set buffer time.\n");
}
dir = 0;
@@ -71,12 +71,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, MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_CannotInstallHWParams, snd_strerror(err));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install hardware paramameters: %s", snd_strerror(err));
snd_pcm_hw_params_dump(params, ai->alsa.log);
return -1;
}
@@ -86,7 +86,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, MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize, ai->alsa.chunk_size, (long)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);
return -1;
}
@@ -98,7 +98,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, MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n");
snd_pcm_sw_params_dump(swparams, ai->alsa.log);
return -1;
}
@@ -122,7 +122,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, MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio, snd_strerror(err));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err));
return -1;
}
@@ -156,7 +156,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, MSGTR_MPDEMUX_AIALSA_AlsaStatusError, snd_strerror(res));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res));
return -1;
}
if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) {
@@ -164,18 +164,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, MSGTR_MPDEMUX_AIALSA_AlsaXRUN,
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_AlsaStatus);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError, snd_strerror(res));
+ mp_tmsg(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, MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA read/write error");
return -1;
}
diff --git a/stream/ai_oss.c b/stream/ai_oss.c
index 3f90423f1e..b662445128 100644
--- a/stream/ai_oss.c
+++ b/stream/ai_oss.c
@@ -41,7 +41,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, MSGTR_MPDEMUX_AIOSS_Unable2SetChanCount,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set channel count: %d\n",
ai->req_channels);
return -1;
}
@@ -54,7 +54,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, MSGTR_MPDEMUX_AIOSS_Unable2SetStereo,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set stereo: %d\n",
ai->req_channels == 2);
return -1;
}
@@ -71,7 +71,7 @@ int ai_oss_init(audio_in_t *ai)
ai->oss.audio_fd = open(ai->oss.device, O_RDONLY);
if (ai->oss.audio_fd < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_Unable2Open,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to open '%s': %s\n",
ai->oss.device, strerror(errno));
return -1;
}
@@ -82,13 +82,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, MSGTR_MPDEMUX_AIOSS_UnsupportedFmt);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIOSS_Unable2SetAudioFmt);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set audio format.");
return -1;
}
@@ -98,7 +98,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, MSGTR_MPDEMUX_AIOSS_Unable2SetSamplerate,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set samplerate: %d\n",
ai->req_samplerate);
return -1;
}
@@ -111,7 +111,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, MSGTR_MPDEMUX_AIOSS_Unable2SetTrigger,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set trigger: %d\n",
PCM_ENABLE_INPUT);
}
@@ -119,17 +119,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, MSGTR_MPDEMUX_AIOSS_Unable2GetBlockSize);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIOSS_AudioBlockSizeZero, ai->blocksize);
+ mp_tmsg(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, MSGTR_MPDEMUX_AIOSS_AudioBlockSize2Low, ai->blocksize);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Audio block size too low, setting to %d!\n", ai->blocksize);
}
ai->samplesize = 16;
diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c
index 3bd8944039..65398c1602 100644
--- a/stream/asf_mmst_streaming.c
+++ b/stream/asf_mmst_streaming.c
@@ -137,7 +137,7 @@ static void send_command (int s, int command, uint32_t switches,
memset(&cmd.buf[48 + length], 0, 8 - (length & 7));
if (send (s, cmd.buf, len8*8+48, 0) != (len8*8+48)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_WriteError);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"write error\n");
}
}
@@ -185,7 +185,7 @@ static void get_answer (int s)
len = recv (s, data, BUF_SIZE, 0) ;
if (!len) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_EOFAlert);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"\nAlert! EOF\n");
return;
}
@@ -232,7 +232,7 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl)
while (1) {
if (!get_data (s, pre_header, 8)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_PreHeaderReadFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"pre-header read failed\n");
return 0;
}
if (pre_header[4] == 0x02) {
@@ -244,12 +244,12 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl)
// mp_msg(MSGT_NETWORK,MSGL_INFO,"asf header packet detected, len=%d\n", packet_len);
if (packet_len < 0 || packet_len > HDR_BUF_SIZE - header_len) {
- mp_tmsg(MSGT_NETWORK, MSGL_FATAL, MSGTR_MPDEMUX_MMST_InvalidHeaderSize);
+ mp_tmsg(MSGT_NETWORK, MSGL_FATAL, "Invalid header size, giving up.\n");
return 0;
}
if (!get_data (s, &header[header_len], packet_len)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_HeaderDataReadFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Header data read failed.\n");
return 0;
}
@@ -275,7 +275,7 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl)
char data[BUF_SIZE];
if (!get_data (s, (char*)&packet_len, 4)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_packet_lenReadFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"packet_len read failed.\n");
return 0;
}
@@ -285,12 +285,12 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl)
if (packet_len < 0 || packet_len > BUF_SIZE) {
mp_tmsg(MSGT_NETWORK, MSGL_FATAL,
- MSGTR_MPDEMUX_MMST_InvalidRTSPPacketSize);
+ "Invalid RTSP packet size, giving up.\n");
return 0;
}
if (!get_data (s, data, packet_len)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_CmdDataReadFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Command data read failed.\n");
return 0;
}
@@ -343,14 +343,14 @@ static int interp_header (uint8_t *header, int header_len)
i += 8;
if ( (guid_1 == 0x6cce6200aa00d9a6ULL) && (guid_2 == 0x11cf668e75b22630ULL) ) {
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_HeaderObject);
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"header object\n");
} else if ((guid_1 == 0x6cce6200aa00d9a6ULL) && (guid_2 == 0x11cf668e75b22636ULL)) {
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_DataObject);
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"data object\n");
} else if ((guid_1 == 0x6553200cc000e48eULL) && (guid_2 == 0x11cfa9478cabdca1ULL)) {
packet_length = get_32(header, i+92-24);
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_FileObjectPacketLen,
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"file object, packet length = %d (%d)\n",
packet_length, get_32(header, i+96-24));
@@ -358,13 +358,13 @@ static int interp_header (uint8_t *header, int header_len)
int stream_id = header[i+48] | header[i+49] << 8;
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_StreamObjectStreamID, stream_id);
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"stream object, stream ID: %d\n", stream_id);
if (num_stream_ids < MAX_STREAMS) {
stream_ids[num_stream_ids] = stream_id;
num_stream_ids++;
} else {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_2ManyStreamID);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Too many IDs, stream skipped.");
}
} else {
@@ -380,7 +380,7 @@ static int interp_header (uint8_t *header, int header_len)
}
printf("\n");
#else
- mp_tmsg(MSGT_NETWORK,MSGL_WARN,MSGTR_MPDEMUX_MMST_UnknownObject);
+ mp_tmsg(MSGT_NETWORK,MSGL_WARN,"unknown object\n");
#endif
}
@@ -400,7 +400,7 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl)
char data[BUF_SIZE];
if (!get_data (s, pre_header, 8)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_PreHeaderReadFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"pre-header read failed\n");
return 0;
}
@@ -417,12 +417,12 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl)
// mp_msg(MSGT_NETWORK,MSGL_INFO,"asf media packet detected, len=%d\n", packet_len);
if (packet_len < 0 || packet_len > BUF_SIZE) {
- mp_tmsg(MSGT_NETWORK, MSGL_FATAL, MSGTR_MPDEMUX_MMST_InvalidRTSPPacketSize);
+ mp_tmsg(MSGT_NETWORK, MSGL_FATAL, "Invalid RTSP packet size, giving up.\n");
return 0;
}
if (!get_data (s, data, packet_len)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_MediaDataReadFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Media data read failed.\n");
return 0;
}
@@ -434,26 +434,26 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl)
int command;
if (!get_data (s, (char*)&packet_len, 4)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_packet_lenReadFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"packet_len read failed.\n");
return 0;
}
packet_len = get_32 ((unsigned char*)&packet_len, 0) + 4;
if (packet_len < 0 || packet_len > BUF_SIZE) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MPDEMUX_MMST_InvalidRTSPPacketSize);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Invalid RTSP packet size, giving up.\n");
return 0;
}
if (!get_data (s, data, packet_len)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_CmdDataReadFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Command data read failed.\n");
return 0;
}
if ( (pre_header[7] != 0xb0) || (pre_header[6] != 0x0b)
|| (pre_header[5] != 0xfa) || (pre_header[4] != 0xce) ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_MissingSignature);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"missing signature\n");
return -1;
}
@@ -464,7 +464,7 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl)
if (command == 0x1b)
send_command (s, 0x1b, 0, 0, 0, data);
else if (command == 0x1e) {
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_PatentedTechnologyJoke);
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Everything done. Thank you for downloading a media file containing proprietary and patented technology.\n");
return 0;
}
else if (command == 0x21 ) {
@@ -473,7 +473,7 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl)
return 0;
}
else if (command != 0x05) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_UnknownCmd,command);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"unknown command %02x\n",command);
return -1;
}
}
@@ -494,7 +494,7 @@ static int asf_mmst_streaming_read( int fd, char *buffer, int size, streaming_ct
// buffer is empty - fill it!
int ret = get_media_packet( fd, packet_length1, stream_ctrl);
if( ret<0 ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_GetMediaPacketErr,strerror(errno));
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"get_media_packet error : %s\n",strerror(errno));
return -1;
} else if (ret==0) //EOF?
return ret;
@@ -547,7 +547,7 @@ int asf_mmst_streaming_start(stream_t *stream)
*/
unescpath=malloc(strlen(path)+1);
if (!unescpath) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
return -1;
}
url_unescape_string(unescpath,path);
@@ -562,7 +562,7 @@ int asf_mmst_streaming_start(stream_t *stream)
free(path);
return s;
}
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_Connected);
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Connected\n");
seq_num=0;
diff --git a/stream/asf_streaming.c b/stream/asf_streaming.c
index 4d4303bdae..59f2450eb7 100644
--- a/stream/asf_streaming.c
+++ b/stream/asf_streaming.c
@@ -38,7 +38,7 @@ static int asf_read_wrapper(int fd, void *buffer, int len, streaming_ctrl_t *str
while (len > 0) {
int got = nop_streaming_read(fd, buf, len, stream_ctrl);
if (got <= 0) {
- mp_tmsg(MSGT_NETWORK, MSGL_ERR, MSGTR_MPDEMUX_ASF_ErrReadingNetworkStream);
+ mp_tmsg(MSGT_NETWORK, MSGL_ERR, "Error while reading network stream.\n");
return got;
}
buf += got;
@@ -109,11 +109,11 @@ printf("0x%02X\n", stream_chunck->type );
if( drop_packet!=NULL ) *drop_packet = 0;
if( stream_chunck->size<8 ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_StreamChunkSize2Small, stream_chunck->size);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Ahhhh, stream_chunck size is too small: %d\n", stream_chunck->size);
return -1;
}
if( stream_chunck->size!=stream_chunck->size_confirm ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_SizeConfirmMismatch, stream_chunck->size, stream_chunck->size_confirm);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"size_confirm mismatch!: %d %d\n", stream_chunck->size, stream_chunck->size_confirm);
return -1;
}
/*
@@ -185,13 +185,13 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl)
// Endian handling of the stream chunk
le2me_ASF_stream_chunck_t(&chunk);
size = asf_streaming( &chunk, &r) - sizeof(ASF_stream_chunck_t);
- if(r) mp_tmsg(MSGT_NETWORK,MSGL_WARN,MSGTR_MPDEMUX_ASF_WarnDropHeader);
+ if(r) mp_tmsg(MSGT_NETWORK,MSGL_WARN,"Warning: drop header ????\n");
if(size < 0){
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ErrorParsingChunkHeader);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error while parsing chunk header\n");
return -1;
}
if (chunk.type != ASF_STREAMING_HEADER) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_NoHeaderAtFirstChunk);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Didn't get a header as first chunk !!!!\n");
return -1;
}
@@ -199,7 +199,7 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl)
if (size > SIZE_MAX - buffer_size) return -1;
buffer = malloc(size+buffer_size);
if(buffer == NULL) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MPDEMUX_ASF_BufferMallocFailed,size+buffer_size);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Error: Can't allocate %d bytes buffer.\n",size+buffer_size);
return -1;
}
if( chunk_buffer!=NULL ) {
@@ -216,7 +216,7 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl)
if( chunk_size2read==0 ) {
ASF_header_t *asfh = (ASF_header_t *)buffer;
if(size < (int)sizeof(ASF_header_t)) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ErrChunk2Small);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error: Chunk is too small.\n");
return -1;
} else mp_msg(MSGT_NETWORK,MSGL_DBG2,"Got chunk\n");
chunk_size2read = AV_RL64(&asfh->objh.size);
@@ -357,7 +357,7 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl)
free(a_rates);
if (a_idx < 0 && v_idx < 0) {
- mp_tmsg(MSGT_NETWORK, MSGL_FATAL, MSGTR_MPDEMUX_ASF_Bandwidth2SmallCannotPlay);
+ mp_tmsg(MSGT_NETWORK, MSGL_FATAL, "Bandwidth too small, file cannot be played!\n");
return -1;
}
@@ -367,7 +367,7 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl)
else if (a_idx >= 0)
asf_ctrl->audio_id = asf_ctrl->audio_streams[a_idx];
else if (asf_ctrl->n_audio) {
- mp_tmsg(MSGT_NETWORK, MSGL_WARN, MSGTR_MPDEMUX_ASF_Bandwidth2SmallDeselectedAudio);
+ mp_tmsg(MSGT_NETWORK, MSGL_WARN, "Bandwidth too small, deselected audio stream.\n");
*streaming_ctrl->audio_id_ptr = -2;
}
@@ -377,14 +377,14 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl)
else if (v_idx >= 0)
asf_ctrl->video_id = asf_ctrl->video_streams[v_idx];
else if (asf_ctrl->n_video) {
- mp_tmsg(MSGT_NETWORK, MSGL_WARN, MSGTR_MPDEMUX_ASF_Bandwidth2SmallDeselectedVideo);
+ mp_tmsg(MSGT_NETWORK, MSGL_WARN, "Bandwidth too small, deselected video stream.\n");
*streaming_ctrl->video_id_ptr = -2;
}
return 1;
len_err_out:
- mp_tmsg(MSGT_NETWORK, MSGL_FATAL, MSGTR_MPDEMUX_ASF_InvalidLenInHeader);
+ mp_tmsg(MSGT_NETWORK, MSGL_FATAL, "Invalid length in ASF header!\n");
if (buffer) free(buffer);
if (v_rates) free(v_rates);
if (a_rates) free(a_rates);
@@ -406,14 +406,14 @@ static int asf_http_streaming_read( int fd, char *buffer, int size, streaming_ct
le2me_ASF_stream_chunck_t(&chunk);
chunk_size = asf_streaming( &chunk, &drop_chunk );
if(chunk_size < 0) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ErrorParsingChunkHeader);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error while parsing chunk header\n");
return -1;
}
chunk_size -= sizeof(ASF_stream_chunck_t);
if(chunk.type != ASF_STREAMING_HEADER && (!drop_chunk)) {
if (asf_http_ctrl->packet_size < chunk_size) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ErrChunkBiggerThanPacket);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error: chunk_size > packet_size\n");
return -1;
}
waiting = asf_http_ctrl->packet_size;
@@ -505,7 +505,7 @@ static int asf_http_streaming_type(char *content_type, char *features, HTTP_head
(!strcasecmp(content_type, "video/x-ms-afs")) ||
(!strcasecmp(content_type, "video/x-ms-wmv")) ||
(!strcasecmp(content_type, "video/x-ms-wma")) ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ASFRedirector);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"=====> ASF Redirector\n");
return ASF_Redirector_e;
} else if( !strcasecmp(content_type, "text/plain") ) {
mp_msg(MSGT_NETWORK,MSGL_V,"=====> ASF Plain text\n");
@@ -547,7 +547,7 @@ static HTTP_header_t *asf_http_request(streaming_ctrl_t *streaming_ctrl) {
if( !strcasecmp( url->protocol, "http_proxy" ) ) {
server_url = url_new( (url->file)+1 );
if( server_url==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_InvalidProxyURL);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"invalid proxy URL\n");
http_free( http_hdr );
return NULL;
}
@@ -608,7 +608,7 @@ static HTTP_header_t *asf_http_request(streaming_ctrl_t *streaming_ctrl) {
// First request goes here.
break;
default:
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_UnknownASFStreamType);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"unknown ASF stream type\n");
}
http_set_field( http_hdr, "Connection: Close" );
@@ -622,7 +622,7 @@ static int asf_http_parse_response(asf_http_streaming_ctrl_t *asf_http_ctrl, HTT
char features[64] = "\0";
size_t len;
if( http_response_parse(http_hdr)<0 ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Failed to parse HTTP response.\n");
return -1;
}
switch( http_hdr->status_code ) {
@@ -631,7 +631,7 @@ static int asf_http_parse_response(asf_http_streaming_ctrl_t *asf_http_ctrl, HTT
case 401: // Authentication required
return ASF_Authenticate_e;
default:
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ServerReturn, http_hdr->status_code, http_hdr->reason_phrase);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Server returned %d:%s\n", http_hdr->status_code, http_hdr->reason_phrase);
return -1;
}
@@ -655,7 +655,7 @@ static int asf_http_parse_response(asf_http_streaming_ctrl_t *asf_http_ctrl, HTT
len = (unsigned int)(end-pragma);
}
if(len > sizeof(features) - 1) {
- mp_tmsg(MSGT_NETWORK,MSGL_WARN,MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma,pragma,len,sizeof(features) - 1);
+ mp_tmsg(MSGT_NETWORK,MSGL_WARN,"ASF HTTP PARSE WARNING : Pragma %s cut from %d bytes to %d\n",pragma,len,sizeof(features) - 1);
len = sizeof(features) - 1;
}
strncpy( features, pragma, len );
@@ -686,7 +686,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) {
asf_http_ctrl = malloc(sizeof(asf_http_streaming_ctrl_t));
if( asf_http_ctrl==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
return -1;
}
asf_http_ctrl->streaming_type = ASF_Unknown_e;
@@ -712,7 +712,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) {
for(i=0; i < (int)http_hdr->buffer_size ; ) {
int r = send( fd, http_hdr->buffer+i, http_hdr->buffer_size-i, 0 );
if(r <0) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_SocketWriteError,strerror(errno));
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"socket write error: %s\n",strerror(errno));
goto err_out;
}
i += r;
@@ -734,7 +734,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) {
}
ret = asf_http_parse_response(asf_http_ctrl, http_hdr);
if( ret<0 ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_HeaderParseFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Failed to parse header.\n");
goto err_out;
}
switch( asf_http_ctrl->streaming_type ) {
@@ -752,7 +752,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) {
ret = asf_streaming_parse_header(fd,stream->streaming_ctrl);
if(ret < 0) goto err_out;
if(asf_http_ctrl->n_audio == 0 && asf_http_ctrl->n_video == 0) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_NoStreamFound);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"No stream found.\n");
goto err_out;
}
asf_http_ctrl->request++;
@@ -778,7 +778,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) {
break;
case ASF_Unknown_e:
default:
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_UnknownASFStreamingType);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"unknown ASF streaming type\n");
goto err_out;
}
// Check if we got a redirect.
@@ -821,7 +821,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
stream->streaming_ctrl->url = check4proxies(url);
url_free(url);
- mp_tmsg(MSGT_OPEN, MSGL_INFO, MSGTR_MPDEMUX_ASF_InfoStreamASFURL, stream->url);
+ mp_tmsg(MSGT_OPEN, MSGL_INFO, "STREAM_ASF, URL: %s\n", stream->url);
if((!strncmp(stream->url, "http", 4)) && (*file_format!=DEMUXER_TYPE_ASF && *file_format!=DEMUXER_TYPE_UNKNOWN)) {
streaming_ctrl_free(stream->streaming_ctrl);
stream->streaming_ctrl = NULL;
@@ -829,7 +829,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
}
if(asf_streaming_start(stream, file_format) < 0) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_MPDEMUX_ASF_StreamingFailed);
+ mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed, exiting.\n");
streaming_ctrl_free(stream->streaming_ctrl);
stream->streaming_ctrl = NULL;
return STREAM_UNSUPPORTED;
diff --git a/stream/audio_in.c b/stream/audio_in.c
index 40169535b4..c092e7f500 100644
--- a/stream/audio_in.c
+++ b/stream/audio_in.c
@@ -185,16 +185,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, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, snd_strerror(ret));
+ mp_tmsg(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, MSGTR_MPDEMUX_AUDIOIN_XRUNSomeFramesMayBeLeftOut);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n");
} else {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrFatalCannotRecover);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Fatal error, cannot recover!\n");
}
}
} else {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_NotEnoughSamples);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
}
return -1;
}
@@ -205,9 +205,9 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer)
ret = read(ai->oss.audio_fd, buffer, ai->blocksize);
if (ret != ai->blocksize) {
if (ret < 0) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno));
} else {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_NotEnoughSamples);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
}
return -1;
}
diff --git a/stream/cache2.c b/stream/cache2.c
index 92f77ad312..d1f047b034 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -353,7 +353,7 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){
mp_msg(MSGT_CACHE,MSGL_V,"CACHE_PRE_INIT: %"PRId64" [%"PRId64"] %"PRId64" pre:%d eof:%d \n",
(int64_t)s->min_filepos,(int64_t)s->read_filepos,(int64_t)s->max_filepos,min,s->eof);
while(s->read_filepos<s->min_filepos || s->max_filepos-s->read_filepos<min){
- mp_tmsg(MSGT_CACHE,MSGL_STATUS,MSGTR_CacheFill,
+ mp_tmsg(MSGT_CACHE,MSGL_STATUS,"\rCache fill: %5.2f%% (%"PRId64" bytes) ",
100.0*(float)(s->max_filepos-s->read_filepos)/(float)(s->buffer_size),
(int64_t)s->max_filepos-s->read_filepos
);
diff --git a/stream/cdinfo.c b/stream/cdinfo.c
index 88aedac05b..48e970c72b 100644
--- a/stream/cdinfo.c
+++ b/stream/cdinfo.c
@@ -25,7 +25,7 @@ cd_info_new(void) {
cd_info = malloc(sizeof(cd_info_t));
if( cd_info==NULL ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
return NULL;
}
@@ -59,14 +59,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, MSGTR_MemAllocFailed);
+ mp_tmsg(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, MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
free(cd_track);
return NULL;
}
diff --git a/stream/network.c b/stream/network.c
index c5b31a1b12..682bbf53d4 100644
--- a/stream/network.c
+++ b/stream/network.c
@@ -98,7 +98,7 @@ streaming_ctrl_new(void) {
streaming_ctrl_t *streaming_ctrl;
streaming_ctrl = malloc(sizeof(streaming_ctrl_t));
if( streaming_ctrl==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
return NULL;
}
memset( streaming_ctrl, 0, sizeof(streaming_ctrl_t) );
@@ -136,14 +136,14 @@ check4proxies( URL_t *url ) {
if( proxy_url==NULL ) {
mp_tmsg(MSGT_NETWORK,MSGL_WARN,
- MSGTR_MPDEMUX_NW_InvalidProxySettingTryingWithout);
+ "Invalid proxy setting... Trying without proxy.\n");
return url_out;
}
#ifdef HAVE_AF_INET6
if (network_ipv4_only_proxy && (gethostbyname(url->hostname)==NULL)) {
mp_tmsg(MSGT_NETWORK,MSGL_WARN,
- MSGTR_MPDEMUX_NW_CantResolvTryingWithoutProxy);
+ "Could not resolve remote hostname for AF_INET. Trying without proxy.\n");
url_free(proxy_url);
return url_out;
}
@@ -153,7 +153,7 @@ check4proxies( URL_t *url ) {
len = strlen( proxy_url->hostname ) + strlen( url->url ) + 20; // 20 = http_proxy:// + port
new_url = malloc( len+1 );
if( new_url==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
url_free(proxy_url);
return url_out;
}
@@ -238,7 +238,7 @@ http_send_request( URL_t *url, off_t pos ) {
ret = send( fd, http_hdr->buffer, http_hdr->buffer_size, 0 );
if( ret!=(int)http_hdr->buffer_size ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ErrSendingHTTPRequest);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error while sending HTTP request: Didn't send all the request.\n");
goto err_out;
}
@@ -267,12 +267,12 @@ http_read_response( int fd ) {
do {
i = recv( fd, response, BUFFER_SIZE, 0 );
if( i<0 ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ReadFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Read failed.\n");
http_free( http_hdr );
return NULL;
}
if( i==0 ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_Read0CouldBeEOF);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"http_read_response read 0 (i.e. EOF).\n");
http_free( http_hdr );
return NULL;
}
@@ -286,8 +286,14 @@ int
http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry) {
char *aut;
+#define MPDEMUX_NW_AuthFailed _(\
+"Authentication failed. Please use the -user and -passwd options to provide your\n"\
+"username/password for a list of URLs, or form an URL like:\n"\
+"http://username:password@hostname/file\n")
+
+
if( *auth_retry==1 ) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_AuthFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,MPDEMUX_NW_AuthFailed);
return -1;
}
if( *auth_retry>0 ) {
@@ -306,28 +312,28 @@ http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry) {
char *aut_space;
aut_space = strstr(aut, "realm=");
if( aut_space!=NULL ) aut_space += 6;
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_NW_AuthRequiredFor, aut_space);
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Authentication required for %s\n", aut_space);
} else {
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_NW_AuthRequired);
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Authentication required.\n");
}
if( network_username ) {
url->username = strdup(network_username);
if( url->username==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
return -1;
}
} else {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_AuthFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,MPDEMUX_NW_AuthFailed);
return -1;
}
if( network_password ) {
url->password = strdup(network_password);
if( url->password==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
return -1;
}
} else {
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_NW_NoPasswdProvidedTryingBlank);
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"No password provided, trying blank password.\n");
}
(*auth_retry)++;
return 0;
@@ -360,7 +366,7 @@ http_seek( stream_t *stream, off_t pos ) {
}
break;
default:
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ErrServerReturned, http_hdr->status_code, http_hdr->reason_phrase );
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Server returns %d: %s\n", http_hdr->status_code, http_hdr->reason_phrase );
close( fd );
fd = -1;
}
@@ -382,7 +388,7 @@ streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size) {
//printf("streaming_bufferize\n");
streaming_ctrl->buffer = malloc(size);
if( streaming_ctrl->buffer==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
return -1;
}
memcpy( streaming_ctrl->buffer, buffer, size );
@@ -442,7 +448,7 @@ void fixup_network_stream_cache(stream_t *stream) {
stream_cache_size = (stream->streaming_ctrl->prebuffer_size/1024)*5;
if( stream_cache_size<64 ) stream_cache_size = 64; // 16KBytes min buffer
}
- mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_NW_CacheSizeSetTo, stream_cache_size);
+ mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Cache size set to %d KBytes\n", stream_cache_size);
}
}
diff --git a/stream/stream.c b/stream/stream.c
index 5e47c27a14..7d74a02987 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -213,7 +213,7 @@ stream_t *open_stream_full(char *filename,int mode, struct MPOpts *options,
return s;
}
else if(r != STREAM_UNSUPPORTED) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_FailedToOpen,filename);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR, "Failed to open %s.\n",filename);
return NULL;
}
break;
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c
index ba6c5c68d4..bbd307ffcd 100644
--- a/stream/stream_cdda.c
+++ b/stream/stream_cdda.c
@@ -195,7 +195,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) {
#endif
if(!cdd) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_MPDEMUX_CDDA_CantOpenCDDADevice);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Can't open CDDA device.\n");
m_struct_free(&stream_opts,opts);
free(cddb_info);
return STREAM_ERROR;
@@ -211,7 +211,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) {
}
if(cdda_open(cdd) != 0) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_MPDEMUX_CDDA_CantOpenDisc);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Can't open disc.\n");
cdda_close(cdd);
m_struct_free(&stream_opts,opts);
free(cddb_info);
@@ -219,7 +219,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) {
}
cd_info = cd_info_new();
- mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_MPDEMUX_CDDA_AudioCDFoundWithNTracks,cdda_tracks(cdd));
+ mp_tmsg(MSGT_OPEN,MSGL_INFO,"Found audio CD with %ld tracks.\n",cdda_tracks(cdd));
for(i=0;i<cdd->tracks;i++) {
char track_name[80];
long sec=cdda_track_firstsector(cdd,i+1);
diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c
index a8dd3a1a12..0c8ef85a8b 100644
--- a/stream/stream_cddb.c
+++ b/stream/stream_cddb.c
@@ -82,7 +82,7 @@ read_toc(const char *dev) {
drive = CreateFile(device, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
if(!DeviceIoControl(drive, IOCTL_CDROM_READ_TOC, NULL, 0, &toc, sizeof(CDROM_TOC), &r, 0)) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToReadTOC);
+ mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to read TOC.\n");
return 0;
}
@@ -219,7 +219,7 @@ int cdd_identify(const char *dev)
int i, min, sec, frame;
cdtoc_last_track = read_toc(dev);
if (cdtoc_last_track < 0) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToOpenDevice, dev);
+ mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to open %s device.\n", dev);
return -1;
}
mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_CDDA_TRACKS=%d\n", cdtoc_last_track);
@@ -278,19 +278,19 @@ cddb_http_request(char *command, int (*reply_parser)(HTTP_header_t*,cddb_data_t*
url = url_new(request);
if( url==NULL ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_NotAValidURL);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "not a valid URL\n");
return -1;
}
fd = http_send_request(url,0);
if( fd<0 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToSendHTTPRequest);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Failed to send the HTTP request.\n");
return -1;
}
http_hdr = http_read_response( fd );
if( http_hdr==NULL ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToReadHTTPResponse);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Failed to read the HTTP response.\n");
return -1;
}
@@ -302,10 +302,10 @@ cddb_http_request(char *command, int (*reply_parser)(HTTP_header_t*,cddb_data_t*
ret = reply_parser(http_hdr, cddb_data);
break;
case 400:
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_HTTPErrorNOTFOUND);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Not Found.\n");
break;
default:
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_HTTPErrorUnknown);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "unknown error code\n");
}
http_free( http_hdr );
@@ -331,7 +331,7 @@ cddb_read_cache(cddb_data_t *cddb_data) {
#endif
);
if( file_fd<0 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_NoCacheFound);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "No cache found.\n");
return -1;
}
@@ -345,13 +345,13 @@ cddb_read_cache(cddb_data_t *cddb_data) {
cddb_data->xmcd_file = malloc(file_size+1);
if( cddb_data->xmcd_file==NULL ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
close(file_fd);
return -1;
}
cddb_data->xmcd_file_size = read(file_fd, cddb_data->xmcd_file, file_size);
if( cddb_data->xmcd_file_size!=file_size ) {
- mp_tmsg(MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_CDDB_NotAllXMCDFileHasBeenRead);
+ mp_tmsg(MSGT_DEMUX, MSGL_WARN, "Not all the xmcd file has been read.\n");
close(file_fd);
return -1;
}
@@ -383,7 +383,7 @@ cddb_write_cache(cddb_data_t *cddb_data) {
if( ret<0 ) {
#endif
perror("mkdir");
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToCreateDirectory, cddb_data->cache_dir);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Failed to create directory %s.\n", cddb_data->cache_dir);
return -1;
}
}
@@ -403,7 +403,7 @@ cddb_write_cache(cddb_data_t *cddb_data) {
return -1;
}
if( (unsigned int)wrote!=cddb_data->xmcd_file_size ) {
- mp_tmsg(MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_CDDB_NotAllXMCDFileHasBeenWritten);
+ mp_tmsg(MSGT_DEMUX, MSGL_WARN, "Not all of the xmcd file has been written.\n");
close(file_fd);
return -1;
}
@@ -424,7 +424,7 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
ret = sscanf( http_hdr->body, "%d ", &status);
if( ret!=1 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error");
return -1;
}
@@ -432,13 +432,13 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
case 210:
ret = sscanf( http_hdr->body, "%d %99s %08lx", &status, category, &disc_id);
if( ret!=3 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error");
return -1;
}
// Check if it's a xmcd database file
ptr = strstr(http_hdr->body, "# xmcd");
if( ptr==NULL ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_InvalidXMCDDatabaseReturned);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Invalid xmcd database file returned.\n");
return -1;
}
ptr = strdup(ptr);
@@ -455,7 +455,7 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
// Ok found the end
// do a sanity check
if( http_hdr->body_size<(unsigned int)(ptr2-ptr) ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_UnexpectedFIXME);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "unexpected FIXME\n");
return -1;
}
cddb_data->xmcd_file = ptr;
@@ -463,7 +463,7 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
cddb_data->xmcd_file[cddb_data->xmcd_file_size] = '\0';
return cddb_write_cache(cddb_data);
default:
- mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode);
+ mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "unhandled code\n");
}
return 0;
}
@@ -483,7 +483,7 @@ cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
ptr = strstr(http_hdr->body, "\n");
if( ptr==NULL ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_UnableToFindEOL);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Unable to find end of line.\n");
return -1;
}
ptr++;
@@ -491,7 +491,7 @@ cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
// So let's take the first one.
ret = sscanf(ptr, "%99s %08lx %99s", cddb_data->category, &(cddb_data->disc_id), album_title);
if( ret!=3 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error");
return -1;
}
ptr = strstr(http_hdr->body, album_title);
@@ -508,7 +508,7 @@ cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
strncpy(album_title, ptr, len);
album_title[len]='\0';
}
- mp_tmsg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title);
+ mp_tmsg(MSGT_DEMUX, MSGL_STATUS, "Parse OK, found: %s\n", album_title);
return 0;
}
@@ -520,7 +520,7 @@ cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
ret = sscanf( http_hdr->body, "%d ", &status);
if( ret!=1 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error");
return -1;
}
@@ -529,7 +529,7 @@ cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
// Found exact match
ret = sscanf(http_hdr->body, "%d %99s %08lx %99s", &status, cddb_data->category, &(cddb_data->disc_id), album_title);
if( ret!=4 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error");
return -1;
}
ptr = strstr(http_hdr->body, album_title);
@@ -546,11 +546,11 @@ cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
strncpy(album_title, ptr, len);
album_title[len]='\0';
}
- mp_tmsg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title);
+ mp_tmsg(MSGT_DEMUX, MSGL_STATUS, "Parse OK, found: %s\n", album_title);
return cddb_request_titles(cddb_data);
case 202:
// No match found
- mp_tmsg(MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_CDDB_AlbumNotFound);
+ mp_tmsg(MSGT_DEMUX, MSGL_WARN, "Album not found.\n");
break;
case 210:
// Found exact matches, list follows
@@ -568,10 +568,10 @@ blues c711930d Santana / Supernatural
cddb_parse_matches_list(http_hdr, cddb_data);
return cddb_request_titles(cddb_data);
case 500:
- mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_ServerReturnsCommandSyntaxErr);
+ mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "Server returns: Command syntax error\n");
break;
default:
- mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode);
+ mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "unhandled code\n");
}
return -1;
}
@@ -584,7 +584,7 @@ cddb_proto_level_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
ret = sscanf( http_hdr->body, "%d ", &status);
if( ret!=1 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error");
return -1;
}
@@ -592,18 +592,18 @@ cddb_proto_level_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
case 210:
ptr = strstr(http_hdr->body, "max proto:");
if( ptr==NULL ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error");
return -1;
}
ret = sscanf(ptr, "max proto: %d", &max);
if( ret!=1 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error");
return -1;
}
cddb_data->freedb_proto_level = max;
return 0;
default:
- mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode);
+ mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "unhandled code\n");
}
return -1;
}
@@ -619,7 +619,7 @@ cddb_freedb_sites_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
ret = sscanf( http_hdr->body, "%d ", &status);
if( ret!=1 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error");
return -1;
}
@@ -629,10 +629,10 @@ cddb_freedb_sites_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
ret = cddb_data->anonymous; // For gcc complaining about unused parameter.
return 0;
case 401:
- mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_NoSitesInfoAvailable);
+ mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "No sites information available.\n");
break;
default:
- mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode);
+ mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "unhandled code\n");
}
return -1;
}
@@ -685,7 +685,7 @@ cddb_retrieve(cddb_data_t *cddb_data) {
cddb_create_hello(cddb_data);
if( cddb_get_proto_level(cddb_data)<0 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToGetProtocolLevel);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Failed to get the protocol level.\n");
return -1;
}
@@ -711,7 +711,7 @@ cddb_resolve(const char *dev, char **xmcd_file) {
{
cdtoc_last_track = read_toc(dev);
if (cdtoc_last_track < 0) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToOpenDevice, dev);
+ mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to open %s device.\n", dev);
return -1;
}
}
@@ -724,7 +724,7 @@ cddb_resolve(const char *dev, char **xmcd_file) {
// Check if there is a CD in the drive
// FIXME: That's not really a good way to check
if( cddb_data.disc_id==0 ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_NoCDInDrive);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "No CD in the drive.\n");
return -1;
}
@@ -740,7 +740,7 @@ cddb_resolve(const char *dev, char **xmcd_file) {
} else {
cddb_data.cache_dir = malloc(strlen(home_dir)+strlen(cddb_cache_dir)+1);
if( cddb_data.cache_dir==NULL ) {
- mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
return -1;
}
sprintf(cddb_data.cache_dir, "%s%s", home_dir, cddb_cache_dir );
diff --git a/stream/stream_cue.c b/stream/stream_cue.c
index 6b43c00e0f..77afa387db 100644
--- a/stream/stream_cue.c
+++ b/stream/stream_cue.c
@@ -148,7 +148,7 @@ static int cue_getTrackinfo(char *Line, tTrack *track)
else if (strncmp(&Line[4], "PREGAP ", 7)==0) { ; /* ignore */ }
else if (strncmp(&Line[4], "FLAGS ", 6)==0) { ; /* ignore */ }
else mp_tmsg (MSGT_OPEN,MSGL_INFO,
- MSGTR_MPDEMUX_CUEREAD_UnexpectedCuefileLine, Line);
+ "[bincue] Unexpected cuefile line: %s\n", Line);
}
return 0;
}
@@ -199,7 +199,7 @@ static int cue_find_bin (char *firstline) {
fd_bin = open (bin_filename, O_RDONLY);
if (fd_bin == -1)
{
- mp_tmsg(MSGT_OPEN,MSGL_STATUS, MSGTR_MPDEMUX_CUEREAD_BinFilenameTested,
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS, "[bincue] bin filename tested: %s\n",
bin_filename);
/* now try to find it with the path of the cue file */
@@ -208,7 +208,7 @@ static int cue_find_bin (char *firstline) {
if (fd_bin == -1)
{
mp_tmsg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s);
+ "[bincue] bin filename tested: %s\n", s);
/* now I would say the whole filename is shit, build our own */
strncpy(s, cue_filename, strlen(cue_filename) - 3 );
s[strlen(cue_filename) - 3] = '\0';
@@ -217,7 +217,7 @@ static int cue_find_bin (char *firstline) {
if (fd_bin == -1)
{
mp_tmsg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s);
+ "[bincue] bin filename tested: %s\n", s);
/* ok try it with path */
snprintf(t, sizeof( t ), "%s/%s", bincue_path, s);
@@ -225,7 +225,7 @@ static int cue_find_bin (char *firstline) {
if (fd_bin == -1)
{
mp_tmsg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested,t);
+ "[bincue] bin filename tested: %s\n",t);
/* now I would say the whole filename is shit, build our own */
strncpy(s, cue_filename, strlen(cue_filename) - 3 );
s[strlen(cue_filename) - 3] = '\0';
@@ -234,18 +234,18 @@ static int cue_find_bin (char *firstline) {
if (fd_bin == -1)
{
mp_tmsg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s);
+ "[bincue] bin filename tested: %s\n", s);
/* ok try it with path */
snprintf(t, sizeof( t ), "%s/%s", bincue_path, s);
fd_bin = open (t, O_RDONLY);
if (fd_bin == -1)
{
mp_tmsg(MSGT_OPEN,MSGL_STATUS,
- MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s);
+ "[bincue] bin filename tested: %s\n", s);
/* I'll give up */
mp_tmsg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_CannotFindBinFile);
+ "[bincue] Couldn't find the bin file - giving up.\n");
return -1;
}
}
@@ -258,7 +258,7 @@ static int cue_find_bin (char *firstline) {
}
mp_tmsg(MSGT_OPEN,MSGL_INFO,
- MSGTR_MPDEMUX_CUEREAD_UsingBinFile, bin_filename);
+ "[bincue] Using bin file %s.\n", bin_filename);
return 0;
}
@@ -292,7 +292,7 @@ static inline int cue_mode_2_sector_size(int mode)
default:
mp_tmsg(MSGT_OPEN,MSGL_FATAL,
- MSGTR_MPDEMUX_CUEREAD_UnknownModeForBinfile);
+ "[bincue] unknown mode for binfile. Should not happen. Aborting.\n");
abort();
}
@@ -343,7 +343,7 @@ static int cue_read_cue (char *in_cue_filename)
if (fd_cue == NULL)
{
mp_tmsg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_CannotOpenCueFile, in_cue_filename);
+ "[bincue] Cannot open %s.\n", in_cue_filename);
return -1;
}
@@ -353,7 +353,7 @@ static int cue_read_cue (char *in_cue_filename)
if(! fgets( sLine, 256, fd_cue ) )
{
mp_tmsg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_ErrReadingFromCueFile, in_cue_filename);
+ "[bincue] Error reading from %s\n", in_cue_filename);
fclose (fd_cue);
return -1;
}
@@ -369,7 +369,7 @@ static int cue_read_cue (char *in_cue_filename)
if(! fgets( sLine, 256, fd_cue ) )
{
mp_tmsg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_ErrReadingFromCueFile, in_cue_filename);
+ "[bincue] Error reading from %s\n", in_cue_filename);
fclose (fd_cue);
return -1;
}
@@ -379,7 +379,7 @@ static int cue_read_cue (char *in_cue_filename)
if (cue_getTrackinfo(sLine, &tracks[nTracks++]) != 0)
{
mp_tmsg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_ErrReadingFromCueFile, in_cue_filename);
+ "[bincue] Error reading from %s\n", in_cue_filename);
fclose (fd_cue);
return -1;
}
@@ -388,7 +388,7 @@ static int cue_read_cue (char *in_cue_filename)
/* make a fake track with stands for the Lead out */
if (fstat (fd_bin, &filestat) == -1) {
mp_tmsg(MSGT_OPEN,MSGL_ERR,
- MSGTR_MPDEMUX_CUEREAD_ErrGettingBinFileSize);
+ "[bincue] Error getting size of bin file.\n");
fclose (fd_cue);
return -1;
}
@@ -483,7 +483,7 @@ static void cue_vcd_read_toc(void){
for (i = 0; i < nTracks; ++i) {
mp_tmsg(MSGT_OPEN,MSGL_INFO,
- MSGTR_MPDEMUX_CUEREAD_InfoTrackFormat,
+ "track %02d: format=%d %02d:%02d:%02d\n",
i+1,
tracks[i].mode,
tracks[i].minute,
@@ -509,12 +509,12 @@ static int cue_vcd_read(stream_t *stream, char *mem, int size) {
return 0;
if(lseek(fd_bin, position+VCD_SECTOR_OFFS, SEEK_SET) == -1) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_MPDEMUX_CUEREAD_UnexpectedBinFileEOF);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR, "[bincue] unexpected end of bin file\n");
return 0;
}
if(read(fd_bin, mem, VCD_SECTOR_DATA) != VCD_SECTOR_DATA) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_MPDEMUX_CUEREAD_CannotReadNBytesOfPayload, VCD_SECTOR_DATA);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR, "[bincue] Couldn't read %d bytes of payload.\n", VCD_SECTOR_DATA);
return 0;
}
@@ -570,10 +570,10 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
ret2=cue_vcd_get_track_end(track);
ret=cue_vcd_seek_to_track(track);
if(ret<0){
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (seek)\n");
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Error selecting VCD track." " (seek)\n");
return STREAM_UNSUPPORTED;
}
- mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_MPDEMUX_CUEREAD_CueStreamInfo_FilenameTrackTracksavail, filename, track, ret, ret2);
+ mp_tmsg(MSGT_OPEN,MSGL_INFO,"CUE stream_open, filename=%s, track=%d, available tracks: %d -> %d\n", filename, track, ret, ret2);
stream->fd = f;
stream->type = STREAMTYPE_VCDBINCUE;
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index 2c4dc9c82b..238ccf0e67 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -66,13 +66,13 @@ static 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, MSGTR_DVDrestoreSpeed);
+ mp_tmsg(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, MSGTR_DVDlimitSpeed, speed);
+ mp_tmsg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed);
break;
}
@@ -105,14 +105,14 @@ static void dvd_set_speed(char *device, unsigned speed)
fd = open(device, O_RDWR | O_NONBLOCK);
if (fd == -1) {
- mp_tmsg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDspeedCantOpen);
+ mp_tmsg(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, MSGTR_DVDlimitFail);
+ mp_tmsg(MSGT_OPEN, MSGL_INFO, "failed\n");
else
- mp_tmsg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitOk);
+ mp_tmsg(MSGT_OPEN, MSGL_INFO, "successful\n");
close(fd);
#endif
@@ -170,26 +170,26 @@ int dvd_parse_chapter_range(const m_option_t *conf, const char *range) {
if(*range && isdigit(*range)) {
dvd_chapter = strtol(range, &s, 10);
if(range == s) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range);
+ mp_tmsg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range);
return M_OPT_INVALID;
}
}
if(*s == 0)
return 0;
else if(*s != '-') {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range);
+ mp_tmsg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range);
return M_OPT_INVALID;
}
++s;
if(*s == 0)
return 0;
if(! isdigit(*s)) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range);
+ mp_tmsg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range);
return M_OPT_INVALID;
}
dvd_last_chapter = strtol(s, &t, 10);
if (s == t || *t) {
- mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range);
+ mp_tmsg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range);
return M_OPT_INVALID;
}
return 0;
@@ -245,7 +245,7 @@ int dvd_aid_from_lang(stream_t *stream, unsigned char* lang) {
code=lang[1]|(lang[0]<<8);
for(i=0;i<d->nr_of_channels;i++) {
if(d->audio_streams[i].language==code) {
- mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_DVDaudioChannel,
+ mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD audio channel: %d language: %c%c\n",
d->audio_streams[i].id, lang[0],lang[1]);
return d->audio_streams[i].id;
}
@@ -253,7 +253,7 @@ int dvd_aid_from_lang(stream_t *stream, unsigned char* lang) {
}
lang+=2; while (lang[0]==',' || lang[0]==' ') ++lang;
}
- mp_tmsg(MSGT_OPEN,MSGL_WARN,MSGTR_DVDnoMatchingAudio);
+ mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n");
}
return -1;
}
@@ -288,14 +288,14 @@ int dvd_sid_from_lang(stream_t *stream, unsigned char* lang) {
code=lang[1]|(lang[0]<<8);
for(i=0;i<d->nr_of_subtitles;i++) {
if(d->subtitles[i].language==code) {
- mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_DVDsubtitleChannel, i, lang[0],lang[1]);
+ mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD subtitle channel: %d language: %c%c\n", i, lang[0],lang[1]);
return d->subtitles[i].id;
}
}
lang+=2;
while (lang[0]==',' || lang[0]==' ') ++lang;
}
- mp_tmsg(MSGT_OPEN,MSGL_WARN,MSGTR_DVDnoMatchingSubtitle);
+ mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD subtitle language found!\n");
return -1;
}
@@ -813,12 +813,12 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
snprintf(temp_device, len, "/dev/rdisk%d", i);
dvd = DVDOpen(temp_device);
if(!dvd) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device, strerror(errno));
+ mp_tmsg(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,MSGTR_CantOpenDVD,temp_device, strerror(errno));
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
DVDClose(dvd);
continue;
}
@@ -838,7 +838,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
{
dvd = DVDOpen(dvd_device_current);
if(!dvd) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,dvd_device_current, strerror(errno));
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",dvd_device_current, strerror(errno));
m_struct_free(&stream_opts,opts);
return STREAM_UNSUPPORTED;
}
@@ -852,7 +852,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
*/
vmg_file = ifoOpen(dvd, 0);
if(!vmg_file) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDnoVMG);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR, "Can't open VMG info!\n");
DVDClose( dvd );
m_struct_free(&stream_opts,opts);
return STREAM_UNSUPPORTED;
@@ -889,9 +889,9 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
/**
* Make sure our title number is valid.
*/
- mp_tmsg(MSGT_OPEN,MSGL_STATUS, MSGTR_DVDnumTitles, tt_srpt->nr_of_srpts );
+ mp_tmsg(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, MSGTR_DVDinvalidTitle, dvd_title);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD title number: %d\n", dvd_title);
ifoClose( vmg_file );
DVDClose( dvd );
m_struct_free(&stream_opts,opts);
@@ -902,9 +902,9 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
/**
* Make sure the angle number is valid for this title.
*/
- mp_tmsg(MSGT_OPEN,MSGL_STATUS, MSGTR_DVDnumAngles, tt_srpt->title[dvd_title].nr_of_angles);
+ mp_tmsg(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, MSGTR_DVDinvalidAngle, dvd_angle);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD angle number: %d\n", dvd_angle);
goto fail;
}
--dvd_angle; // remap 1.. -> 0..
@@ -915,7 +915,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
*/
vts_file = ifoOpen( dvd, tt_srpt->title[dvd_title].title_set_nr );
if(!vts_file) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDnoIFO, tt_srpt->title[dvd_title].title_set_nr );
+ mp_tmsg(MSGT_OPEN,MSGL_ERR, "Cannot open the IFO file for DVD title %d.\n", tt_srpt->title[dvd_title].title_set_nr );
goto fail;
}
/**
@@ -923,7 +923,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
*/
title = DVDOpenFile(dvd, tt_srpt->title[dvd_title].title_set_nr, DVD_READ_TITLE_VOBS);
if(!title) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDnoVOBs, tt_srpt->title[dvd_title].title_set_nr);
+ mp_tmsg(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;
}
@@ -983,7 +983,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
// 1 - stereo
// 5 - 5.1
audio_stream->channels=audio->channels;
- mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDaudioStreamInfo,
+ mp_tmsg(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 ],
@@ -997,7 +997,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
d->nr_of_channels++;
}
}
- mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDnumAudioChannels,d->nr_of_channels );
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of audio channels on disk: %d.\n",d->nr_of_channels );
}
/**
@@ -1029,13 +1029,13 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
else if(video->display_aspect_ratio == 3) /* 16:9 */
sub_stream->id = pgc->subp_control[i] >> 8 & 31;
- mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, sub_stream->id, tmp);
+ mp_tmsg(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,MSGTR_DVDnumSubtitles,d->nr_of_subtitles);
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of subtitles on disk: %d\n",d->nr_of_subtitles);
}
/**
@@ -1087,7 +1087,7 @@ fail:
m_struct_free(&stream_opts, opts);
return STREAM_UNSUPPORTED;
}
- mp_tmsg(MSGT_DVD,MSGL_ERR,MSGTR_NoDVDSupport);
+ mp_tmsg(MSGT_DVD,MSGL_ERR,"MPlayer was compiled without DVD support, exiting.\n");
m_struct_free(&stream_opts,opts);
return STREAM_UNSUPPORTED;
}
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index f92c4877cc..d8dd416f9d 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -541,7 +541,7 @@ static void show_audio_subs_languages(dvdnav_t *nav)
format = 1; //unknown
id = i + base[format];
if (lang != 0xFFFF) {
- mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDaudioStreamInfo, i,
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n", i,
dvd_audio_stream_types[format], dvd_audio_stream_channels[channels], tmp, id);
if(lang && tmp[0])
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", id, tmp);
@@ -562,7 +562,7 @@ static void show_audio_subs_languages(dvdnav_t *nav)
}
tmp[2] = 0;
if (lang != 0xFFFF)
- mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, i+0x20, tmp);
+ mp_tmsg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", i+0x20, tmp);
}
}
@@ -575,7 +575,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
else if(dvd_device) filename= dvd_device;
else filename = DEFAULT_DVD_DEVICE;
if(!(priv=new_dvdnav_stream(filename))) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,filename, strerror(errno));
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",filename, strerror(errno));
return STREAM_UNSUPPORTED;
}
diff --git a/stream/stream_file.c b/stream/stream_file.c
index de89baea6f..8d3111f4ea 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -126,7 +126,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
if(!strcmp(filename,"-")){
if(mode == STREAM_READ) {
// read from stdin
- mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN);
+ mp_tmsg(MSGT_OPEN,MSGL_INFO,"Reading from stdin...\n");
f=0; // 0=stdin
#ifdef __MINGW32__
setmode(fileno(stdin),O_BINARY);
@@ -145,7 +145,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
#endif
f=open(filename,m, openmode);
if(f<0) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"File not found: '%s'\n",filename);
m_struct_free(&stream_opts,opts);
return STREAM_ERROR;
}
diff --git a/stream/stream_live555.c b/stream/stream_live555.c
index db32150f08..77aec3eda4 100644
--- a/stream/stream_live555.c
+++ b/stream/stream_live555.c
@@ -67,7 +67,7 @@ static int open_live_sdp(stream_t *stream,int mode, void* opts, int* file_format
f = open(filename,O_RDONLY);
#endif
if(f < 0) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"File not found: '%s'\n",filename);
return STREAM_ERROR;
}
diff --git a/stream/stream_radio.c b/stream/stream_radio.c
index 965ee52626..df8ed8628b 100644
--- a/stream/stream_radio.c
+++ b/stream/stream_radio.c
@@ -183,7 +183,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, MSGTR_RADIO_ChannelNamesDetected);
+ mp_tmsg(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;
@@ -201,7 +201,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, MSGTR_RADIO_WrongFreqForChannel,
+ mp_tmsg(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] = ' ';
@@ -227,17 +227,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, MSGTR_RADIO_WrongChannelNumberFloat,freq_channel);
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %.2f\n",freq_channel);
else
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_WrongChannelNumberInt,(int)freq_channel);
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %d\n",(int)freq_channel);
return STREAM_ERROR;
}
- mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_SelectedChannel, priv->radio_channel_current->index,
+ mp_tmsg(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, MSGTR_RADIO_FreqParameterDetected);
+ mp_tmsg(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;
@@ -248,7 +248,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
*pfreq=freq_channel;
}
}
- mp_tmsg(MSGT_RADIO, MSGL_DBG2, MSGTR_RADIO_DoneParsingChannels);
+ mp_tmsg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n");
return STREAM_OK;
}
@@ -271,25 +271,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,MSGTR_RADIO_GetTunerFailed,strerror(errno),priv->frac);
+ mp_tmsg(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,MSGTR_RADIO_NotRadioDevice,priv->radio_param->device);
+ mp_tmsg(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,MSGTR_RADIO_TunerCapLowYes,priv->frac);
+ mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:yes frac=%d\n",priv->frac);
}
else{
priv->frac=16;
- mp_tmsg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowNo,priv->frac);
+ mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:no frac=%d\n",priv->frac);
}
priv->rangelow=((float)tuner.rangelow)/priv->frac;
priv->rangehigh=((float)tuner.rangehigh)/priv->frac;
- mp_tmsg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_FreqRange,priv->rangelow,priv->rangehigh);
+ mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Allowed frequency range is %.2f-%.2f MHz.\n",priv->rangelow,priv->rangehigh);
return STREAM_OK;
}
@@ -306,7 +306,7 @@ static int set_frequency_v4l2(radio_priv_t* priv,float frequency){
freq.type=V4L2_TUNER_RADIO;
freq.frequency=frequency*priv->frac;
if(ioctl(priv->radio_fd,VIDIOC_S_FREQUENCY,&freq)<0){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_SetFreqFailed,freq.frequency,
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq.frequency,
frequency,strerror(errno));
return STREAM_ERROR;
}
@@ -322,7 +322,7 @@ static int get_frequency_v4l2(radio_priv_t* priv,float* frequency){
struct v4l2_frequency freq;
memset(&freq,0,sizeof(freq));
if (ioctl(priv->radio_fd, VIDIOC_G_FREQUENCY, &freq) < 0) {
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetFreqFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get frequency failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
*frequency=((float)freq.frequency)/priv->frac;
@@ -346,13 +346,13 @@ static void set_volume_v4l2(radio_priv_t* priv,int volume){
control.id=V4L2_CID_AUDIO_MUTE;
control.value = (volume==0?1:0);
if (ioctl(priv->radio_fd, VIDIOC_S_CTRL, &control)<0){
- mp_tmsg(MSGT_RADIO,MSGL_WARN,MSGTR_RADIO_SetMuteFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] ioctl set mute failed: %s\n",strerror(errno));
}
memset(&qctrl,0,sizeof(qctrl));
qctrl.id = V4L2_CID_AUDIO_VOLUME;
if (ioctl(priv->radio_fd, VIDIOC_QUERYCTRL, &qctrl) < 0) {
- mp_tmsg(MSGT_RADIO, MSGL_WARN, MSGTR_RADIO_QueryControlFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO, MSGL_WARN, "[radio] ioctl query control failed: %s\n",strerror(errno));
return;
}
@@ -360,7 +360,7 @@ static void set_volume_v4l2(radio_priv_t* priv,int volume){
control.id=V4L2_CID_AUDIO_VOLUME;
control.value=qctrl.minimum+volume*(qctrl.maximum-qctrl.minimum)/100;
if (ioctl(priv->radio_fd, VIDIOC_S_CTRL, &control) < 0) {
- mp_tmsg(MSGT_RADIO, MSGL_WARN,MSGTR_RADIO_SetVolumeFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO, MSGL_WARN,"[radio] ioctl set volume failed: %s\n",strerror(errno));
}
}
@@ -376,14 +376,14 @@ static int get_volume_v4l2(radio_priv_t* priv,int* volume){
memset(&qctrl,0,sizeof(qctrl));
qctrl.id = V4L2_CID_AUDIO_VOLUME;
if (ioctl(priv->radio_fd, VIDIOC_QUERYCTRL, &qctrl) < 0) {
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_QueryControlFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] ioctl query control failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
memset(&control,0,sizeof(control));
control.id=V4L2_CID_AUDIO_VOLUME;
if (ioctl(priv->radio_fd, VIDIOC_G_CTRL, &control) < 0) {
- mp_tmsg(MSGT_RADIO, MSGL_ERR,MSGTR_RADIO_GetVolumeFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO, MSGL_ERR,"[radio] ioctl get volume failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
@@ -402,7 +402,7 @@ static int get_volume_v4l2(radio_priv_t* priv,int* volume){
/* v4l2 driver info structure */
static const radio_driver_t radio_driver_v4l2={
"v4l2",
- _(MSGTR_RADIO_DriverV4L)2,
+ _("[radio] Using V4Lv1 radio interface.\n")2,
init_frac_v4l2,
set_volume_v4l2,
get_volume_v4l2,
@@ -428,20 +428,20 @@ static int init_frac_v4l(radio_priv_t* priv){
struct video_tuner tuner;
memset(&tuner,0,sizeof(tuner));
if (ioctl(priv->radio_fd, VIDIOCGTUNER, &tuner) <0){
- mp_tmsg(MSGT_RADIO,MSGL_WARN,MSGTR_RADIO_GetTunerFailed,strerror(errno),priv->frac);
+ mp_tmsg(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.flags & VIDEO_TUNER_LOW){
priv->frac=16000;
- mp_tmsg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowYes,priv->frac);
+ mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:yes frac=%d\n",priv->frac);
}else{
priv->frac=16;
- mp_tmsg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowNo,priv->frac);
+ mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:no frac=%d\n",priv->frac);
}
priv->rangelow=((float)tuner.rangelow)/priv->frac;
priv->rangehigh=((float)tuner.rangehigh)/priv->frac;
- mp_tmsg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_FreqRange,priv->rangelow,priv->rangehigh);
+ mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Allowed frequency range is %.2f-%.2f MHz.\n",priv->rangelow,priv->rangehigh);
return STREAM_OK;
}
@@ -455,7 +455,7 @@ static int set_frequency_v4l(radio_priv_t* priv,float frequency){
__u32 freq;
freq=frequency*priv->frac;
if (ioctl(priv->radio_fd, VIDIOCSFREQ, &freq) < 0) {
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_SetFreqFailed,freq,frequency,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq,frequency,strerror(errno));
return STREAM_ERROR;
}
return STREAM_OK;
@@ -468,7 +468,7 @@ static int set_frequency_v4l(radio_priv_t* priv,float frequency){
static int get_frequency_v4l(radio_priv_t* priv,float* frequency){
__u32 freq;
if (ioctl(priv->radio_fd, VIDIOCGFREQ, &freq) < 0) {
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetFreqFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get frequency failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
*frequency=((float)freq)/priv->frac;
@@ -490,7 +490,7 @@ static void set_volume_v4l(radio_priv_t* priv,int volume){
memset(&audio,0,sizeof(audio));
audio.flags = (volume==0?VIDEO_AUDIO_MUTE:0);
if (ioctl(priv->radio_fd, VIDIOCSAUDIO, &audio)<0){
- mp_tmsg(MSGT_RADIO,MSGL_WARN,MSGTR_RADIO_SetMuteFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] ioctl set mute failed: %s\n",strerror(errno));
}
memset(&audio,0,sizeof(audio));
@@ -500,7 +500,7 @@ static void set_volume_v4l(radio_priv_t* priv,int volume){
audio.volume = volume* (65535 / 100);
if (ioctl(priv->radio_fd, VIDIOCSAUDIO, &audio) < 0){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_SetVolumeFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set volume failed: %s\n",strerror(errno));
}
}
@@ -515,7 +515,7 @@ static int get_volume_v4l(radio_priv_t* priv,int* volume){
memset(&audio,0,sizeof(audio));
audio.audio=0;
if (ioctl(priv->radio_fd, VIDIOCGAUDIO, &audio) < 0){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetVolumeFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get volume failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
@@ -533,7 +533,7 @@ static int get_volume_v4l(radio_priv_t* priv,int* volume){
/* v4l driver info structure */
static const radio_driver_t radio_driver_v4l={
"v4l",
- _(MSGTR_RADIO_DriverV4L),
+ _("[radio] Using V4Lv1 radio interface.\n"),
init_frac_v4l,
set_volume_v4l,
get_volume_v4l,
@@ -576,7 +576,7 @@ static int set_frequency_bsdbt848(radio_priv_t* priv,float frequency){
unsigned int freq;
freq=frequency*priv->frac;
if(ioctl(priv->radio_fd,RADIO_SETFREQ,&freq)<0){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_SetFreqFailed,freq, frequency, strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq, frequency, strerror(errno));
return STREAM_ERROR;
}
return STREAM_OK;
@@ -590,7 +590,7 @@ static int set_frequency_bsdbt848(radio_priv_t* priv,float frequency){
static int get_frequency_bsdbt848(radio_priv_t* priv,float* frequency){
unsigned int freq;
if (ioctl(priv->radio_fd, RADIO_GETFREQ, &freq) < 0) {
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetFreqFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get frequency failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
*frequency=((float)freq)/priv->frac;
@@ -614,7 +614,7 @@ static void set_volume_bsdbt848(radio_priv_t* priv,int volume){
audio_flags = (volume==0?AUDIO_MUTE:AUDIO_UNMUTE);
if (ioctl(priv->radio_fd, BT848_SAUDIO, &audio_flags)<0){
- mp_tmsg(MSGT_RADIO,MSGL_WARN,MSGTR_RADIO_SetMuteFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] ioctl set mute failed: %s\n",strerror(errno));
}
}
@@ -630,7 +630,7 @@ static int get_volume_bsdbt848(radio_priv_t* priv,int* volume){
int audio_flags;
if (ioctl(priv->radio_fd, BT848_GAUDIO, &audio_flags)<0){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetVolumeFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get volume failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
@@ -645,7 +645,7 @@ static int get_volume_bsdbt848(radio_priv_t* priv,int* volume){
/* bsdbt848 driver info structure */
static const radio_driver_t radio_driver_bsdbt848={
"bsdbt848",
- _(MSGTR_RADIO_DriverBSDBT848),
+ _("[radio] Using *BSD BT848 radio interface.\n"),
init_frac_bsdbt848,
set_volume_bsdbt848,
get_volume_bsdbt848,
@@ -659,7 +659,7 @@ static inline int init_frac(radio_priv_t* priv){
}
static inline int set_frequency(radio_priv_t* priv,float frequency){
if ((frequency<priv->rangelow)||(frequency>priv->rangehigh)){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_WrongFreq,frequency);
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong frequency: %.2f\n",frequency);
return STREAM_ERROR;
}
if(priv->driver->set_frequency(priv,frequency)!=STREAM_OK)
@@ -667,7 +667,7 @@ static inline int set_frequency(radio_priv_t* priv,float frequency){
#ifdef CONFIG_RADIO_CAPTURE
if(clear_buffer(priv)!=STREAM_OK){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_ClearBufferFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Clearing buffer failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
#endif
@@ -722,16 +722,16 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer)
if (ret != ai->alsa.chunk_size) {
if (ret < 0) {
if (ret==-EAGAIN) return -1;
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, snd_strerror(ret));
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret));
if (ret == -EPIPE) {
if (ai_alsa_xrun(ai) == 0) {
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_XRUNSomeFramesMayBeLeftOut);
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n");
} else {
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrFatalCannotRecover);
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "Fatal error, cannot recover!\n");
}
}
} else {
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_NotEnoughSamples);
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nNot enough audio samples!\n");
}
return -1;
}
@@ -753,7 +753,7 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer)
if (ret<0){
if (errno==EAGAIN && bt==0) return -1; //no data avail yet
if (errno==EAGAIN) { usleep(1000); continue;} //nilling buffer to blocksize size
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, strerror(errno));
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno));
return -1;
}
bt+=ret;
@@ -785,7 +785,7 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer)
static int grab_audio_frame(radio_priv_t *priv, char *buffer, int len)
{
int i;
- mp_tmsg(MSGT_RADIO, MSGL_DBG3, MSGTR_RADIO_BufferString,"grab_audio_frame",priv->audio_cnt,priv->audio_drop);
+ mp_tmsg(MSGT_RADIO, MSGL_DBG3, "[radio] %s: in buffer=%d dropped=%d\n","grab_audio_frame",priv->audio_cnt,priv->audio_drop);
/* Cache buffer must be filled by some audio packets when playing starts.
Otherwise MPlayer will quit with EOF error.
Probably, there is need more carefull checking rather than simple 'for' loop
@@ -835,7 +835,7 @@ static int init_audio(radio_priv_t *priv)
}
priv->do_capture=1;
- mp_tmsg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_CaptureStarting);
+ mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Starting capture stuff.\n");
#ifdef CONFIG_ALSA
while ((tmp = strrchr(priv->radio_param->adevice, '='))){
tmp[0] = ':';
@@ -847,7 +847,7 @@ static int init_audio(radio_priv_t *priv)
#endif
if(audio_in_init(&priv->audio_in, is_oss?AUDIO_IN_OSS:AUDIO_IN_ALSA)<0){
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AudioInInitFailed);
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_init failed.\n");
}
audio_in_set_device(&priv->audio_in, priv->radio_param->adevice);
@@ -855,7 +855,7 @@ static int init_audio(radio_priv_t *priv)
audio_in_set_samplerate(&priv->audio_in, priv->radio_param->arate);
if (audio_in_setup(&priv->audio_in) < 0) {
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AudioInSetupFailed, strerror(errno));
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_setup call failed: %s\n", strerror(errno));
return STREAM_ERROR;
}
#ifdef CONFIG_OSS_AUDIO
@@ -871,12 +871,12 @@ static int init_audio(radio_priv_t *priv)
priv->audio_in.bytes_per_sample+priv->audio_in.blocksize;
if (priv->audio_buffer_size < 256*priv->audio_in.blocksize)
priv->audio_buffer_size = 256*priv->audio_in.blocksize;
- mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_AudioBuffer,
+ mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Audio capture - buffer=%d bytes (block=%d bytes).\n",
priv->audio_buffer_size,priv->audio_in.blocksize);
/* start capture */
priv->audio_ringbuffer = calloc(1, priv->audio_buffer_size);
if (!priv->audio_ringbuffer) {
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AllocateBufferFailed,priv->audio_in.blocksize, priv->audio_buffer_size, strerror(errno));
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] cannot allocate audio buffer (block=%d,buf=%d): %s\n",priv->audio_in.blocksize, priv->audio_buffer_size, strerror(errno));
return STREAM_ERROR;
}
priv->audio_head = 0;
@@ -924,7 +924,7 @@ int radio_set_freq(struct stream *stream, float frequency){
if (get_frequency(priv,&frequency)!=STREAM_OK){
return 0;
}
- mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_CurrentFreq,frequency);
+ mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Current frequency: %.2f\n",frequency);
return 1;
}
@@ -969,7 +969,7 @@ int radio_step_channel(struct stream *stream, int direction) {
priv->radio_channel_current = priv->radio_channel_list;
if(!radio_set_freq(stream,priv->radio_channel_current->freq))
return 0;
- mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel,
+ mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
priv->radio_channel_current->index, priv->radio_channel_current->name,
priv->radio_channel_current->freq);
break;
@@ -981,13 +981,13 @@ int radio_step_channel(struct stream *stream, int direction) {
priv->radio_channel_current = priv->radio_channel_current->next;
if(!radio_set_freq(stream,priv->radio_channel_current->freq))
return 0;
- mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel,
+ mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
priv->radio_channel_current->index, priv->radio_channel_current->name,
priv->radio_channel_current->freq);
break;
}
}else
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_ChangeChannelNoChannelList);
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n");
return 1;
}
@@ -1006,7 +1006,7 @@ int radio_set_channel(struct stream *stream, char *channel) {
char* endptr;
if (*channel=='\0')
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_WrongChannelName,channel);
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel);
if (priv->radio_channel_list) {
channel_int = strtol(channel,&endptr,10);
@@ -1017,7 +1017,7 @@ int radio_set_channel(struct stream *stream, char *channel) {
if (!strncmp(channel,tmp->name,sizeof(tmp->name)-1))
break;
if (!tmp){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_WrongChannelName,channel);
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel);
return 0;
}
}else{
@@ -1027,17 +1027,17 @@ int radio_set_channel(struct stream *stream, char *channel) {
else
break;
if (tmp->index!=channel_int){
- mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_WrongChannelNumberInt,channel_int);
+ mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel number: %d\n",channel_int);
return 0;
}
}
priv->radio_channel_current=tmp;
- mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel, priv->radio_channel_current->index,
+ mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
priv->radio_channel_current->name, priv->radio_channel_current->freq);
if(!radio_set_freq(stream, priv->radio_channel_current->freq))
return 0;
} else
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_ChangeChannelNoChannelList);
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n");
return 1;
}
@@ -1129,7 +1129,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
else
priv->driver=NULL;
- mp_tmsg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_AvailableDrivers);
+ mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Available drivers: ");
for(i=0;radio_drivers[i];i++){
mp_msg(MSGT_RADIO,MSGL_V,"%s, ",radio_drivers[i]->name);
if(strcmp(priv->radio_param->driver,radio_drivers[i]->name)==0)
@@ -1140,7 +1140,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
if(priv->driver)
mp_msg(MSGT_RADIO, MSGL_INFO, priv->driver->info);
else{
- mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_DriverUnknownStr,priv->radio_param->driver);
+ mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Unknown driver name: %s\n",priv->radio_param->driver);
close_s(stream);
return STREAM_ERROR;
}
@@ -1160,12 +1160,12 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
priv->radio_fd = open(priv->radio_param->device, O_RDONLY);
if (priv->radio_fd < 0) {
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_UnableOpenDevice,
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Unable to open '%s': %s\n",
priv->radio_param->device, strerror(errno));
close_s(stream);
return STREAM_ERROR;
}
- mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_RadioDevice, priv->radio_fd,priv->radio_param->device);
+ mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Radio fd: %d, %s\n", priv->radio_fd,priv->radio_param->device);
fcntl(priv->radio_fd, F_SETFD, FD_CLOEXEC);
get_volume(priv, &priv->old_snd_volume);
@@ -1182,11 +1182,11 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
}
if ((frequency<priv->rangelow)||(frequency>priv->rangehigh)){
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_WrongFreq,frequency);
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency: %.2f\n",frequency);
close_s(stream);
return STREAM_ERROR;
}else
- mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_UsingFreq,frequency);
+ mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Using frequency: %.2f.\n",frequency);
if(set_frequency(priv,frequency)!=STREAM_OK){
close_s(stream);
@@ -1205,7 +1205,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
if(!stream_enable_cache(stream,5*priv->audio_in.samplerate*priv->audio_in.channels*
priv->audio_in.bytes_per_sample,2*priv->audio_in.samplerate*priv->audio_in.channels*
priv->audio_in.bytes_per_sample,priv->audio_in.blocksize)) {
- mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_StreamEnableCacheFailed,strerror(errno));
+ mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Call to stream_enable_cache failed: %s\n",strerror(errno));
close_s(stream);
return STREAM_ERROR;
}
diff --git a/stream/stream_smb.c b/stream/stream_smb.c
index 627361fdde..0c6fcac923 100644
--- a/stream/stream_smb.c
+++ b/stream/stream_smb.c
@@ -119,14 +119,14 @@ static int open_f (stream_t *stream, int mode, void *opts, int* file_format) {
err = smbc_init(smb_auth_fn, 1);
if (err < 0) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_SMBInitError,err);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Cannot init the libsmbclient library: %d\n",err);
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
fd = smbc_open(filename, m,0644);
if (fd < 0) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_SMBFileNotFound, filename);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Could not open from LAN: '%s'\n", filename);
m_struct_free(&stream_opts, opts);
return STREAM_ERROR;
}
diff --git a/stream/stream_vcd.c b/stream/stream_vcd.c
index fbda28d236..338afc1a14 100644
--- a/stream/stream_vcd.c
+++ b/stream/stream_vcd.c
@@ -112,7 +112,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
f=open(p->device,O_RDONLY);
#endif
if(f<0){
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_CdDevNotfound,p->device);
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"CD-ROM Device '%s' not found.\n",p->device);
m_struct_free(&stream_opts,opts);
return STREAM_ERROR;
}
@@ -126,7 +126,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
}
ret2=vcd_get_track_end(vcd,p->track);
if(ret2<0){
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (get)\n");
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Error selecting VCD track." " (get)\n");
close(f);
free(vcd);
m_struct_free(&stream_opts,opts);
@@ -134,7 +134,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
}
ret=vcd_seek_to_track(vcd,p->track);
if(ret<0){
- mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (seek)\n");
+ mp_tmsg(MSGT_OPEN,MSGL_ERR,"Error selecting VCD track." " (seek)\n");
close(f);
free(vcd);
m_struct_free(&stream_opts,opts);
diff --git a/stream/tcp.c b/stream/tcp.c
index 1857b4e57d..e0f1795bf9 100644
--- a/stream/tcp.c
+++ b/stream/tcp.c
@@ -108,7 +108,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
case AF_INET6: our_s_addr = (void *) &server_address.six.sin6_addr; break;
#endif
default:
- mp_tmsg(MSGT_NETWORK,MSGL_ERR, MSGTR_MPDEMUX_NW_UnknownAF, af);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR, "Unknown address family %d\n", af);
return TCP_ERROR_FATAL;
}
@@ -123,7 +123,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
if ( inet_addr(host)==INADDR_NONE )
#endif
{
- if(verb) mp_tmsg(MSGT_NETWORK,MSGL_STATUS,MSGTR_MPDEMUX_NW_ResolvingHostForAF, host, af2String(af));
+ if(verb) mp_tmsg(MSGT_NETWORK,MSGL_STATUS,"Resolving %s for %s...\n", host, af2String(af));
#ifdef HAVE_GETHOSTBYNAME2
hp=(struct hostent*)gethostbyname2( host, af );
@@ -131,7 +131,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
hp=(struct hostent*)gethostbyname( host );
#endif
if( hp==NULL ) {
- if(verb) mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_CantResolv, af2String(af), host);
+ if(verb) mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Couldn't resolve name for %s: %s\n", af2String(af), host);
return TCP_ERROR_FATAL;
}
@@ -158,7 +158,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
break;
#endif
default:
- mp_tmsg(MSGT_NETWORK,MSGL_ERR, MSGTR_MPDEMUX_NW_UnknownAF, af);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR, "Unknown address family %d\n", af);
return TCP_ERROR_FATAL;
}
@@ -167,7 +167,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
#else
inet_ntop(af, our_s_addr, buf, 255);
#endif
- if(verb) mp_tmsg(MSGT_NETWORK,MSGL_STATUS,MSGTR_MPDEMUX_NW_ConnectingToServer, host, buf , port );
+ if(verb) mp_tmsg(MSGT_NETWORK,MSGL_STATUS,"Connecting to server %s[%s]: %d...\n", host, buf , port );
// Turn the socket as non blocking so we can timeout on the connection
#if !HAVE_WINSOCK2_H
@@ -182,7 +182,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
#else
if( (WSAGetLastError() != WSAEINPROGRESS) && (WSAGetLastError() != WSAEWOULDBLOCK) ) {
#endif
- if(verb) mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_CantConnect2Server, af2String(af));
+ if(verb) mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Failed to connect to server with %s\n", af2String(af));
closesocket(socket_server_fd);
return TCP_ERROR_PORT;
}
@@ -195,7 +195,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
while((ret = select(socket_server_fd+1, NULL, &set, NULL, &tv)) == 0) {
if(count > 30 || stream_check_interrupt(500)) {
if(count > 30)
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ConnTimeout);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"connection timeout\n");
else
mp_msg(MSGT_NETWORK,MSGL_V,"Connection interrupted by user\n");
return TCP_ERROR_TIMEOUT;
@@ -206,7 +206,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
tv.tv_sec = 0;
tv.tv_usec = 500000;
}
- if (ret < 0) mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_SelectFailed);
+ if (ret < 0) mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Select failed.\n");
// Turn back the socket as blocking
#if !HAVE_WINSOCK2_H
@@ -219,11 +219,11 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
err_len = sizeof(int);
ret = getsockopt(socket_server_fd,SOL_SOCKET,SO_ERROR,&err,&err_len);
if(ret < 0) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_GetSockOptFailed,strerror(errno));
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"getsockopt failed: %s\n",strerror(errno));
return TCP_ERROR_FATAL;
}
if(err > 0) {
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ConnectError,strerror(err));
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"connect error: %s\n",strerror(err));
return TCP_ERROR_PORT;
}
diff --git a/stream/tv.c b/stream/tv.c
index ec67a171f1..6a54306bbe 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -83,7 +83,7 @@ static void tv_scan(tvi_handle_t *tvh)
//Channel scanner without tuner is useless and causes crash due to uninitialized chanlist_s
if (tvh->functions->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) != TVI_CONTROL_TRUE)
{
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_ScannerNotAvailableWithoutTuner);
+ mp_tmsg(MSGT_TV, MSGL_WARN, "Channel scanner is not available without tuner\n");
tvh->tv_param->scan=0;
return;
}
@@ -220,7 +220,7 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm)
if(ret!=TVI_CONTROL_UNKNOWN)
{
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm,"default");
+ mp_tmsg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm,"default");
return 0;
}
@@ -239,7 +239,7 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm)
else if (!strcasecmp(norm, "ntscjp"))
return TV_NORM_NTSCJP;
else {
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm, "PAL");
+ mp_tmsg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm, "PAL");
return TV_NORM_PAL;
}
}
@@ -248,7 +248,7 @@ static void parse_channels(tvi_handle_t *tvh)
{
char** channels = tvh->tv_param->channels;
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_ChannelNamesDetected);
+ mp_tmsg(MSGT_TV, MSGL_INFO, "TV channel names detected.\n");
tv_channel_list = malloc(sizeof(tv_channels_t));
tv_channel_list->index=1;
tv_channel_list->next=NULL;
@@ -288,7 +288,7 @@ static void parse_channels(tvi_handle_t *tvh)
}
}
if (tv_channel_current->freq == 0)
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoFreqForChannel,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Couldn't find frequency for channel %s (%s)\n",
tv_channel_current->number, tv_channel_current->name);
else {
sep = strchr(tv_channel_current->name, '-');
@@ -328,9 +328,9 @@ int tv_set_norm(tvi_handle_t *tvh, char* norm)
{
tvh->norm = norm_from_string(tvh, norm);
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNorm, norm);
+ mp_tmsg(MSGT_TV, MSGL_V, "Selected norm : %s\n", norm);
if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
return 0;
}
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
@@ -341,9 +341,9 @@ static int tv_set_norm_i(tvi_handle_t *tvh, int norm)
{
tvh->norm = norm;
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNormId, norm);
+ mp_tmsg(MSGT_TV, MSGL_V, "Selected norm id: %d\n", norm);
if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
return 0;
}
@@ -368,7 +368,7 @@ static int open_tv(tvi_handle_t *tvh)
if (funcs->control(tvh->priv, TVI_CONTROL_IS_VIDEO, 0) != TVI_CONTROL_TRUE)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoVideoInputPresent);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Error: No video input present!\n");
return 0;
}
@@ -396,7 +396,14 @@ static int open_tv(tvi_handle_t *tvh)
case IMGFMT_BGR15:
break;
default:
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_UnknownImageFormat,tvh->tv_param->outfmt);
+ mp_tmsg(MSGT_TV, MSGL_ERR,
+ "==================================================================\n"\
+ " WARNING: UNTESTED OR UNKNOWN OUTPUT IMAGE FORMAT REQUESTED (0x%x)\n"\
+ " This may cause buggy playback or program crash! Bug reports will\n"\
+ " be ignored! You should try again with YV12 (which is the default\n"\
+ " colorspace) and read the documentation!\n"\
+ "==================================================================\n"
+ ,tvh->tv_param->outfmt);
}
funcs->control(tvh->priv, TVI_CONTROL_VID_SET_FORMAT, &tvh->tv_param->outfmt);
}
@@ -434,7 +441,7 @@ static int open_tv(tvi_handle_t *tvh)
tvh->tv_param->height = 480/tvh->tv_param->decimation;
}
mp_tmsg(MSGT_TV, MSGL_INFO,
- MSGTR_TV_MJP_WidthHeight, tvh->tv_param->width, tvh->tv_param->height);
+ " MJP: width %d height %d\n", tvh->tv_param->width, tvh->tv_param->height);
}
#endif
@@ -452,7 +459,7 @@ static int open_tv(tvi_handle_t *tvh)
funcs->control(tvh->priv, TVI_CONTROL_VID_SET_WIDTH, &tvh->tv_param->width);
else
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_UnableToSetWidth, tvh->tv_param->width);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set requested width: %d\n", tvh->tv_param->width);
funcs->control(tvh->priv, TVI_CONTROL_VID_GET_WIDTH, &tvh->tv_param->width);
}
}
@@ -464,14 +471,14 @@ static int open_tv(tvi_handle_t *tvh)
funcs->control(tvh->priv, TVI_CONTROL_VID_SET_HEIGHT, &tvh->tv_param->height);
else
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_UnableToSetHeight, tvh->tv_param->height);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set requested height: %d\n", tvh->tv_param->height);
funcs->control(tvh->priv, TVI_CONTROL_VID_GET_HEIGHT, &tvh->tv_param->height);
}
}
if (funcs->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) != TVI_CONTROL_TRUE)
{
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_NoTuner);
+ mp_tmsg(MSGT_TV, MSGL_WARN, "Selected input hasn't got a tuner!\n");
goto done;
}
@@ -487,15 +494,15 @@ static int open_tv(tvi_handle_t *tvh)
}
if (tvh->chanlist == -1)
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnableFindChanlist,
+ mp_tmsg(MSGT_TV, MSGL_WARN, "Unable to find selected channel list! (%s)\n",
tvh->tv_param->chanlist);
else
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedChanlist,
+ mp_tmsg(MSGT_TV, MSGL_V, "Selected channel list: %s (including %d channels)\n",
chanlists[tvh->chanlist].name, chanlists[tvh->chanlist].count);
if (tvh->tv_param->freq && tvh->tv_param->channel)
{
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_ChannelFreqParamConflict);
+ mp_tmsg(MSGT_TV, MSGL_WARN, "You can't set frequency and channel simultaneously!\n");
goto done;
}
@@ -537,7 +544,7 @@ static int open_tv(tvi_handle_t *tvh)
tv_channel_current = tv_channel_current->next;
}
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n", tv_channel_current->number,
tv_channel_current->name, (float)tv_channel_current->freq/1000);
tv_set_norm_i(tvh, tv_channel_current->norm);
tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
@@ -552,14 +559,14 @@ static int open_tv(tvi_handle_t *tvh)
funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq);
funcs->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq);
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedFrequency,
+ mp_tmsg(MSGT_TV, MSGL_V, "Selected frequency: %lu (%.3f)\n",
freq, (float)freq/16);
}
if (tvh->tv_param->channel) {
struct CHANLIST cl;
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_RequestedChannel, tvh->tv_param->channel);
+ mp_tmsg(MSGT_TV, MSGL_V, "Requested channel: %s\n", tvh->tv_param->channel);
for (i = 0; i < chanlists[tvh->chanlist].count; i++)
{
cl = tvh->chanlist_s[i];
@@ -569,7 +576,7 @@ static int open_tv(tvi_handle_t *tvh)
{
strcpy(tv_channel_last_real, cl.name);
tvh->channel = i;
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
cl.name, (float)cl.freq/1000);
tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
break;
@@ -607,7 +614,7 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param)
int i;
tvi_handle_t* h;
if(tv_param->driver && !strcmp(tv_param->driver,"help")){
- mp_tmsg(MSGT_TV,MSGL_INFO,MSGTR_TV_AvailableDrivers);
+ mp_tmsg(MSGT_TV,MSGL_INFO,"Available drivers:\n");
for(i=0;tvi_driver_list[i];i++){
mp_msg(MSGT_TV,MSGL_INFO," %s\t%s",tvi_driver_list[i]->short_name,tvi_driver_list[i]->name);
if(tvi_driver_list[i]->comment)
@@ -628,7 +635,7 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param)
continue;
h->tv_param=tv_param;
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_DriverInfo, tvi_driver_list[i]->short_name,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected driver: %s\n name: %s\n author: %s\n comment: %s\n", tvi_driver_list[i]->short_name,
tvi_driver_list[i]->name,
tvi_driver_list[i]->author,
tvi_driver_list[i]->comment?tvi_driver_list[i]->comment:"");
@@ -638,9 +645,9 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param)
}
if(tv_param->driver)
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoSuchDriver, tv_param->driver);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "No such driver: %s\n", tv_param->driver);
else
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_DriverAutoDetectionFailed);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "TV driver autodetection failed.\n");
return NULL;
}
@@ -755,7 +762,7 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer)
case AF_FORMAT_MPEG2:
case AF_FORMAT_AC3:
default:
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_UnsupportedAudioType,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Audio type '%s (%x)' unsupported!\n",
af_fmt2str(audio_format, buf, 128), audio_format);
goto no_audio;
}
@@ -785,7 +792,7 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer)
sh_audio->wf->nBlockAlign = sh_audio->samplesize * sh_audio->channels;
sh_audio->wf->nAvgBytesPerSec = sh_audio->i_bps;
- mp_tmsg(MSGT_DECVIDEO, MSGL_V, MSGTR_TV_AudioFormat,
+ mp_tmsg(MSGT_DECVIDEO, MSGL_V, " TV audio: %d channels, %d bits, %d Hz\n",
sh_audio->wf->nChannels, sh_audio->wf->wBitsPerSample,
sh_audio->wf->nSamplesPerSec);
@@ -841,7 +848,7 @@ int tv_set_color_options(tvi_handle_t *tvh, int opt, int value)
case TV_COLOR_CONTRAST:
return funcs->control(tvh->priv, TVI_CONTROL_VID_SET_CONTRAST, &value);
default:
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnknownColorOption, opt);
+ mp_tmsg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
}
return TVI_CONTROL_UNKNOWN;
@@ -862,7 +869,7 @@ int tv_get_color_options(tvi_handle_t *tvh, int opt, int* value)
case TV_COLOR_CONTRAST:
return funcs->control(tvh->priv, TVI_CONTROL_VID_GET_CONTRAST, value);
default:
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnknownColorOption, opt);
+ mp_tmsg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
}
return TVI_CONTROL_UNKNOWN;
@@ -873,7 +880,7 @@ int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq)
if (tvh->functions->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) == TVI_CONTROL_TRUE)
{
tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, freq);
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency,
+ mp_tmsg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
*freq, (float)*freq/16);
}
return 1;
@@ -889,7 +896,7 @@ int tv_set_freq(tvi_handle_t *tvh, unsigned long freq)
tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq);
tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq);
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency,
+ mp_tmsg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
freq, (float)freq/16);
}
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
@@ -933,7 +940,7 @@ int tv_step_channel_real(tvi_handle_t *tvh, int direction)
{
strcpy(tv_channel_last_real, tvh->chanlist_s[tvh->channel].name);
cl = tvh->chanlist_s[--tvh->channel];
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
cl.name, (float)cl.freq/1000);
tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
}
@@ -945,7 +952,7 @@ int tv_step_channel_real(tvi_handle_t *tvh, int direction)
{
strcpy(tv_channel_last_real, tvh->chanlist_s[tvh->channel].name);
cl = tvh->chanlist_s[++tvh->channel];
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
cl.name, (float)cl.freq/1000);
tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
}
@@ -965,7 +972,7 @@ int tv_step_channel(tvi_handle_t *tvh, int direction) {
tv_set_norm_i(tvh, tv_channel_current->norm);
tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n",
tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000);
}
if (direction == TV_CHANNEL_LOWER) {
@@ -977,7 +984,7 @@ int tv_step_channel(tvi_handle_t *tvh, int direction) {
tv_channel_current = tv_channel_current->next;
tv_set_norm_i(tvh, tv_channel_current->norm);
tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n",
tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000);
}
} else tv_step_channel_real(tvh, direction);
@@ -998,7 +1005,7 @@ int tv_set_channel_real(tvi_handle_t *tvh, char *channel) {
if (!strcasecmp(cl.name, channel))
{
tvh->channel = i;
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
cl.name, (float)cl.freq/1000);
tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
break;
@@ -1018,7 +1025,7 @@ int tv_set_channel(tvi_handle_t *tvh, char *channel) {
for (i = 1; i < channel_int; i++)
if (tv_channel_current->next)
tv_channel_current = tv_channel_current->next;
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n", tv_channel_current->number,
tv_channel_current->name, (float)tv_channel_current->freq/1000);
tv_set_norm_i(tvh, tv_channel_current->norm);
tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
@@ -1036,7 +1043,7 @@ int tv_last_channel(tvi_handle_t *tvh) {
tv_channel_last = tv_channel_current;
tv_channel_current = tmp;
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n", tv_channel_current->number,
tv_channel_current->name, (float)tv_channel_current->freq/1000);
tv_set_norm_i(tvh, tv_channel_current->norm);
tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
@@ -1051,7 +1058,7 @@ int tv_last_channel(tvi_handle_t *tvh) {
{
strcpy(tv_channel_last_real, tvh->chanlist_s[tvh->channel].name);
tvh->channel = i;
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2,
+ mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
cl.name, (float)cl.freq/1000);
tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
break;
@@ -1069,7 +1076,7 @@ int tv_step_norm(tvi_handle_t *tvh)
tvh->norm = 0;
if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM,
&tvh->norm) != TVI_CONTROL_TRUE) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
return 0;
}
}
diff --git a/stream/tvi_bsdbt848.c b/stream/tvi_bsdbt848.c
index 04c9bac11a..07dd5861ee 100644
--- a/stream/tvi_bsdbt848.c
+++ b/stream/tvi_bsdbt848.c
@@ -233,7 +233,7 @@ static int control(priv_t *priv, int cmd, void *arg)
{
if(ioctl(priv->tunerfd, TVTUNER_GETFREQ, &priv->tunerfreq) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "TVTUNER_GETFREQ", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "TVTUNER_GETFREQ", strerror(errno));
return TVI_CONTROL_FALSE;
}
@@ -247,7 +247,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->tunerfd, TVTUNER_SETFREQ, &priv->tunerfreq) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "TVTUNER_SETFREQ", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "TVTUNER_SETFREQ", strerror(errno));
return 0;
}
@@ -258,7 +258,7 @@ static int control(priv_t *priv, int cmd, void *arg)
int status;
if(ioctl(priv->tunerfd, TVTUNER_GETSTATUS, &status) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "GETSTATUS", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "GETSTATUS", strerror(errno));
return 0;
}
*(int*)arg=(status & 0x02)? 100 : 0;
@@ -274,7 +274,7 @@ static int control(priv_t *priv, int cmd, void *arg)
{
if(ioctl(priv->btfd, METEORGINPUT, &priv->input) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORGINPUT", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORGINPUT", strerror(errno));
return TVI_CONTROL_FALSE;
}
@@ -288,7 +288,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSINPUT, &priv->input) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSINPUT", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSINPUT", strerror(errno));
return 0;
}
@@ -317,7 +317,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Invalid audio rate. Error: %s\n", strerror(errno));
return TVI_CONTROL_FALSE;
}
@@ -405,20 +405,20 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFMT", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFMT", strerror(errno));
return TVI_CONTROL_FALSE;
}
if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSETGEO", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSETGEO", strerror(errno));
return 0;
}
tmp_fps = priv->fps;
if(ioctl(priv->btfd, METEORSFPS, &tmp_fps) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFPS", strerror(errno));
return 0;
}
@@ -426,7 +426,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(priv->tunerready == TRUE &&
ioctl(priv->tunerfd, BT848_SAUDIO, &priv->tv_param->audio_id) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "BT848_SAUDIO", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "BT848_SAUDIO", strerror(errno));
}
#endif
@@ -455,7 +455,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorSettingWidth, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Error setting picture width. Error: %s\n", strerror(errno));
return 0;
}
@@ -480,7 +480,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorSettingWidth, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Error setting picture width. Error: %s\n", strerror(errno));
return 0;
}
@@ -502,7 +502,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFPS", strerror(errno));
return 0;
}
@@ -553,33 +553,33 @@ priv->btfd = open(priv->btdev, O_RDONLY);
if(priv->btfd < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningBktrDev, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Unable to open bktr device. Error: %s\n", strerror(errno));
priv->videoready = FALSE;
}
if(priv->videoready == TRUE &&
ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "SETEORSFMT", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "SETEORSFMT", strerror(errno));
}
if(priv->videoready == TRUE &&
ioctl(priv->btfd, METEORSINPUT, &priv->source) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSINPUT", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSINPUT", strerror(errno));
}
tmp_fps = priv->fps;
if(priv->videoready == TRUE &&
ioctl(priv->btfd, METEORSFPS, &tmp_fps) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFPS", strerror(errno));
}
if(priv->videoready == TRUE &&
ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSGEQ", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSGEQ", strerror(errno));
}
if(priv->videoready == TRUE)
@@ -591,7 +591,7 @@ if(priv->videoready == TRUE)
if(priv->livebuf == (u_char *) MAP_FAILED)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848MmapFailed, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: mmap failed. Error: %s\n", strerror(errno));
priv->videoready = FALSE;
}
@@ -601,7 +601,7 @@ if(priv->videoready == TRUE)
if(priv->framebuf[count].buf == NULL)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848FrameBufAllocFailed, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Frame buffer allocation failed. Error: %s\n", strerror(errno));
priv->videoready = FALSE;
break;
}
@@ -619,7 +619,7 @@ priv->tunerfd = open(priv->tunerdev, O_RDONLY);
if(priv->tunerfd < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningTunerDev, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Unable to open tuner device. Error: %s\n", strerror(errno));
priv->tunerready = FALSE;
}
@@ -637,7 +637,7 @@ priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/priv->fps *
if((priv->dspfd = open (priv->dspdev, O_RDONLY, 0)) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningDspDev, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Unable to open dsp device. Error: %s\n", strerror(errno));
priv->dspready = FALSE;
}
@@ -645,7 +645,7 @@ marg = (256 << 16) | 12;
if (ioctl(priv->dspfd, SNDCTL_DSP_SETFRAGMENT, &marg ) < 0 )
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "SNDCTL_DSP_SETFRAGMENT", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "SNDCTL_DSP_SETFRAGMENT", strerror(errno));
priv->dspready = FALSE;
}
@@ -655,7 +655,7 @@ if((priv->dspready == TRUE) &&
(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &priv->dspspeed) == -1) ||
(ioctl(priv->dspfd, SNDCTL_DSP_SETFMT, &priv->dspfmt) == -1)))
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Configuration of dsp failed. Error: %s\n", strerror(errno));
close(priv->dspfd);
priv->dspready = FALSE;
}
@@ -680,7 +680,7 @@ marg = SIGUSR1;
if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSSIGNAL", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSSIGNAL", strerror(errno));
return 0;
}
@@ -694,7 +694,7 @@ marg = METEOR_CAP_CONTINOUS;
if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORCAPTUR", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORCAPTUR", strerror(errno));
return 0;
}
@@ -711,7 +711,7 @@ marg = METEOR_SIG_MODE_MASK;
if(ioctl( priv->btfd, METEORSSIGNAL, &marg) < 0 )
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSSIGNAL", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSSIGNAL", strerror(errno));
return 0;
}
@@ -719,7 +719,7 @@ marg = METEOR_CAP_STOP_CONT;
if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 )
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848UnableToStopCapture, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Unable to stop capture. Error: %s\n", strerror(errno));
return 0;
}
@@ -814,7 +814,7 @@ while(bytesread < len)
if(ret == -1)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorReadingAudio, strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Error reading audio data. Error: %s\n", strerror(errno));
return 0;
}
@@ -854,7 +854,7 @@ if(priv->dspready == FALSE) return 0;
#ifdef CONFIG_SUN_AUDIO
if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "AUDIO_GETINFO", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "AUDIO_GETINFO", strerror(errno));
return TVI_CONTROL_FALSE;
}
else
@@ -862,7 +862,7 @@ else
#else
if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0)
{
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "FIONREAD", strerror(errno));
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "FIONREAD", strerror(errno));
return TVI_CONTROL_FALSE;
}
#endif
diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c
index 1e996890d0..b474809aa9 100644
--- a/stream/tvi_dshow.c
+++ b/stream/tvi_dshow.c
@@ -1042,10 +1042,10 @@ static HRESULT set_nearest_freq(priv_t * priv, long lFreq)
if (load_freq_table(chanlist2country(priv->tv_param->chanlist), tunerInput, &(priv->freq_table), &(priv->freq_table_len), &(priv->first_channel)) != S_OK) {//FIXME
priv->freq_table_len=0;
priv->freq_table=NULL;
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableExtractFreqTable);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to load frequency table from kstvtune.ax\n");
return E_FAIL;
};
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_FreqTableLoaded, tunerInput == TunerInputAntenna ? "broadcast" : "cable",
+ mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: loaded system (%s) frequency table for country id=%d (channels:%d).\n", tunerInput == TunerInputAntenna ? "broadcast" : "cable",
chanlist2country(priv->tv_param->chanlist), priv->freq_table_len);
}
@@ -1062,14 +1062,14 @@ static HRESULT set_nearest_freq(priv_t * priv, long lFreq)
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: set_nearest_freq #%d (%ld) => %d (%ld)\n",i+priv->first_channel,priv->freq_table[i], nChannel,lFreqDiff);
}
if (nChannel == -1) {
- mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_UnableFindNearestChannel);
+ mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to find nearest channel in system frequency table\n");
return E_FAIL;
}
mp_msg(MSGT_TV, MSGL_V, "tvi_dshow: set_nearest_freq #%d (%ld)\n",nChannel,priv->freq_table[nChannel - priv->first_channel]);
hr = OLE_CALL_ARGS(priv->pTVTuner, put_Channel, nChannel,
AMTUNER_SUBCHAN_DEFAULT, AMTUNER_SUBCHAN_DEFAULT);
if (FAILED(hr)) {
- mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableToSetChannel, (unsigned int)hr);
+ mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to switch to nearest channel from system frequency table. Error:0x%x\n", (unsigned int)hr);
return E_FAIL;
}
return S_OK;
@@ -1096,7 +1096,7 @@ static int set_frequency(priv_t * priv, long lFreq)
if (priv->direct_setfreq_call) { //using direct call to set frequency
hr = set_frequency_direct(priv->pTVTuner, lFreq);
if (FAILED(hr)) {
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_DirectSetFreqFailed);
+ mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: Unable to set frequency directly. OS built-in channels table will be used.\n");
priv->direct_setfreq_call = 0;
}
}
@@ -1171,7 +1171,7 @@ static int get_frequency(priv_t * priv, long *plFreq)
if (priv->direct_getfreq_call) { //using direct call to get frequency
hr = get_frequency_direct(priv->pTVTuner, plFreq);
if (FAILED(hr)) {
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_DirectGetFreqFailed);
+ mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Unable to get frequency directly. OS built-in channels table will be used.\n");
priv->direct_getfreq_call = 0;
}
}
@@ -1205,7 +1205,7 @@ static void get_capabilities(priv_t * priv)
mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: get_capabilities called\n");
if (priv->pTVTuner) {
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_SupportedNorms);
+ mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: supported norms:");
hr = OLE_CALL_ARGS(priv->pTVTuner, get_AvailableTVFormats,
&lAvailableFormats);
if (FAILED(hr))
@@ -1229,7 +1229,7 @@ static void get_capabilities(priv_t * priv)
tv_available_inputs = (long *) malloc(sizeof(long) * lInputPins);
tv_available_inputs_count = 0;
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_AvailableVideoInputs);
+ mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: available video inputs:");
for (i = 0; i < lInputPins; i++) {
OLE_CALL_ARGS(priv->pCrossbar, get_CrossbarPinInfo, 1, i,
&lRelated, &lPhysicalType);
@@ -1250,7 +1250,7 @@ static void get_capabilities(priv_t * priv)
hr = OLE_CALL_ARGS(priv->chains[1]->pCaptureFilter, EnumPins, &pEnum);
if (FAILED(hr))
return;
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_AvailableAudioInputs);
+ mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: available audio inputs:");
i = 0;
while (OLE_CALL_ARGS(pEnum, Next, 1, &pPin, NULL) == S_OK) {
memset(&pi, 0, sizeof(pi));
@@ -1272,7 +1272,7 @@ static void get_capabilities(priv_t * priv)
else
OLE_CALL_ARGS(pIAMixer, put_MixLevel, 1.0);
#endif
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_InputSelected);
+ mp_tmsg(MSGT_TV, MSGL_V, "(selected)");
} else {
OLE_CALL_ARGS(pIAMixer, put_Enable, FALSE);
#if 0
@@ -1417,7 +1417,7 @@ static HRESULT build_sub_graph(priv_t * priv, chain_t * chain, const GUID* ppin_
hr = OLE_CALL_ARGS(chain->pCapturePin, ConnectionMediaType, chain->pmt);
if(FAILED(hr))
{
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TVI_DS_GetActualMediatypeFailed, (unsigned int)hr);
+ mp_tmsg(MSGT_TV, MSGL_WARN, "tvi_dshow: Unable to get actual mediatype (Error:0x%x). Assuming equal to requested.\n", (unsigned int)hr);
}
if(priv->tv_param->hidden_video_renderer){
@@ -1531,7 +1531,7 @@ static int set_crossbar_input(priv_t * priv, int input)
//connecting given input with video decoder
hr = OLE_CALL_ARGS(priv->pCrossbar, Route, nVideoDecoder, lInput);
if (hr != S_OK) {
- mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableConnectInputVideoDecoder, (unsigned int)hr);
+ mp_tmsg(MSGT_TV,MSGL_ERR,"Unable to connect given input to video decoder. Error:0x%x\n", (unsigned int)hr);
return TVI_CONTROL_FALSE;
}
}
@@ -1539,7 +1539,7 @@ static int set_crossbar_input(priv_t * priv, int input)
hr = OLE_CALL_ARGS(priv->pCrossbar, Route, nAudioDecoder,
lInputRelated);
if (hr != S_OK) {
- mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableConnectInputAudioDecoder, (unsigned int)hr);
+ mp_tmsg(MSGT_TV,MSGL_ERR,"Unable to connect given input to audio decoder. Error:0x%x\n", (unsigned int)hr);
return TVI_CONTROL_FALSE;
}
}
@@ -1943,11 +1943,11 @@ static IBaseFilter *find_capture_device(int index, REFCLSID category)
OLE_CALL(pClassEnum,Reset);
for (i = 0; OLE_CALL_ARGS(pClassEnum, Next, 1, &pM, &cFetched) == S_OK; i++) {
if(get_device_name(pM, tmp, DEVICE_NAME_MAX_LEN)!=TVI_CONTROL_TRUE)
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableGetDeviceName, i);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to get name for device #%d\n", i);
else
- mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_DeviceName, i, tmp);
+ mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: Device #%d: %s\n", i, tmp);
if (index != -1 && i == index) {
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_UsingDevice, index, tmp);
+ mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Using device #%d: %s\n", index, tmp);
hr = OLE_CALL_ARGS(pM, BindToObject, 0, 0, &IID_IBaseFilter,(void *) &pFilter);
if (FAILED(hr))
pFilter = NULL;
@@ -1955,7 +1955,7 @@ static IBaseFilter *find_capture_device(int index, REFCLSID category)
OLE_RELEASE_SAFE(pM);
}
if (index != -1 && !pFilter) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_DeviceNotFound,
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Device #%d not found\n",
index);
}
OLE_RELEASE_SAFE(pClassEnum);
@@ -2011,7 +2011,7 @@ static HRESULT get_available_formats_stream(chain_t *chain)
return E_FAIL;
}
} else {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnsupportedMediaType,"get_available_formats_stream");
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unsupported media type passed to %s\n","get_available_formats_stream");
return E_FAIL;
}
done = 0;
@@ -2106,7 +2106,7 @@ static HRESULT get_available_formats_pin(ICaptureGraphBuilder2 * pBuilder,
} else if (chain->type == audio) {
size = sizeof(AUDIO_STREAM_CONFIG_CAPS);
} else {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnsupportedMediaType,"get_available_formats_pin");
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unsupported media type passed to %s\n","get_available_formats_pin");
return E_FAIL;
}
@@ -2470,7 +2470,7 @@ static HRESULT build_video_chain(priv_t *priv)
if (priv->chains[0]->pStreamConfig) {
hr = OLE_CALL_ARGS(priv->chains[0]->pStreamConfig, SetFormat, priv->chains[0]->pmt);
if (FAILED(hr)) {
- mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableSelectVideoFormat, (unsigned int)hr);
+ mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to select video format. Error:0x%x\n", (unsigned int)hr);
}
}
@@ -2487,7 +2487,7 @@ static HRESULT build_video_chain(priv_t *priv)
priv->chains[0]->rbuf->buffersize *= 1024 * 1024;
hr=build_sub_graph(priv, priv->chains[0], &PIN_CATEGORY_CAPTURE);
if(FAILED(hr)){
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableBuildVideoSubGraph,(unsigned int)hr);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to build video chain of capture graph. Error:0x%x\n",(unsigned int)hr);
return hr;
}
return S_OK;
@@ -2513,7 +2513,7 @@ static HRESULT build_audio_chain(priv_t *priv)
hr = OLE_CALL_ARGS(priv->chains[1]->pStreamConfig, SetFormat,
priv->chains[1]->pmt);
if (FAILED(hr)) {
- mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableSelectAudioFormat, (unsigned int)hr);
+ mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to select audio format. Error:0x%x\n", (unsigned int)hr);
}
}
@@ -2530,7 +2530,7 @@ static HRESULT build_audio_chain(priv_t *priv)
hr=build_sub_graph(priv, priv->chains[1],&PIN_CATEGORY_CAPTURE);
if(FAILED(hr)){
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableBuildAudioSubGraph,(unsigned int)hr);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to build audio chain of capture graph. Error:0x%x\n",(unsigned int)hr);
return 0;
}
}
@@ -2561,7 +2561,7 @@ static HRESULT build_vbi_chain(priv_t *priv)
hr=build_sub_graph(priv, priv->chains[2],&PIN_CATEGORY_VBI);
if(FAILED(hr)){
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableBuildVBISubGraph,(unsigned int)hr);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to build VBI chain of capture graph. Error:0x%x\n",(unsigned int)hr);
return 0;
}
}
@@ -2603,12 +2603,12 @@ static int start(priv_t * priv)
mp_msg(MSGT_TV, MSGL_DBG2, "Debug pause end\n");
}
if (!priv->pMediaControl) {
- mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableGetMediaControlInterface,(unsigned int)E_POINTER);
+ mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to get IMediaControl interface. Error:0x%x\n",(unsigned int)E_POINTER);
return 0;
}
hr = OLE_CALL(priv->pMediaControl, Run);
if (FAILED(hr)) {
- mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableStartGraph, (unsigned int)hr);
+ mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to start graph! Error:0x%x\n", (unsigned int)hr);
return 0;
}
mp_msg(MSGT_TV, MSGL_DBG2, "tvi_dshow: Graph is started.\n");
@@ -2681,7 +2681,7 @@ static int init(priv_t * priv)
mp_msg(MSGT_TV, MSGL_DBG2, "tvi_dshow: Searching for available video capture devices\n");
priv->chains[0]->pCaptureFilter = find_capture_device(priv->dev_index, &CLSID_VideoInputDeviceCategory);
if(!priv->chains[0]->pCaptureFilter){
- mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_NoVideoCaptureDevice);
+ mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to find video capture device\n");
break;
}
hr = OLE_CALL_ARGS(priv->pGraph, AddFilter, priv->chains[0]->pCaptureFilter, NULL);
@@ -2693,7 +2693,7 @@ static int init(priv_t * priv)
if (priv->adev_index != -1) {
priv->chains[1]->pCaptureFilter = find_capture_device(priv->adev_index, &CLSID_AudioInputDeviceCategory); //output available audio edevices
if(!priv->chains[1]->pCaptureFilter){
- mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_NoAudioCaptureDevice);
+ mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to find audio capture device\n");
break;
}
@@ -2713,7 +2713,7 @@ static int init(priv_t * priv)
mp_msg(MSGT_TV, MSGL_DBG2, "tvi_dshow: Get IID_IAMVideoProcAmp failed (0x%x).\n", (unsigned int)hr);
if (hr != S_OK) {
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_VideoAdjustigNotSupported);
+ mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Adjusting of brightness/hue/saturation/contrast is not supported by device\n");
priv->pVideoProcAmp = NULL;
}
@@ -2723,7 +2723,7 @@ static int init(priv_t * priv)
priv->chains[0]->pCaptureFilter,
&IID_IAMCrossbar, (void **) &(priv->pCrossbar));
if (FAILED(hr)) {
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_SelectingInputNotSupported);
+ mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Selection of capture source is not supported by device\n");
priv->pCrossbar = NULL;
}
@@ -2749,7 +2749,7 @@ static int init(priv_t * priv)
}
OLE_RELEASE_SAFE(pTVAudio);
if (FAILED(hr))
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TVI_DS_UnableSetAudioMode, priv->tv_param->amode,(unsigned int)hr);
+ mp_tmsg(MSGT_TV, MSGL_WARN, "tvi_dshow: Unable to set audio mode %d. Error:0x%x\n", priv->tv_param->amode,(unsigned int)hr);
}
}
@@ -2787,19 +2787,19 @@ static int init(priv_t * priv)
}
if (!priv->chains[0]->pStreamConfig)
- mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_ChangingWidthHeightNotSupported);
+ mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Changing video width/height is not supported by device.\n");
if (!priv->chains[0]->arpmt[priv->chains[0]->nFormatUsed]
|| !extract_video_format(priv->chains[0]->arpmt[priv->chains[0]->nFormatUsed],
&(priv->fcc), &(priv->width),
&(priv->height))) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_ErrorParsingVideoFormatStruct);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to parse video format structure.\n");
break;
}
if (priv->chains[1]->arpmt[priv->chains[1]->nFormatUsed]) {
if (!extract_audio_format(priv->chains[1]->pmt, &(priv->samplerate), NULL, NULL)) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_ErrorParsingAudioFormatStruct);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to parse audio format structure.\n");
DisplayMediaType("audio format failed",priv->chains[1]->arpmt[priv->chains[1]->nFormatUsed]);
break;
}
@@ -2807,7 +2807,7 @@ static int init(priv_t * priv)
hr = OLE_QUERYINTERFACE(priv->pGraph, IID_IMediaControl,priv->pMediaControl);
if(FAILED(hr)){
- mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_UnableGetMediaControlInterface,(unsigned int)hr);
+ mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to get IMediaControl interface. Error:0x%x\n",(unsigned int)hr);
break;
}
hr = OLE_CALL_ARGS(priv->pBuilder, FindInterface,
@@ -2867,7 +2867,7 @@ static int init(priv_t * priv)
OLE_RELEASE_SAFE(pVPOutPin);
if (FAILED(hr)) {
- mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_UnableTerminateVPPin, (unsigned int)hr);
+ mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to terminate VideoPort pin with any filter in graph. Error:0x%x\n", (unsigned int)hr);
break;
}
}
@@ -2909,7 +2909,7 @@ static int init(priv_t * priv)
} while(0);
if (!result){
- mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_GraphInitFailure);
+ mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Directshow graph initialization failure.\n");
uninit(priv);
}
return result;
@@ -3041,12 +3041,12 @@ static tvi_handle_t *tvi_init_dshow(tv_param_t* tv_param)
if (sscanf(tv_param->device, "%d", &a) == 1) {
priv->dev_index = a;
} else {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_WrongDeviceParam, tv_param->device);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Wrong device parameter: %s\n", tv_param->device);
free_handle(h);
return NULL;
}
if (priv->dev_index < 0) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_WrongDeviceIndex, a);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Wrong device index: %d\n", a);
free_handle(h);
return NULL;
}
@@ -3055,12 +3055,12 @@ static tvi_handle_t *tvi_init_dshow(tv_param_t* tv_param)
if (sscanf(tv_param->adevice, "%d", &a) == 1) {
priv->adev_index = a;
} else {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_WrongADeviceParam, tv_param->adevice);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Wrong adevice parameter: %s\n", tv_param->adevice);
free_handle(h);
return NULL;
}
if (priv->dev_index < 0) {
- mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_WrongADeviceIndex, a);
+ mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Wrong adevice index: %d\n", a);
free_handle(h);
return NULL;
}
@@ -3320,7 +3320,7 @@ static int control(priv_t * priv, int cmd, void *arg)
break;
if (!priv->chains[1]->arpmt[i]) {
//request not found. failing back to first available
- mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TVI_DS_SamplerateNotsupported, samplerate);
+ mp_tmsg(MSGT_TV, MSGL_WARN, "tvi_dshow: Samplerate %d is not supported by device. Failing back to first available.\n", samplerate);
i = 0;
}
if (priv->chains[1]->pmt)
diff --git a/stream/tvi_vbi.c b/stream/tvi_vbi.c
index 8000c3e3e4..85f3d6f3c6 100644
--- a/stream/tvi_vbi.c
+++ b/stream/tvi_vbi.c
@@ -810,7 +810,7 @@ static void prepare_visible_page(priv_vbi_t* priv){
curr_pg=get_from_cache(priv,priv->curr_pagenum,
get_subpagenum_from_cache(priv,priv->curr_pagenum));
if (!pg && !curr_pg){
- p=_(MSGTR_TV_NoTeletext);
+ p=_("No teletext");
for(i=0;i<VBI_COLUMNS && *p;i++){
GET_UTF8(priv->display_page[i].unicode,*p++,break;);
}
@@ -1664,7 +1664,7 @@ int teletext_control(void* p, int cmd, void *arg)
priv->subpagenum=0x3f7f;
pll_reset(priv,fine_tune);
if(tv_param->tlang==-1){
- mp_tmsg(MSGT_TV,MSGL_INFO,MSGTR_TV_TTSupportedLanguages);
+ mp_tmsg(MSGT_TV,MSGL_INFO,"Supported Teletext languages:\n");
for(i=0; tt_languages[i].lang_code; i++){
mp_msg(MSGT_TV,MSGL_INFO," %3d %s\n",
tt_languages[i].lang_code, tt_languages[i].lang_name);
@@ -1677,7 +1677,7 @@ int teletext_control(void* p, int cmd, void *arg)
break;
}
if (priv->primary_language!=tt_languages[i].lang_code){
- mp_tmsg(MSGT_TV,MSGL_INFO,MSGTR_TV_TTSelectedLanguage,
+ mp_tmsg(MSGT_TV,MSGL_INFO,"Selected default teletext language: %s\n",
tt_languages[i].lang_name);
priv->primary_language=tt_languages[i].lang_code;
}
diff --git a/stream/url.c b/stream/url.c
index dbbec1a0e9..b262f9b2cc 100644
--- a/stream/url.c
+++ b/stream/url.c
@@ -54,19 +54,19 @@ url_new(const char* url) {
if( url==NULL ) return NULL;
if (strlen(url) > (SIZE_MAX / 3 - 1)) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
escfilename=malloc(strlen(url)*3+1);
if (!escfilename ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
// Create the URL container
Curl = malloc(sizeof(URL_t));
if( Curl==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
@@ -78,7 +78,7 @@ url_new(const char* url) {
// Copy the url in the URL container
Curl->url = strdup(escfilename);
if( Curl->url==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
mp_msg(MSGT_OPEN,MSGL_V,"Filename for url is now %s\n",escfilename);
@@ -98,7 +98,7 @@ url_new(const char* url) {
pos1 = ptr1-escfilename;
Curl->protocol = malloc(pos1+1);
if( Curl->protocol==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
strncpy(Curl->protocol, escfilename, pos1);
@@ -120,7 +120,7 @@ url_new(const char* url) {
int len = ptr2-ptr1;
Curl->username = malloc(len+1);
if( Curl->username==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
strncpy(Curl->username, ptr1, len);
@@ -133,7 +133,7 @@ url_new(const char* url) {
Curl->username[ptr3-ptr1]='\0';
Curl->password = malloc(len2+1);
if( Curl->password==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
strncpy( Curl->password, ptr3+1, len2);
@@ -185,7 +185,7 @@ url_new(const char* url) {
// copy the hostname in the URL container
Curl->hostname = malloc(pos2-pos1+1);
if( Curl->hostname==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
strncpy(Curl->hostname, ptr1, pos2-pos1);
@@ -200,7 +200,7 @@ url_new(const char* url) {
// copy the path/filename in the URL container
Curl->file = strdup(ptr2);
if( Curl->file==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
}
@@ -209,7 +209,7 @@ url_new(const char* url) {
if( Curl->file==NULL ) {
Curl->file = malloc(2);
if( Curl->file==NULL ) {
- mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n");
goto err_out;
}
strcpy(Curl->file, "/");
@@ -287,7 +287,7 @@ url_escape_string_part(char *outbuf, const char *inbuf) {
*outbuf++=c; // already
// dont escape again
- mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_URL_StringAlreadyEscaped,c,c1,c2);
+ mp_tmsg(MSGT_NETWORK,MSGL_ERR,"String appears to be already escaped in url_escape %c%c1%c2\n",c,c1,c2);
// error as this should not happen against RFC 2396
// to escape a string twice
} else {