summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvd.c
diff options
context:
space:
mode:
authorAmar Takhar <mplayer@darkbeer.org>2009-07-07 01:15:02 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-07 01:38:20 +0300
commite306174952d42e1cd6cc5efc50ae6bb0410501bc (patch)
treea7eb451f2c634f17d8e36a72b6305c1aff508904 /stream/stream_dvd.c
parentb5972d6f14c04384d88d3f813b435d484562403f (diff)
downloadmpv-e306174952d42e1cd6cc5efc50ae6bb0410501bc.tar.bz2
mpv-e306174952d42e1cd6cc5efc50ae6bb0410501bc.tar.xz
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/stream_dvd.c')
-rw-r--r--stream/stream_dvd.c56
1 files changed, 28 insertions, 28 deletions
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;
}