diff options
Diffstat (limited to 'frontend.c')
-rw-r--r-- | frontend.c | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.c,v 1.59 2008-04-14 19:58:54 phintuka Exp $ + * $Id: frontend.c,v 1.59.2.2 2008-09-26 13:46:49 phintuka Exp $ * */ @@ -198,6 +198,12 @@ void cXinelibThread::InfoHandler(const char *info) } } + else if(!strncmp(info, "DVDBUTTONS ", 11)) { + map += 11; + while(*map == ' ') map++; + cXinelibDevice::Instance().SetMetaInfo(miDvdButtons, map); + } + else if(!strncmp(info, "TITLE ", 6)) { map += 6; while(*map == ' ') map++; @@ -769,6 +775,24 @@ bool cXinelibThread::PlayFile(const char *FileName, int Position, } else { if(xc.extsub_size >= 0) Xine_Control("EXTSUBSIZE", xc.extsub_size); + +#if VDRVERSNUM >= 10515 + // set preferred subtitle language + if (Setup.DisplaySubtitles) { + const char *langs = I18nLanguageCode(Setup.SubtitleLanguages[0]); + if (langs) { + char lang1[5]; + strn0cpy(lang1, langs, 4); /* truncate */ + const char *spu_lang = iso639_1_to_iso639_2(lang1); + LOGMSG("Preferred SPU language: %s (%s)", lang1, spu_lang); + if (spu_lang && spu_lang[0] && spu_lang[1] && !spu_lang[2]) + Xine_Control(cString::sprintf("SPUSTREAM %s", spu_lang)); + } + } else { + LOGMSG("Preferred SPU language: (none)"); + Xine_Control(cString::sprintf("SPUSTREAM %d", ttXSubtitleNone)); + } +#endif } return (!GetStopSignal()) && (result==0); |