Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsg

The tmsg stuff was for the internal gettext() based translation system,
which nobody ever attempted to use and thus was removed. mp_gtext() and
set_osd_tmsg() were also for this.

mp_dbg was once enabled in debug mode only, but since we have log level
for enabling debug messages, it seems utterly useless.
This commit is contained in:
wm4
2013-12-16 20:40:02 +01:00
parent 3e6cd3ef19
commit 7dc7b900c6
49 changed files with 309 additions and 325 deletions

View File

@@ -40,27 +40,27 @@ int ai_alsa_setup(audio_in_t *ai)
err = snd_pcm_hw_params_any(ai->alsa.handle, params);
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Broken configuration for this PCM: no configurations available.\n");
mp_msg(MSGT_TV, MSGL_ERR, "Broken configuration for this PCM: no configurations available.\n");
return -1;
}
err = snd_pcm_hw_params_set_access(ai->alsa.handle, params,
SND_PCM_ACCESS_RW_INTERLEAVED);
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Access type not available.\n");
mp_msg(MSGT_TV, MSGL_ERR, "Access type not available.\n");
return -1;
}
err = snd_pcm_hw_params_set_format(ai->alsa.handle, params, SND_PCM_FORMAT_S16_LE);
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Sample format not available.\n");
mp_msg(MSGT_TV, MSGL_ERR, "Sample format not available.\n");
return -1;
}
err = snd_pcm_hw_params_set_channels(ai->alsa.handle, params, ai->req_channels);
if (err < 0) {
snd_pcm_hw_params_get_channels(params, &ai->channels);
mp_tmsg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n",
mp_msg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n",
ai->channels);
} else {
ai->channels = ai->req_channels;
@@ -70,7 +70,7 @@ int ai_alsa_setup(audio_in_t *ai)
rate = ai->req_samplerate;
err = snd_pcm_hw_params_set_rate_near(ai->alsa.handle, params, &rate, &dir);
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set samplerate.\n");
mp_msg(MSGT_TV, MSGL_ERR, "Cannot set samplerate.\n");
}
ai->samplerate = rate;
@@ -79,7 +79,7 @@ int ai_alsa_setup(audio_in_t *ai)
err = snd_pcm_hw_params_set_buffer_time_near(ai->alsa.handle, params,
&ai->alsa.buffer_time, &dir);
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set buffer time.\n");
mp_msg(MSGT_TV, MSGL_ERR, "Cannot set buffer time.\n");
}
dir = 0;
@@ -87,12 +87,12 @@ int ai_alsa_setup(audio_in_t *ai)
err = snd_pcm_hw_params_set_period_time_near(ai->alsa.handle, params,
&ai->alsa.period_time, &dir);
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set period time.\n");
mp_msg(MSGT_TV, MSGL_ERR, "Cannot set period time.\n");
}
err = snd_pcm_hw_params(ai->alsa.handle, params);
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install hardware parameters: %s", snd_strerror(err));
mp_msg(MSGT_TV, MSGL_ERR, "Unable to install hardware parameters: %s", snd_strerror(err));
snd_pcm_hw_params_dump(params, ai->alsa.log);
return -1;
}
@@ -102,7 +102,7 @@ int ai_alsa_setup(audio_in_t *ai)
snd_pcm_hw_params_get_buffer_size(params, &buffer_size);
ai->alsa.chunk_size = period_size;
if (period_size == buffer_size) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Can't use period equal to buffer size (%u == %lu)\n", ai->alsa.chunk_size, (long)buffer_size);
mp_msg(MSGT_TV, MSGL_ERR, "Can't use period equal to buffer size (%u == %lu)\n", ai->alsa.chunk_size, (long)buffer_size);
return -1;
}
@@ -113,7 +113,7 @@ int ai_alsa_setup(audio_in_t *ai)
err = snd_pcm_sw_params_set_stop_threshold(ai->alsa.handle, swparams, buffer_size);
if (snd_pcm_sw_params(ai->alsa.handle, swparams) < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n");
mp_msg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n");
snd_pcm_sw_params_dump(swparams, ai->alsa.log);
return -1;
}
@@ -137,7 +137,7 @@ int ai_alsa_init(audio_in_t *ai)
err = snd_pcm_open(&ai->alsa.handle, ai->alsa.device, SND_PCM_STREAM_CAPTURE, 0);
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err));
mp_msg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err));
return -1;
}
@@ -171,7 +171,7 @@ int ai_alsa_xrun(audio_in_t *ai)
snd_pcm_status_alloca(&status);
if ((res = snd_pcm_status(ai->alsa.handle, status))<0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res));
mp_msg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res));
return -1;
}
if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) {
@@ -179,18 +179,18 @@ int ai_alsa_xrun(audio_in_t *ai)
gettimeofday(&now, 0);
snd_pcm_status_get_trigger_tstamp(status, &tstamp);
timersub(&now, &tstamp, &diff);
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun!!! (at least %.3f ms long)\n",
mp_msg(MSGT_TV, MSGL_ERR, "ALSA xrun!!! (at least %.3f ms long)\n",
diff.tv_sec * 1000 + diff.tv_usec / 1000.0);
if (mp_msg_test(MSGT_TV, MSGL_V)) {
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA Status:\n");
mp_msg(MSGT_TV, MSGL_ERR, "ALSA Status:\n");
snd_pcm_status_dump(status, ai->alsa.log);
}
if ((res = snd_pcm_prepare(ai->alsa.handle))<0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun: prepare error: %s", snd_strerror(res));
mp_msg(MSGT_TV, MSGL_ERR, "ALSA xrun: prepare error: %s", snd_strerror(res));
return -1;
}
return 0; /* ok, data should be accepted again */
}
mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA read/write error");
mp_msg(MSGT_TV, MSGL_ERR, "ALSA read/write error");
return -1;
}

View File

@@ -60,7 +60,7 @@ int ai_oss_set_channels(audio_in_t *ai)
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp channels: %d\n",
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_CHANNELS, &ioctl_param));
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set channel count: %d\n",
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set channel count: %d\n",
ai->req_channels);
return -1;
}
@@ -73,7 +73,7 @@ int ai_oss_set_channels(audio_in_t *ai)
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_STEREO, &ioctl_param),
ioctl_param);
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set stereo: %d\n",
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set stereo: %d\n",
ai->req_channels == 2);
return -1;
}
@@ -90,7 +90,7 @@ int ai_oss_init(audio_in_t *ai)
ai->oss.audio_fd = open(ai->oss.device, O_RDONLY | O_CLOEXEC);
if (ai->oss.audio_fd < 0)
{
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to open '%s': %s\n",
mp_msg(MSGT_TV, MSGL_ERR, "Unable to open '%s': %s\n",
ai->oss.device, strerror(errno));
return -1;
}
@@ -101,13 +101,13 @@ int ai_oss_init(audio_in_t *ai)
mp_msg(MSGT_TV, MSGL_V, "Supported formats: %x\n", ioctl_param);
if (!(ioctl_param & AFMT_S16_LE))
mp_tmsg(MSGT_TV, MSGL_ERR, "unsupported format\n");
mp_msg(MSGT_TV, MSGL_ERR, "unsupported format\n");
ioctl_param = AFMT_S16_LE;
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp setfmt: %d\n",
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SETFMT, &ioctl_param));
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set audio format.");
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set audio format.");
return -1;
}
@@ -117,7 +117,7 @@ int ai_oss_init(audio_in_t *ai)
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp speed: %d\n",
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SPEED, &ioctl_param));
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set samplerate: %d\n",
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set samplerate: %d\n",
ai->req_samplerate);
return -1;
}
@@ -130,7 +130,7 @@ int ai_oss_init(audio_in_t *ai)
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp trigger: %d\n",
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SETTRIGGER, &ioctl_param));
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set trigger: %d\n",
mp_msg(MSGT_TV, MSGL_ERR, "Unable to set trigger: %d\n",
PCM_ENABLE_INPUT);
}
@@ -138,17 +138,17 @@ int ai_oss_init(audio_in_t *ai)
mp_msg(MSGT_TV, MSGL_V, "ioctl dsp getblocksize: %d\n",
err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_GETBLKSIZE, &ai->blocksize));
if (err < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to get block size!\n");
mp_msg(MSGT_TV, MSGL_ERR, "Unable to get block size!\n");
}
mp_msg(MSGT_TV, MSGL_V, "blocksize: %d\n", ai->blocksize);
// correct the blocksize to a reasonable value
if (ai->blocksize <= 0) {
ai->blocksize = 4096*ai->channels*2;
mp_tmsg(MSGT_TV, MSGL_ERR, "Audio block size is zero, setting to %d!\n", ai->blocksize);
mp_msg(MSGT_TV, MSGL_ERR, "Audio block size is zero, setting to %d!\n", ai->blocksize);
} else if (ai->blocksize < 4096*ai->channels*2) {
ai->blocksize *= 4096*ai->channels*2/ai->blocksize;
mp_tmsg(MSGT_TV, MSGL_ERR, "Audio block size too low, setting to %d!\n", ai->blocksize);
mp_msg(MSGT_TV, MSGL_ERR, "Audio block size too low, setting to %d!\n", ai->blocksize);
}
ai->samplesize = 16;

View File

@@ -247,16 +247,16 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer)
ret = snd_pcm_readi(ai->alsa.handle, buffer, ai->alsa.chunk_size);
if (ret != ai->alsa.chunk_size) {
if (ret < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret));
mp_msg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret));
if (ret == -EPIPE) {
if (ai_alsa_xrun(ai) == 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n");
mp_msg(MSGT_TV, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n");
} else {
mp_tmsg(MSGT_TV, MSGL_ERR, "Fatal error, cannot recover!\n");
mp_msg(MSGT_TV, MSGL_ERR, "Fatal error, cannot recover!\n");
}
}
} else {
mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
mp_msg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
}
return -1;
}
@@ -281,9 +281,9 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer)
ret = sio_read(ai->sndio.hdl, buffer, ai->blocksize);
if (ret != ai->blocksize) {
if (ret < 0) {
mp_tmsg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno));
mp_msg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno));
} else {
mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
mp_msg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n");
}
return -1;
}

View File

@@ -546,7 +546,7 @@ int stream_cache_init(stream_t *cache, stream_t *stream, int64_t size,
if (size < 1)
return -1;
mp_tmsg(MSGT_NETWORK, MSGL_INFO, "Cache size set to %" PRId64 " KiB\n",
mp_msg(MSGT_NETWORK, MSGL_INFO, "Cache size set to %" PRId64 " KiB\n",
size / 1024);
if (size > SIZE_MAX) {
@@ -610,7 +610,7 @@ int stream_cache_init(stream_t *cache, stream_t *stream, int64_t size,
break;
if (stream_control(s->cache, STREAM_CTRL_GET_CACHE_IDLE, &idle) < 0)
break;
mp_tmsg(MSGT_CACHE, MSGL_STATUS, "\rCache fill: %5.2f%% "
mp_msg(MSGT_CACHE, MSGL_STATUS, "\rCache fill: %5.2f%% "
"(%" PRId64 " bytes) ", 100.0 * fill / s->buffer_size, fill);
if (fill >= min)
break;

View File

@@ -40,7 +40,7 @@ cd_info_new(void) {
cd_info = malloc(sizeof(cd_info_t));
if( cd_info==NULL ) {
mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
mp_msg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
return NULL;
}
@@ -74,14 +74,14 @@ cd_info_add_track(cd_info_t *cd_info, char *track_name, unsigned int track_nb, u
cd_track = malloc(sizeof(cd_track_t));
if( cd_track==NULL ) {
mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
mp_msg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
return NULL;
}
memset(cd_track, 0, sizeof(cd_track_t));
cd_track->name = malloc(strlen(track_name)+1);
if( cd_track->name==NULL ) {
mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
mp_msg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n");
free(cd_track);
return NULL;
}

View File

@@ -228,13 +228,13 @@ static bool parse_url(struct stream *st, struct m_config *config)
if (f[n].len) {
const char *opt = find_url_opt(st, f_names[n]);
if (!opt) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Stream type '%s' accepts no '%s' "
mp_msg(MSGT_OPEN, MSGL_ERR, "Stream type '%s' accepts no '%s' "
"field in URLs.\n", st->info->name, f_names[n]);
return false;
}
int r = m_config_set_option(config, bstr0(opt), f[n]);
if (r < 0) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Error setting stream option: %s\n",
mp_msg(MSGT_OPEN, MSGL_ERR, "Error setting stream option: %s\n",
m_option_strerror(r));
return false;
}
@@ -302,7 +302,7 @@ static int open_internal(const stream_info_t *sinfo, struct stream *underlying,
struct m_config *config = m_config_from_obj_desc(s, &desc);
s->priv = config->optstruct;
if (s->info->url_options && !parse_url(s, config)) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "URL parsing failed on url %s\n", url);
mp_msg(MSGT_OPEN, MSGL_ERR, "URL parsing failed on url %s\n", url);
talloc_free(s);
return STREAM_ERROR;
}
@@ -351,13 +351,13 @@ struct stream *stream_create(const char *url, int flags, struct MPOpts *options)
if (r == STREAM_NO_MATCH || r == STREAM_UNSUPPORTED)
continue;
if (r != STREAM_OK) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to open %s.\n", url);
mp_msg(MSGT_OPEN, MSGL_ERR, "Failed to open %s.\n", url);
return NULL;
}
}
if (!s) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "No stream found to handle url %s\n", url);
mp_msg(MSGT_OPEN, MSGL_ERR, "No stream found to handle url %s\n", url);
return NULL;
}
@@ -432,7 +432,7 @@ void stream_set_capture_file(stream_t *s, const char *filename)
if (s->capture_file) {
s->capture_filename = talloc_strdup(NULL, filename);
} else {
mp_tmsg(MSGT_GLOBAL, MSGL_ERR,
mp_msg(MSGT_GLOBAL, MSGL_ERR,
"Error opening capture file: %s\n", strerror(errno));
}
}
@@ -443,7 +443,7 @@ static void stream_capture_write(stream_t *s, void *buf, size_t len)
{
if (s->capture_file && len > 0) {
if (fwrite(buf, len, 1, s->capture_file) < 1) {
mp_tmsg(MSGT_GLOBAL, MSGL_ERR, "Error writing capture file: %s\n",
mp_msg(MSGT_GLOBAL, MSGL_ERR, "Error writing capture file: %s\n",
strerror(errno));
stream_set_capture_file(s, NULL);
}
@@ -619,16 +619,16 @@ static int stream_seek_unbuffered(stream_t *s, int64_t newpos)
{
if (newpos != s->pos) {
if (newpos > s->pos && !(s->flags & MP_STREAM_SEEK_FW)) {
mp_tmsg(MSGT_STREAM, MSGL_ERR, "Can not seek in this stream\n");
mp_msg(MSGT_STREAM, MSGL_ERR, "Can not seek in this stream\n");
return 0;
}
if (newpos < s->pos && !(s->flags & MP_STREAM_SEEK_BW)) {
mp_tmsg(MSGT_STREAM, MSGL_ERR,
mp_msg(MSGT_STREAM, MSGL_ERR,
"Cannot seek backward in linear streams!\n");
return 1;
}
if (s->seek(s, newpos) <= 0) {
mp_tmsg(MSGT_STREAM, MSGL_ERR, "Seek failed\n");
mp_msg(MSGT_STREAM, MSGL_ERR, "Seek failed\n");
return 0;
}
}
@@ -680,7 +680,7 @@ static int stream_seek_long(stream_t *s, int64_t pos)
int stream_seek(stream_t *s, int64_t pos)
{
mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%llX\n", (long long)pos);
mp_msg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%llX\n", (long long)pos);
if (pos == stream_tell(s))
return 1;

View File

@@ -307,7 +307,7 @@ static int bluray_stream_open(stream_t *s, int mode)
device = bluray_device;
if (!device) {
mp_tmsg(MSGT_OPEN, MSGL_ERR,
mp_msg(MSGT_OPEN, MSGL_ERR,
"No Blu-ray device/location was specified ...\n");
return STREAM_UNSUPPORTED;
}
@@ -315,7 +315,7 @@ static int bluray_stream_open(stream_t *s, int mode)
/* open device */
bd = bd_open(device, NULL);
if (!bd) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Couldn't open Blu-ray device: %s\n",
mp_msg(MSGT_OPEN, MSGL_ERR, "Couldn't open Blu-ray device: %s\n",
device);
return STREAM_UNSUPPORTED;
}
@@ -400,7 +400,7 @@ err_no_info:
s->flags = MP_STREAM_SEEK;
s->priv = b;
mp_tmsg(MSGT_OPEN, MSGL_V, "Blu-ray successfully opened.\n");
mp_msg(MSGT_OPEN, MSGL_V, "Blu-ray successfully opened.\n");
return STREAM_OK;
}

View File

@@ -340,7 +340,7 @@ static int open_cdda(stream_t *st, int m)
#endif
if (!cdd) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Can't open CDDA device.\n");
mp_msg(MSGT_OPEN, MSGL_ERR, "Can't open CDDA device.\n");
return STREAM_ERROR;
}
@@ -350,13 +350,13 @@ static int open_cdda(stream_t *st, int m)
cdd->nsectors = p->sector_size;
if (cdda_open(cdd) != 0) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Can't open disc.\n");
mp_msg(MSGT_OPEN, MSGL_ERR, "Can't open disc.\n");
cdda_close(cdd);
return STREAM_ERROR;
}
cd_info = cd_info_new();
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Found audio CD with %d tracks.\n",
mp_msg(MSGT_OPEN, MSGL_INFO, "Found audio CD with %d tracks.\n",
(int)cdda_tracks(cdd));
for (i = 0; i < cdd->tracks; i++) {
char track_name[80];

View File

@@ -123,14 +123,14 @@ int dvd_aid_from_lang(stream_t *stream, char **lang) {
code = lang[n][1] | (lang[n][0] << 8);
for(i=0;i<d->nr_of_channels;i++) {
if(d->audio_streams[i].language==code) {
mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD audio channel: %d language: %c%c\n",
mp_msg(MSGT_OPEN,MSGL_INFO,"Selected DVD audio channel: %d language: %c%c\n",
d->audio_streams[i].id, lang[n][0], lang[n][1]);
return d->audio_streams[i].id;
}
//printf("%X != %X (%c%c)\n",code,d->audio_streams[i].language,lang[0],lang[1]);
}
}
mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n");
mp_msg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n");
return -1;
}
@@ -164,12 +164,12 @@ int dvd_sid_from_lang(stream_t *stream, char **lang) {
code = lang[n][1] | (lang[n][0] << 8);
for(i=0;i<d->nr_of_subtitles;i++) {
if(d->subtitles[i].language==code) {
mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD subtitle channel: %d language: %c%c\n", i, lang[n][0], lang[n][1]);
mp_msg(MSGT_OPEN,MSGL_INFO,"Selected DVD subtitle channel: %d language: %c%c\n", i, lang[n][0], lang[n][1]);
return d->subtitles[i].id;
}
}
}
mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD subtitle language found!\n");
mp_msg(MSGT_OPEN,MSGL_WARN,"No matching DVD subtitle language found!\n");
return -1;
}
@@ -772,12 +772,12 @@ static int open_s(stream_t *stream, int mode)
snprintf(temp_device, len, "/dev/rdisk%d", i);
dvd = DVDOpen(temp_device);
if(!dvd) {
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
mp_msg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
} else {
#if DVDREAD_VERSION <= LIBDVDREAD_VERSION(0,9,4)
dvd_file_t *dvdfile = DVDOpenFile(dvd,dvd_title,DVD_READ_INFO_FILE);
if(!dvdfile) {
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
mp_msg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno));
DVDClose(dvd);
continue;
}
@@ -796,7 +796,7 @@ static int open_s(stream_t *stream, int mode)
{
dvd = DVDOpen(dvd_device_current);
if(!dvd) {
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",dvd_device_current, strerror(errno));
mp_msg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",dvd_device_current, strerror(errno));
return STREAM_UNSUPPORTED;
}
}
@@ -809,7 +809,7 @@ static int open_s(stream_t *stream, int mode)
*/
vmg_file = ifoOpen(dvd, 0);
if(!vmg_file) {
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Can't open VMG info!\n");
mp_msg(MSGT_OPEN,MSGL_ERR, "Can't open VMG info!\n");
DVDClose( dvd );
return STREAM_UNSUPPORTED;
}
@@ -845,9 +845,9 @@ static int open_s(stream_t *stream, int mode)
/**
* Make sure our title number is valid.
*/
mp_tmsg(MSGT_OPEN,MSGL_STATUS, "There are %d titles on this DVD.\n", tt_srpt->nr_of_srpts );
mp_msg(MSGT_OPEN,MSGL_STATUS, "There are %d titles on this DVD.\n", tt_srpt->nr_of_srpts );
if(dvd_title < 1 || dvd_title > tt_srpt->nr_of_srpts) {
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD title number: %d\n", dvd_title);
mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD title number: %d\n", dvd_title);
ifoClose( vmg_file );
DVDClose( dvd );
return STREAM_UNSUPPORTED;
@@ -857,9 +857,9 @@ static int open_s(stream_t *stream, int mode)
/**
* Make sure the angle number is valid for this title.
*/
mp_tmsg(MSGT_OPEN,MSGL_STATUS, "There are %d angles in this DVD title.\n", tt_srpt->title[dvd_title].nr_of_angles);
mp_msg(MSGT_OPEN,MSGL_STATUS, "There are %d angles in this DVD title.\n", tt_srpt->title[dvd_title].nr_of_angles);
if(dvd_angle<1 || dvd_angle>tt_srpt->title[dvd_title].nr_of_angles) {
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD angle number: %d\n", dvd_angle);
mp_msg(MSGT_OPEN,MSGL_ERR, "Invalid DVD angle number: %d\n", dvd_angle);
goto fail;
}
@@ -869,7 +869,7 @@ static int open_s(stream_t *stream, int mode)
*/
vts_file = ifoOpen( dvd, tt_srpt->title[dvd_title].title_set_nr );
if(!vts_file) {
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Cannot open the IFO file for DVD title %d.\n", tt_srpt->title[dvd_title].title_set_nr );
mp_msg(MSGT_OPEN,MSGL_ERR, "Cannot open the IFO file for DVD title %d.\n", tt_srpt->title[dvd_title].title_set_nr );
goto fail;
}
/**
@@ -877,7 +877,7 @@ static int open_s(stream_t *stream, int mode)
*/
title = DVDOpenFile(dvd, tt_srpt->title[dvd_title].title_set_nr, DVD_READ_TITLE_VOBS);
if(!title) {
mp_tmsg(MSGT_OPEN,MSGL_ERR, "Cannot open title VOBS (VTS_%02d_1.VOB).\n", tt_srpt->title[dvd_title].title_set_nr);
mp_msg(MSGT_OPEN,MSGL_ERR, "Cannot open title VOBS (VTS_%02d_1.VOB).\n", tt_srpt->title[dvd_title].title_set_nr);
ifoClose( vts_file );
goto fail;
}
@@ -936,7 +936,7 @@ static int open_s(stream_t *stream, int mode)
// 1 - stereo
// 5 - 5.1
audio_stream->channels=audio->channels;
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n",
mp_msg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n",
d->nr_of_channels,
dvd_audio_stream_types[ audio->audio_format ],
dvd_audio_stream_channels[ audio->channels ],
@@ -950,7 +950,7 @@ static int open_s(stream_t *stream, int mode)
d->nr_of_channels++;
}
}
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of audio channels on disk: %d.\n",d->nr_of_channels );
mp_msg(MSGT_OPEN,MSGL_STATUS,"number of audio channels on disk: %d.\n",d->nr_of_channels );
}
/**
@@ -982,13 +982,13 @@ static int open_s(stream_t *stream, int mode)
else if(video->display_aspect_ratio == 3) /* 16:9 */
sub_stream->id = pgc->subp_control[i] >> 8 & 31;
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", sub_stream->id, tmp);
mp_msg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", sub_stream->id, tmp);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sub_stream->id);
if(language && tmp[0])
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", sub_stream->id, tmp);
d->nr_of_subtitles++;
}
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of subtitles on disk: %d\n",d->nr_of_subtitles);
mp_msg(MSGT_OPEN,MSGL_STATUS,"number of subtitles on disk: %d\n",d->nr_of_subtitles);
}
/**
@@ -1038,7 +1038,7 @@ fail:
DVDClose(dvd);
return STREAM_UNSUPPORTED;
}
mp_tmsg(MSGT_DVD,MSGL_ERR,"mpv was compiled without DVD support, exiting.\n");
mp_msg(MSGT_DVD,MSGL_ERR,"mpv was compiled without DVD support, exiting.\n");
return STREAM_UNSUPPORTED;
}

View File

@@ -69,13 +69,13 @@ void dvd_set_speed(char *device, unsigned speed)
return;
case -1: /* restore default value */
if (dvd_speed == 0) return; /* we haven't touched the speed setting */
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... ");
mp_msg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... ");
break;
default: /* limit to <speed> KB/s */
// speed < 100 is multiple of DVD single speed (1350KB/s)
if (speed < 100)
speed *= 1350;
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed);
mp_msg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed);
break;
}
@@ -108,14 +108,14 @@ void dvd_set_speed(char *device, unsigned speed)
fd = open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC);
if (fd == -1) {
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
mp_msg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
return;
}
if (ioctl(fd, SG_IO, &sghdr) < 0)
mp_tmsg(MSGT_OPEN, MSGL_INFO, "failed\n");
mp_msg(MSGT_OPEN, MSGL_INFO, "failed\n");
else
mp_tmsg(MSGT_OPEN, MSGL_INFO, "successful\n");
mp_msg(MSGT_OPEN, MSGL_INFO, "successful\n");
close(fd);
#endif

View File

@@ -661,7 +661,7 @@ static int open_s(stream_t *stream, int mode)
else
filename = DEFAULT_DVD_DEVICE;
if (!new_dvdnav_stream(priv, filename)) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Couldn't open DVD device: %s\n",
mp_msg(MSGT_OPEN, MSGL_ERR, "Couldn't open DVD device: %s\n",
filename);
return STREAM_UNSUPPORTED;
}

View File

@@ -123,7 +123,7 @@ static int open_f(stream_t *stream, int mode)
if (!strcmp(filename, "-")) {
if (mode == STREAM_READ) {
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Reading from stdin...\n");
mp_msg(MSGT_OPEN, MSGL_INFO, "Reading from stdin...\n");
fd = 0;
#if HAVE_SETMODE
setmode(fileno(stdin), O_BINARY);
@@ -144,14 +144,14 @@ static int open_f(stream_t *stream, int mode)
#endif
fd = open(filename, m | O_BINARY, openmode);
if (fd < 0) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "Cannot open file '%s': %s\n",
mp_msg(MSGT_OPEN, MSGL_ERR, "Cannot open file '%s': %s\n",
filename, strerror(errno));
return STREAM_ERROR;
}
#ifndef __MINGW32__
struct stat st;
if (fstat(fd, &st) == 0 && S_ISDIR(st.st_mode)) {
mp_tmsg(MSGT_OPEN, MSGL_ERR, "File is a directory: '%s'\n",
mp_msg(MSGT_OPEN, MSGL_ERR, "File is a directory: '%s'\n",
filename);
close(fd);
return STREAM_ERROR;

View File

@@ -152,7 +152,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
/*parsing channels string*/
channels=priv->radio_param->channels;
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Radio channel names detected.\n");
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Radio channel names detected.\n");
priv->radio_channel_list = malloc(sizeof(radio_channels_t));
priv->radio_channel_list->index=1;
priv->radio_channel_list->next=NULL;
@@ -170,7 +170,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
priv->radio_channel_current->freq=atof(tmp);
if ((priv->radio_channel_current->freq>priv->rangehigh)||(priv->radio_channel_current->freq<priv->rangelow))
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency for channel %s\n",
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency for channel %s\n",
priv->radio_channel_current->name);
while ((sep=strchr(priv->radio_channel_current->name, '_'))) sep[0] = ' ';
@@ -196,17 +196,17 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
priv->radio_channel_current = priv->radio_channel_current->next;
if (priv->radio_channel_current->index!=channel){
if (((float)((int)freq_channel))!=freq_channel)
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %.2f\n",freq_channel);
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %.2f\n",freq_channel);
else
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %d\n",(int)freq_channel);
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %d\n",(int)freq_channel);
return STREAM_ERROR;
}
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
priv->radio_channel_current->name, priv->radio_channel_current->freq);
*pfreq=priv->radio_channel_current->freq;
}else{
if (freq_channel){
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Radio frequency parameter detected.\n");
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Radio frequency parameter detected.\n");
priv->radio_channel_list=malloc(sizeof(radio_channels_t));
priv->radio_channel_list->next=NULL;
priv->radio_channel_list->prev=NULL;
@@ -217,7 +217,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){
*pfreq=freq_channel;
}
}
mp_tmsg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n");
mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n");
return STREAM_OK;
}
@@ -240,25 +240,25 @@ static int init_frac_v4l2(radio_priv_t* priv){
memset(&tuner,0,sizeof(tuner));
tuner.index=0;
if (ioctl(priv->radio_fd, VIDIOC_G_TUNER, &tuner)<0){
mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] Warning: ioctl get tuner failed: %s. Setting frac to %d.\n",strerror(errno),priv->frac);
mp_msg(MSGT_RADIO,MSGL_WARN,"[radio] Warning: ioctl get tuner failed: %s. Setting frac to %d.\n",strerror(errno),priv->frac);
return STREAM_ERROR;
}
if(tuner.type!=V4L2_TUNER_RADIO){
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] %s is no radio device!\n",priv->radio_param->device);
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] %s is no radio device!\n",priv->radio_param->device);
return STREAM_ERROR;
}
if(tuner.capability & V4L2_TUNER_CAP_LOW){
priv->frac=16000;
mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:yes frac=%d\n",priv->frac);
mp_msg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:yes frac=%d\n",priv->frac);
}
else{
priv->frac=16;
mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:no frac=%d\n",priv->frac);
mp_msg(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,"[radio] Allowed frequency range is %.2f-%.2f MHz.\n",priv->rangelow,priv->rangehigh);
mp_msg(MSGT_RADIO,MSGL_V,"[radio] Allowed frequency range is %.2f-%.2f MHz.\n",priv->rangelow,priv->rangehigh);
return STREAM_OK;
}
@@ -275,7 +275,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,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq.frequency,
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq.frequency,
frequency,strerror(errno));
return STREAM_ERROR;
}
@@ -291,7 +291,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,"[radio] ioctl get frequency failed: %s\n",strerror(errno));
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get frequency failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
*frequency=((float)freq.frequency)/priv->frac;
@@ -315,13 +315,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,"[radio] ioctl set mute failed: %s\n",strerror(errno));
mp_msg(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, "[radio] ioctl query control failed: %s\n",strerror(errno));
mp_msg(MSGT_RADIO, MSGL_WARN, "[radio] ioctl query control failed: %s\n",strerror(errno));
return;
}
@@ -329,7 +329,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,"[radio] ioctl set volume failed: %s\n",strerror(errno));
mp_msg(MSGT_RADIO, MSGL_WARN,"[radio] ioctl set volume failed: %s\n",strerror(errno));
}
}
@@ -345,14 +345,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, "[radio] ioctl query control failed: %s\n",strerror(errno));
mp_msg(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,"[radio] ioctl get volume failed: %s\n",strerror(errno));
mp_msg(MSGT_RADIO, MSGL_ERR,"[radio] ioctl get volume failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
@@ -385,7 +385,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,"[radio] Wrong frequency: %.2f\n",frequency);
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong frequency: %.2f\n",frequency);
return STREAM_ERROR;
}
if(priv->driver->set_frequency(priv,frequency)!=STREAM_OK)
@@ -393,7 +393,7 @@ static inline int set_frequency(radio_priv_t* priv,float frequency){
#if HAVE_RADIO_CAPTURE
if(clear_buffer(priv)!=STREAM_OK){
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Clearing buffer failed: %s\n",strerror(errno));
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] Clearing buffer failed: %s\n",strerror(errno));
return STREAM_ERROR;
}
#endif
@@ -448,16 +448,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, "\nError reading audio: %s\n", snd_strerror(ret));
mp_msg(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, "Recovered from cross-run, some frames may be left out!\n");
mp_msg(MSGT_RADIO, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n");
} else {
mp_tmsg(MSGT_RADIO, MSGL_ERR, "Fatal error, cannot recover!\n");
mp_msg(MSGT_RADIO, MSGL_ERR, "Fatal error, cannot recover!\n");
}
}
} else {
mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nNot enough audio samples!\n");
mp_msg(MSGT_RADIO, MSGL_ERR, "\nNot enough audio samples!\n");
}
return -1;
}
@@ -479,7 +479,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, "\nError reading audio: %s\n", strerror(errno));
mp_msg(MSGT_RADIO, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno));
return -1;
}
bt+=ret;
@@ -511,7 +511,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, "[radio] %s: in buffer=%d dropped=%d\n","grab_audio_frame",priv->audio_cnt,priv->audio_drop);
mp_msg(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
@@ -561,7 +561,7 @@ static int init_audio(radio_priv_t *priv)
}
priv->do_capture=1;
mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Starting capture stuff.\n");
mp_msg(MSGT_RADIO,MSGL_V,"[radio] Starting capture stuff.\n");
#if HAVE_ALSA
while ((tmp = strrchr(priv->radio_param->adevice, '='))){
tmp[0] = ':';
@@ -573,7 +573,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, "[radio] audio_in_init failed.\n");
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_init failed.\n");
}
audio_in_set_device(&priv->audio_in, priv->radio_param->adevice);
@@ -581,7 +581,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, "[radio] audio_in_setup call failed: %s\n", strerror(errno));
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_setup call failed: %s\n", strerror(errno));
return STREAM_ERROR;
}
#if HAVE_OSS_AUDIO
@@ -597,12 +597,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, "[radio] Audio capture - buffer=%d bytes (block=%d bytes).\n",
mp_msg(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, "[radio] cannot allocate audio buffer (block=%d,buf=%d): %s\n",priv->audio_in.blocksize, priv->audio_buffer_size, strerror(errno));
mp_msg(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;
@@ -650,7 +650,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, "[radio] Current frequency: %.2f\n",frequency);
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Current frequency: %.2f\n",frequency);
return 1;
}
@@ -695,7 +695,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, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
mp_msg(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;
@@ -707,13 +707,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, "[radio] Selected channel: %d - %s (freq: %.2f)\n",
mp_msg(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, "[radio] Can not change channel: no channel list given.\n");
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n");
return 1;
}
@@ -732,7 +732,7 @@ int radio_set_channel(struct stream *stream, char *channel) {
char* endptr;
if (*channel=='\0')
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel);
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel);
if (priv->radio_channel_list) {
channel_int = strtol(channel,&endptr,10);
@@ -743,7 +743,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,"[radio] Wrong channel name: %s\n",channel);
mp_msg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel);
return 0;
}
}else{
@@ -753,17 +753,17 @@ int radio_set_channel(struct stream *stream, char *channel) {
else
break;
if (tmp->index!=channel_int){
mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel number: %d\n",channel_int);
mp_msg(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, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index,
mp_msg(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, "[radio] Can not change channel: no channel list given.\n");
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n");
return 1;
}
@@ -851,7 +851,7 @@ static int open_s(stream_t *stream,int mode)
else
priv->driver=NULL;
mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Available drivers: ");
mp_msg(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)
@@ -862,7 +862,7 @@ static int open_s(stream_t *stream,int mode)
if(priv->driver)
mp_msg(MSGT_RADIO, MSGL_INFO, priv->driver->info);
else{
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Unknown driver name: %s\n",priv->radio_param->driver);
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Unknown driver name: %s\n",priv->radio_param->driver);
close_s(stream);
return STREAM_ERROR;
}
@@ -882,12 +882,12 @@ static int open_s(stream_t *stream,int mode)
priv->radio_fd = open(priv->radio_param->device, O_RDONLY | O_CLOEXEC);
if (priv->radio_fd < 0) {
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Unable to open '%s': %s\n",
mp_msg(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, "[radio] Radio fd: %d, %s\n", priv->radio_fd,priv->radio_param->device);
mp_msg(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);
@@ -904,11 +904,11 @@ static int open_s(stream_t *stream,int mode)
}
if ((frequency<priv->rangelow)||(frequency>priv->rangehigh)){
mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency: %.2f\n",frequency);
mp_msg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency: %.2f\n",frequency);
close_s(stream);
return STREAM_ERROR;
}else
mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Using frequency: %.2f.\n",frequency);
mp_msg(MSGT_RADIO, MSGL_INFO, "[radio] Using frequency: %.2f.\n",frequency);
if(set_frequency(priv,frequency)!=STREAM_OK){
close_s(stream);

View File

@@ -135,13 +135,13 @@ static int open_f (stream_t *stream, int mode)
err = smbc_init(smb_auth_fn, 1);
if (err < 0) {
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Cannot init the libsmbclient library: %d\n",err);
mp_msg(MSGT_OPEN,MSGL_ERR,"Cannot init the libsmbclient library: %d\n",err);
return STREAM_ERROR;
}
fd = smbc_open(filename, m,0644);
if (fd < 0) {
mp_tmsg(MSGT_OPEN,MSGL_ERR,"Could not open from LAN: '%s'\n", filename);
mp_msg(MSGT_OPEN,MSGL_ERR,"Could not open from LAN: '%s'\n", filename);
return STREAM_ERROR;
}

View File

@@ -117,7 +117,7 @@ static int open_s(stream_t *stream,int mode)
f=open(dev,O_RDONLY | O_CLOEXEC);
#endif
if(f<0){
mp_tmsg(MSGT_OPEN,MSGL_ERR,"CD-ROM Device '%s' not found.\n",dev);
mp_msg(MSGT_OPEN,MSGL_ERR,"CD-ROM Device '%s' not found.\n",dev);
return STREAM_ERROR;
}
@@ -129,16 +129,14 @@ static int open_s(stream_t *stream,int mode)
}
ret2=vcd_get_track_end(vcd,1);
if(ret2<0){
mp_msg(MSGT_OPEN, MSGL_ERR, "%s (get)\n",
mp_gtext("Error selecting VCD track."));
mp_msg(MSGT_OPEN, MSGL_ERR, "%s (get)\n", "Error selecting VCD track.");
close(f);
free(vcd);
return STREAM_ERROR;
}
ret=vcd_seek_to_track(vcd,1);
if(ret<0){
mp_msg(MSGT_OPEN, MSGL_ERR, "%s (seek)\n",
mp_gtext("Error selecting VCD track."));
mp_msg(MSGT_OPEN, MSGL_ERR, "%s (seek)\n", "Error selecting VCD track.");
close(f);
free(vcd);
return STREAM_ERROR;

View File

@@ -124,7 +124,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, "Channel scanner is not available without tuner\n");
mp_msg(MSGT_TV, MSGL_WARN, "Channel scanner is not available without tuner\n");
tvh->tv_param->scan=0;
return;
}
@@ -276,7 +276,7 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm)
if(ret!=TVI_CONTROL_UNKNOWN)
{
mp_tmsg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm,"default");
mp_msg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm,"default");
return 0;
}
@@ -295,7 +295,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, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm, "PAL");
mp_msg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm, "PAL");
return TV_NORM_PAL;
}
}
@@ -304,7 +304,7 @@ static void parse_channels(tvi_handle_t *tvh)
{
char** channels = tvh->tv_param->channels;
mp_tmsg(MSGT_TV, MSGL_INFO, "TV channel names detected.\n");
mp_msg(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;
@@ -344,7 +344,7 @@ static void parse_channels(tvi_handle_t *tvh)
}
}
if (tv_channel_current->freq == 0)
mp_tmsg(MSGT_TV, MSGL_ERR, "Couldn't find frequency for channel %s (%s)\n",
mp_msg(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, '-');
@@ -384,9 +384,9 @@ int tv_set_norm(tvi_handle_t *tvh, char* norm)
{
tvh->norm = norm_from_string(tvh, norm);
mp_tmsg(MSGT_TV, MSGL_V, "Selected norm : %s\n", norm);
mp_msg(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, "Error: Cannot set norm!\n");
mp_msg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
return 0;
}
return 1;
@@ -396,9 +396,9 @@ static int tv_set_norm_i(tvi_handle_t *tvh, int norm)
{
tvh->norm = norm;
mp_tmsg(MSGT_TV, MSGL_V, "Selected norm id: %d\n", norm);
mp_msg(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, "Error: Cannot set norm!\n");
mp_msg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
return 0;
}
@@ -430,7 +430,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, "Error: No video input present!\n");
mp_msg(MSGT_TV, MSGL_ERR, "Error: No video input present!\n");
return 0;
}
@@ -458,7 +458,7 @@ static int open_tv(tvi_handle_t *tvh)
case MP_FOURCC_BGR15:
break;
default:
mp_tmsg(MSGT_TV, MSGL_ERR,
mp_msg(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"\
@@ -492,7 +492,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, "Unable to set requested width: %d\n", tvh->tv_param->width);
mp_msg(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);
}
}
@@ -504,14 +504,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, "Unable to set requested height: %d\n", tvh->tv_param->height);
mp_msg(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, "Selected input hasn't got a tuner!\n");
mp_msg(MSGT_TV, MSGL_WARN, "Selected input hasn't got a tuner!\n");
goto done;
}
@@ -527,16 +527,16 @@ static int open_tv(tvi_handle_t *tvh)
}
if (tvh->chanlist == -1) {
mp_tmsg(MSGT_TV, MSGL_WARN, "Unable to find selected channel list! (%s)\n",
mp_msg(MSGT_TV, MSGL_WARN, "Unable to find selected channel list! (%s)\n",
tvh->tv_param->chanlist);
return 0;
} else
mp_tmsg(MSGT_TV, MSGL_V, "Selected channel list: %s (including %d channels)\n",
mp_msg(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, "You can't set frequency and channel simultaneously!\n");
mp_msg(MSGT_TV, MSGL_WARN, "You can't set frequency and channel simultaneously!\n");
goto done;
}
@@ -589,14 +589,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, "Selected frequency: %lu (%.3f)\n",
mp_msg(MSGT_TV, MSGL_V, "Selected frequency: %lu (%.3f)\n",
freq, freq/16.0);
}
if (tvh->tv_param->channel) {
struct CHANLIST cl;
mp_tmsg(MSGT_TV, MSGL_V, "Requested channel: %s\n", tvh->tv_param->channel);
mp_msg(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];
@@ -606,7 +606,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, "Selected channel: %s (freq: %.3f)\n",
mp_msg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
cl.name, cl.freq/1000.0);
tv_set_freq_float(tvh, cl.freq);
break;
@@ -644,7 +644,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,"Available drivers:\n");
mp_msg(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)
@@ -665,7 +665,7 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param)
continue;
h->tv_param=tv_param;
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,
mp_msg(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:"");
@@ -675,9 +675,9 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param)
}
if(tv_param->driver)
mp_tmsg(MSGT_TV, MSGL_ERR, "No such driver: %s\n", tv_param->driver);
mp_msg(MSGT_TV, MSGL_ERR, "No such driver: %s\n", tv_param->driver);
else
mp_tmsg(MSGT_TV, MSGL_ERR, "TV driver autodetection failed.\n");
mp_msg(MSGT_TV, MSGL_ERR, "TV driver autodetection failed.\n");
return NULL;
}
@@ -784,7 +784,7 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
break;
case AF_FORMAT_MPEG2:
default:
mp_tmsg(MSGT_TV, MSGL_ERR, "Audio type '%s' unsupported!\n",
mp_msg(MSGT_TV, MSGL_ERR, "Audio type '%s' unsupported!\n",
af_fmt_to_str(audio_format));
goto no_audio;
}
@@ -816,7 +816,7 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
sh_audio->wf->nBlockAlign = samplesize * sh_audio->channels.num;
sh_audio->wf->nAvgBytesPerSec = sh_audio->i_bps;
mp_tmsg(MSGT_DECVIDEO, MSGL_V, " TV audio: %d channels, %d bits, %d Hz\n",
mp_msg(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);
}
@@ -865,7 +865,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, "Unknown color option (%d) specified!\n", opt);
mp_msg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
}
return TVI_CONTROL_UNKNOWN;
@@ -886,7 +886,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, "Unknown color option (%d) specified!\n", opt);
mp_msg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
}
return TVI_CONTROL_UNKNOWN;
@@ -897,7 +897,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, "Current frequency: %lu (%.3f)\n",
mp_msg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
*freq, *freq/16.0);
}
return 1;
@@ -913,7 +913,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, "Current frequency: %lu (%.3f)\n",
mp_msg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
freq, freq/16.0);
}
return 1;
@@ -1079,7 +1079,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, "Error: Cannot set norm!\n");
mp_msg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
return 0;
}
}

View File

@@ -1759,7 +1759,7 @@ static void *audio_grabber(void *data)
static double grab_audio_frame(priv_t *priv, char *buffer, int len)
{
mp_dbg(MSGT_TV, MSGL_DBG2, "grab_audio_frame(priv=%p, buffer=%p, len=%d)\n",
mp_msg(MSGT_TV, MSGL_DBG2, "grab_audio_frame(priv=%p, buffer=%p, len=%d)\n",
priv, buffer, len);
// hack: if grab_audio_frame is called first, it means we are used by mplayer