diff -Nru ttxtsubs-0.0.5/Makefile ttxtsubs-0.0.5-premium-edition/Makefile --- ttxtsubs-0.0.5/Makefile 2004-05-31 22:26:06.000000000 +0300 +++ ttxtsubs-0.0.5-premium-edition/Makefile 2005-03-14 12:47:32.974875000 +0200 @@ -48,11 +48,14 @@ ### The object files (add further files here): OBJS = $(PLUGIN).o ttxtsubsdisplayer.o ttxtsubsdisplay.o teletext.o siinfo.o \ - ttxtsubsfilter.o ttxtsubsrecorder.o ttxtsubsreceiver.o ttxtsubsi18n.o + ttxtsubsfilter.o ttxtsubsrecorder.o ttxtsubsreceiver.o ttxtsubsi18n.o \ + ttxtsubspagemenu.o ttxtsubschannelsettings.o SOURCEFILES = *.c *.h [A-Z]???* contrib ### Implicit rules: +.PHONY: all all-redirect +all-redirect: all %.o: %.c $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< diff -Nru ttxtsubs-0.0.5/siinfo.c ttxtsubs-0.0.5-premium-edition/siinfo.c --- ttxtsubs-0.0.5/siinfo.c 2004-04-06 01:20:29.000000000 +0300 +++ ttxtsubs-0.0.5-premium-edition/siinfo.c 2005-03-14 12:50:40.912375000 +0200 @@ -18,11 +18,13 @@ #include #include +#include #include "linux/dvb/dmx.h" #include "siinfo.h" #include "ttxtsubsglobals.h" +#include "ttxtsubschannelsettings.h" #define DESCR_TELETEXT 0x56 #define DESCR_DVBSUBTITLES 0x59 @@ -187,7 +189,7 @@ struct sect_header *h; int i; - if((start_time + 5) < time(NULL)) { + if((start_time + 1) < time(NULL)) { ret = -1; done = 1; break; @@ -462,16 +464,12 @@ } -typedef std::map < int, struct ttxtinfo > cCache; - -static cCache gCache; - /* * find the ttxt_info in the PMT via the PAT, try first with the SID * and if that fails with the VPID * return <> 0 on error; */ -int GetTtxtInfo(int card_no, int channel, uint16_t sid, uint16_t vpid, struct ttxtinfo *info) +int GetTtxtInfo(int card_no, const cChannel *c, struct ttxtinfo *info) { int ret = -1; char *patsects[256]; @@ -484,13 +482,51 @@ memset((char *) info, 0, sizeof(*info)); - cCache::iterator iter; - iter = gCache.find(channel); - if(iter != gCache.end()) { - DupTtxtInfo(&iter->second, info); - ret = 0; - return ret; +#if 1 + // + cTtxtSubsChannelSetting *cs = + TtxtSubsChannelSettings.Get(c); + + if (cs && cs->PageMode() == PAGE_MODE_MANUAL) { + struct ttxt_descr descr; + + if (cs->PageNumber() > 0) { + int temp = cs->PageNumber(); + if (temp>=800) temp-=800; + char langs[MAXLANGUAGES][2][4]; + char hi[MAXLANGUAGES][2]; + //put as the first language the first one configured, + //so that FindSubs will later accept it + memcpy(langs,globals.languages(),sizeof(langs)); + memcpy(hi,globals.hearingImpaireds(),sizeof(hi)); + for (i = 0; i < MAXLANGUAGES; i++) { + for (j = 0; j < 2 ; j++) { + if (!langs[i][j][0]) continue; + + descr.d[0].lang[0] = langs[i][j][0]; + descr.d[0].lang[1] = langs[i][j][1]; + descr.d[0].lang[2] = langs[i][j][2]; + if (hi[i][j]) + descr.d[0].type_mag = (TTXT_SUBTITLE_HEARING_IMPAIRED_PAGE << 3) + (temp / 100); + else + descr.d[0].type_mag = (TTXT_SUBTITLE_PAGE << 3) + (temp / 100); + + temp = temp % 100; + descr.d[0].page_no = ((temp / 10) << 4) + (temp % 10); + + addpageinfo(info, c->Tpid(), &descr, 0); + return 0; + } + } + //no language configured + return -1; + } } + if (cs && cs->PageMode() == PAGE_MODE_DISABLED) { + return -1; + } + // +#endif for(retry = 0; retry <= 1 && !foundinfo; retry++) { // XXX retry two times due to flaky pat scanning with hw_sections=0 @@ -505,7 +541,7 @@ if(ret) goto bail; - if(sid != 0) { + if(c->Sid() != 0) { int found; for(i = 0, found = 0; i < numsects && !found; i++) { @@ -520,7 +556,7 @@ if(pno == 0) continue; // network pid - if(pno == sid) { + if(pno == c->Sid()) { pmt_pid = ntohs(s->d[j].res_PMTPID) & 0x1fff; found = 1; } @@ -533,7 +569,7 @@ ret = FindTtxtInfoInPMT(card_no, pmt_pid, 0, info, &foundinfo); } else { // SID not found, try searching VID in all SIDS - if(vpid != 0) { + if(c->Vpid() != 0) { int done; for(i = 0, done = 0; i < numsects && !done; i++) { int numdescrs; @@ -550,7 +586,7 @@ pmt_pid = ntohs(s->d[j].res_PMTPID) & 0x1fff; // printf("GetTtxtInfo C pmt_pid: %d, vpid: %d\n", pmt_pid, vpid); // XXXX - ret = FindTtxtInfoInPMT(card_no, pmt_pid, vpid, info, &foundinfo); + ret = FindTtxtInfoInPMT(card_no, pmt_pid, c->Vpid(), info, &foundinfo); if(ret) { done = 1; } @@ -563,12 +599,6 @@ FreeSects(patsects); } - - if(foundinfo || (ret == 0 && retry == 2)) { - struct ttxtinfo info2; - DupTtxtInfo(info, &info2); - gCache[channel] = info2; - } bail: return ret; @@ -602,7 +632,7 @@ } -struct ttxtpidinfo *FindSubs(struct ttxtinfo *info, int *pid, int *pageno) +struct ttxtpidinfo *FindSubs(struct ttxtinfo *info, int *pid, int *pageno, char *lang) { struct ttxtpidinfo *foundPI = NULL; int foundChoise = 1000; @@ -621,6 +651,7 @@ foundChoise = ch; *pid = info->p[i].pid; *pageno = info->p[i].i[j].mag * 0x100 + info->p[i].i[j].page; + strncpy(lang, info->p[i].i[j].lang, 3); foundPI = &(info->p[i]); } } @@ -658,13 +689,6 @@ } -void -ClearSICache(void) -{ - gCache.clear(); -} - - #if 0 int XX_GetTtxtSubtitleInfo(uint16_t pid, int card_no, struct ttxtinfo *info) { diff -Nru ttxtsubs-0.0.5/siinfo.h ttxtsubs-0.0.5-premium-edition/siinfo.h --- ttxtsubs-0.0.5/siinfo.h 2004-03-02 00:53:17.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/siinfo.h 2005-03-14 12:47:33.037375000 +0200 @@ -30,11 +30,9 @@ * and if that fails with the VPID * return <> 0 on error; */ -int GetTtxtInfo(int card_no, int channel, uint16_t sid, uint16_t vpid, struct ttxtinfo *info); +int GetTtxtInfo(int card_no, const cChannel *c, struct ttxtinfo *info); void FreeTtxtInfoData(struct ttxtinfo *info); void DupTtxtInfo(struct ttxtinfo *in, struct ttxtinfo *out); -struct ttxtpidinfo *FindSubs(struct ttxtinfo *info, int *pid, int *pageno); - -void ClearSICache(void); +struct ttxtpidinfo *FindSubs(struct ttxtinfo *info, int *pid, int *pageno, char *lang); diff -Nru ttxtsubs-0.0.5/ttxtsubs.c ttxtsubs-0.0.5-premium-edition/ttxtsubs.c --- ttxtsubs-0.0.5/ttxtsubs.c 2004-05-31 22:59:14.000000000 +0300 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubs.c 2005-03-14 12:53:13.912375000 +0200 @@ -11,6 +11,7 @@ #include #include #include +#include #define TIMEMEASURE 0 #if TIMEMEASURE @@ -31,11 +32,18 @@ #include "utils.h" #include "siinfo.h" #include "ttxtsubs.h" +#include "ttxtsubspagemenu.h" +#include "ttxtsubschannelsettings.h" -static const char *VERSION = "0.0.5"; +#if VDRVERSNUM && VDRVERSNUM < 10319 +#error "This version of ttxtsubs only works with vdr version >= 1.3.19!" +#endif + +static const char *VERSION = "0.0.5-PE"; static const char *DESCRIPTION = "Teletext subtitles"; cTtxtsubsConf globals; +cTtxtSubsChannelSettings TtxtSubsChannelSettings; // ISO 639-2 language codes in VDR order // XXX should be replaced with something that allows for other languages and for real language names! @@ -59,11 +67,10 @@ "ron","rum", //Romanian "hun","", //Hungarian "cat","", //Catalanian -#if VDRVERSNUM >= 10300 "rus","", //Russian -#endif - // Not in translations! - "dan","" //Danish + "hrv","scr", //Croatian + "est","", //Estonian + "dan","" //Danish }; const char *gLanguageNames[] = { "-", @@ -78,20 +85,27 @@ "suomi", // this is not a typo - it's really lowercase! "Polski", "Español", +#if VDRVERSNUM >= 10302 + "ÅëëçíéêÜ", +#else "Ellinika", +#endif "Svenska", "Romaneste", "Magyar", "Català", -#if VDRVERSNUM >= 10300 +#if VDRVERSNUM >= 10302 "ÀãááÚØÙ", +#else + "Russian", #endif - // Not in translations! + "Hrvatski", + "Eesti", "Dansk" }; int gNumLanguages = sizeof(gLanguages) / sizeof(gLanguages[0]); -class cPluginTtxtsubs : public cPlugin, public cStatus, public cVDRTtxtsubsHookListener { +class cPluginTtxtsubs : public cPlugin, public cStatus, public cVDRTtxtsubsHookListener, public cThread { public: cPluginTtxtsubs(void); virtual ~cPluginTtxtsubs(); @@ -131,6 +145,9 @@ virtual void PlayerTeletextData(uint8_t *p, int length); virtual cTtxtSubsRecorderBase *NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch); + // -- cThread + void Action(void); + // -- internal private: void StartTtxtLive(const cDevice *Device, int pid, int page); @@ -149,6 +166,12 @@ // ugly hack for now int mPage; + // wait for channel switch + sem_t chswitchwait; + cMutex getchmutex; + int switchChannel; + int lastc; + const cDevice *switchDevice; }; class cMenuSetupTtxtsubs : public cMenuSetupPage { @@ -163,6 +186,10 @@ int mLangHI[MAXLANGUAGES]; int mSavedFrenchSpecial; int mDoStore; + int mTransparency; + int mRed; + int mGreen; + int mBlue; cTtxtsubsConf mConf; }; @@ -178,11 +205,16 @@ memset(mOldLanguage, 0, 4); strncpy(globals.mLanguages[0][0], "unk", 4); + sem_init(&chswitchwait,0,0); + lastc=0; + cThread::Start(); } cPluginTtxtsubs::~cPluginTtxtsubs() { // Clean up after yourself! + cThread::Cancel(); + StopTtxt(); } const char *cPluginTtxtsubs::CommandLineHelp(void) @@ -201,6 +233,8 @@ { // Start any background activities the plugin shall perform. + TtxtSubsChannelSettings.Load(AddDirectory(ConfigDirectory("ttxtsubs"),"channelsettings.dat")); + RegisterI18n(Phrases); if(!memcmp(globals.mLanguages[0][0], "unk", 3)) { @@ -253,7 +287,7 @@ { switch(globals.mMainMenuEntry) { case 1: - if(globals.mDoDisplay) + if(globals.mRealDoDisplay) return tr("Hide teletext subtitles"); else return tr("Display teletext subtitles"); @@ -263,6 +297,8 @@ else return tr("Position Teletext Subtitles for Letterbox"); case 3: + return tr("Page Selection"); + case 4: return tr("Teletext Subtitles"); default: return NULL; @@ -277,12 +313,14 @@ switch(globals.mMainMenuEntry) { case 1: - globals.mDoDisplay = globals.mDoDisplay ? 0 : 1; + globals.mRealDoDisplay = globals.mRealDoDisplay ? 0 : 1; return NULL; case 2: globals.mBottomLB = globals.mBottomLB ? 0 : 1; return NULL; case 3: + return new cTtxtsubsPageMenu(); + case 4: return new cMenuSetupTtxtsubs(this, 1); default: return NULL; @@ -298,7 +336,7 @@ bool cPluginTtxtsubs::SetupParse(const char *Name, const char *Value) { - if(!strcasecmp(Name, "Display")) globals.mDoDisplay = atoi(Value); + if(!strcasecmp(Name, "Display")) { globals.mDoDisplay = atoi(Value); globals.mRealDoDisplay=globals.mDoDisplay; } else if(!strcasecmp(Name, "Record")) globals.mDoRecord = atoi(Value); else if(!strcasecmp(Name, "MainMenuEntry")) globals.mMainMenuEntry = atoi(Value); else if(!strcasecmp(Name, "TextPos")) globals.mTextPos = atoi(Value); @@ -306,8 +344,10 @@ else if(!strcasecmp(Name, "BottomAdj")) globals.mBottomAdj = atoi(Value); else if(!strcasecmp(Name, "FrenchSpecial")) globals.mFrenchSpecial = atoi(Value); else if(!strcasecmp(Name, "LineSpacing")) globals.mLineSpacing = atoi(Value); + else if(!strcasecmp(Name, "DvbSources")) globals.mDvbSources = atoi(Value); else if(!strcasecmp(Name, "FgColor")) globals.mFgColor = atoi(Value); else if(!strcasecmp(Name, "BgColor")) globals.mBgColor = atoi(Value); + else if(!strcasecmp(Name, "CustomColor")) globals.mCustomColor = atoi(Value); else if(!strcasecmp(Name, "Languages")) parseLanguages(Value); else if(!strcasecmp(Name, "HearingImpaireds")) parseHIs(Value); // Handle old settings @@ -319,35 +359,93 @@ return true; } +void cPluginTtxtsubs::Action(void) +{ + while(true) { + sem_wait(&chswitchwait); + int cn; + const cDevice *dev; + getchmutex.Lock(); + cn=switchChannel; + dev=switchDevice; + getchmutex.Unlock(); + if (cn!=lastc) { + StopTtxt(); + lastc=0; + cChannel *c = Channels.GetByNumber(cn); + if(c) { + //int manual_page = TtxtSubsChannelSettings.Page(c->GetChannelID()); + //if (manual_page>0) { + // printf("ttxtsubs: manual page %03x selected\n", manual_page); + // if (c->Tpid()) StartTtxtLive(dev, c->Tpid(), manual_page); + //} else if(manual_page==0) { + struct ttxtinfo info; + int pid, page; + char lang[4] = ""; + bool geterror=true; + if((globals.dvbSources() == 0) || ((globals.dvbSources() == 1) && c->IsSat()) || ((globals.dvbSources() == 2) && c->IsTerr()) || ((globals.dvbSources() == 3) && c->IsCable())) + { + int tries=0; //sometimes it doesn't find subtitles even if they're there + //the problem is that while the dish is moving it's picking the signal + //from a different satellite, so what really should be done is to + //check if the dish is positioned + while(tries<=2) { + while(geterror=GetTtxtInfo(dev->ActualDevice()->CardIndex(), c, &info)) { + fprintf(stderr, "ttxtsubs: Error: GetTtxtInfo failed!\n"); + sleep(1); + getchmutex.Lock(); + bool changed=(cn!=switchChannel); + getchmutex.Unlock(); + if (changed) { + fprintf(stderr, "ttxtsubs: Channel changed while looking for teletext info\n"); + break; + } + } + if (!geterror) { + if(FindSubs(&info, &pid, &page, lang)) { + //fprintf(stderr, "CHANNELSWITCH, pid: %d page: %x\n", pid, page); + mPage = page; // XXX remember this for playback (temporary hack)! + for(int i = 0; i < gNumLanguages; i++) { + if(!memcmp(lang, gLanguages[i][0], 3) || + !memcmp(lang, gLanguages[i][1], 3)) { + globals.mI18nLanguage = i - 1; + } + } + if(globals.mI18nLanguage < 0 || globals.mI18nLanguage >= I18nNumLanguages) + globals.mI18nLanguage = 0; // default to iso8859-1 if no predefined charset + StartTtxtLive(dev, pid, page); + FreeTtxtInfoData(&info); + break; + } else { //!FindSubs + FreeTtxtInfoData(&info); + tries++; + } + } else break; //if(!geterror).. + } //while(tries<=2) + } + lastc=cn; + //} + } + } + } +} + void cPluginTtxtsubs::ChannelSwitch(const cDevice *Device, int ChannelNumber) { #if TIMEMEASURE struct timeval tv, tv2; gettimeofday(&tv, NULL); #endif - dprint("cPluginTtxtsubs::ChannelSwitch(devicenr: %d, channelnr: %d) - mDispl: %x\n", - Device->DeviceNumber(), ChannelNumber, mDispl); // XXX + //dprint("cPluginTtxtsubs::ChannelSwitch(devicenr: %d, channelnr: %d) - mDispl: %x\n", Device->DeviceNumber(), ChannelNumber, mDispl); // XXX if(Device->IsPrimaryDevice()) { if(ChannelNumber) { - cChannel *c = Channels.GetByNumber(ChannelNumber); - if(c) { - struct ttxtinfo info; - int pid, page; - - if(GetTtxtInfo(Device->ActualDevice()->CardIndex(), ChannelNumber, c->Sid(), c->Vpid(), &info)) { - fprintf(stderr, "ttxtsubs: Error: GetTtxtInfo failed!\n"); - } else { - if(FindSubs(&info, &pid, &page)) { - //fprintf(stderr, "CHANNELSWITCH, pid: %d page: %x\n", pid, page); - mPage = page; // XXX remember this for playback (temporary hack)! - StartTtxtLive(Device, pid, page); - } - FreeTtxtInfoData(&info); - } - } - } else - StopTtxt(); + getchmutex.Lock(); + switchChannel=ChannelNumber; + switchDevice=Device; + getchmutex.Unlock(); + sem_post(&chswitchwait); + } } #if TIMEMEASURE gettimeofday(&tv2, NULL); @@ -434,7 +532,7 @@ void cPluginTtxtsubs::ShowTtxt(void) { - if(globals.mDoDisplay) + if(globals.mRealDoDisplay) if(mDispl) mDispl->ShowDisplay(); } @@ -507,9 +605,11 @@ fprintf(stderr, "cMenuSetupTtxtsubsLanguages::Store\n"); } -const char * mainMenuAlts[4] = {NULL, NULL, NULL, NULL}; +const char * mainMenuAlts[5] = {NULL, NULL, NULL, NULL, NULL}; const char * textPosAlts[4]; +const char * dvbSources[5]; const char * textColors[12]; +const char * const colorValues[17] = {"#00", "#11", "#22", "#33", "#44", "#55", "#66", "#77", "#88", "#99", "#AA", "#BB", "#CC", "#DD", "#EE", "#FF", NULL}; cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore) : @@ -517,19 +617,27 @@ mDoStore(doStore), mConf(globals) { + char *buf = NULL; //static char *mainMenuAlts[] = {"off", "Display on/off", "4:3/Letterbox", "This menu"}; // can't get it to store changes in file if(mainMenuAlts[0] == NULL) { mainMenuAlts[0] = tr("off"); mainMenuAlts[1] = tr("Display on/off"); mainMenuAlts[2] = tr("4:3/Letterbox"); - mainMenuAlts[3] = NULL; + mainMenuAlts[3] = tr("Page Mode"); + mainMenuAlts[4] = NULL; textPosAlts[0] = tr("Left"); textPosAlts[1] = tr("Center"); textPosAlts[2] = tr("Right"); textPosAlts[3] = NULL; + dvbSources[0] = tr("All"); + dvbSources[1] = tr("Only DVB-S"); + dvbSources[2] = tr("Only DVB-T"); + dvbSources[3] = tr("Only DVB-C"); + dvbSources[4] = NULL; + textColors[0] = tr("Black"); textColors[1] = tr("White"); textColors[2] = tr("Red"); @@ -538,14 +646,16 @@ textColors[5] = tr("Magenta"); textColors[6] = tr("Blue"); textColors[7] = tr("Cyan"); - textColors[8] = tr("Grey"); + textColors[8] = tr("Custom"); textColors[9] = tr("Transparent"); textColors[10] = tr("Background"); textColors[11] = NULL; } const int numTextPosAlts = sizeof(textPosAlts) / sizeof(textPosAlts[0]) - 1; const int numMainMenuAlts = sizeof(mainMenuAlts) / sizeof(mainMenuAlts[0]) - 1; + const int numDvbSources = sizeof(dvbSources) / sizeof(dvbSources[0]) - 1; const int numTextColors = sizeof(textColors) / sizeof(textColors[0]) - 1; + const int numColorValues = sizeof(colorValues) / sizeof(colorValues[0]) - 1; mSavedFrenchSpecial = mConf.mFrenchSpecial; @@ -578,6 +688,12 @@ &mConf.mBottomAdj, -100, 45)); Add(new cMenuEditIntItem( tr("Line Spacing Adjust"), &mConf.mLineSpacing, -25, 25)); + Add(new cMenuEditBoolItem(tr("Workaround for some French chns"), + &mConf.mFrenchSpecial, tr("no"), tr("yes"))); + if(mConf.mDvbSources < 0 || mConf.mDvbSources >= numDvbSources) + mConf.mDvbSources = 0; // menu item segfaults if out of range + Add(new cMenuEditStraItem(tr("DVB Source Selection"), + &mConf.mDvbSources, 4, dvbSources)); if(mConf.mFgColor < 0 || mConf.mFgColor >= numTextColors) mConf.mFgColor = 1; // menu item segfaults if out of range Add(new cMenuEditStraItem(tr("Text Color"), &mConf.mFgColor, @@ -586,19 +702,32 @@ mConf.mBgColor = 0; // menu item segfaults if out of range Add(new cMenuEditStraItem(tr("Background Color"), &mConf.mBgColor, numTextColors, textColors)); - Add(new cMenuEditBoolItem(tr("Workaround for some French chns"), - &mConf.mFrenchSpecial, tr("no"), tr("yes"))); + + // the color code is borrowed from AIO patches + mBlue = (mConf.mCustomColor & 0x0000000F); + if (mBlue < 0 || mBlue >= numColorValues) mBlue = 0; + mGreen = (mConf.mCustomColor & 0x00000F00) >> 8; + if (mGreen < 0 || mGreen >= numColorValues) mGreen = 0; + mRed = (mConf.mCustomColor & 0x000F0000) >> 16; + if (mRed < 0 || mRed >= numColorValues) mRed = 0; + mTransparency = (mConf.mCustomColor & 0x0F000000) >> 24; + if (mTransparency < 0 || mTransparency >= numColorValues) mTransparency = 0; + asprintf(&buf, "%s: --------------------------------------------", tr("Custom Color")); + cOsdItem *item = new cOsdItem(buf); + item->SetSelectable(false); + free(buf); + Add(item); + Add(new cMenuEditStraItem(tr("Red Value"), &mRed, numColorValues, colorValues)); + Add(new cMenuEditStraItem(tr("Green Value"), &mGreen, numColorValues, colorValues)); + Add(new cMenuEditStraItem(tr("Blue Value"), &mBlue, numColorValues, colorValues)); + Add(new cMenuEditStraItem(tr("Transparency Value"), &mTransparency, numColorValues, colorValues)); for(int n = 0; n < MAXLANGUAGES; n++) { char str[100]; char *allowedc = "abcdefghijklmnopqrstuvwxyz"; cOsdItem *item = new cOsdItem("--------------------------------------------------------"); -#if defined(ELCHIAIOVERSION) - item->SetColor(clrScrolLine); -#else - item->SetColor(clrCyan); -#endif + item->SetSelectable(false); Add(item); sprintf(str, "%s %d", tr("Language"), n + 1); @@ -621,8 +750,6 @@ cMenuSetupTtxtsubs::~cMenuSetupTtxtsubs(void) { - if(mSavedFrenchSpecial != mConf.mFrenchSpecial) - ClearSICache(); if(mDoStore) { Store(); @@ -651,8 +778,14 @@ SetupStore("FrenchSpecial", mConf.mFrenchSpecial); SetupStore("MainMenuEntry", mConf.mMainMenuEntry); SetupStore("LineSpacing", mConf.mLineSpacing); + SetupStore("DvbSources", mConf.mDvbSources); SetupStore("FgColor", mConf.mFgColor); SetupStore("BgColor", mConf.mBgColor); + mConf.mCustomColor = (mBlue ) | (mBlue << 4) | + (mGreen << 8) | (mGreen << 12) | + (mRed << 16) | (mRed << 20) | + (mTransparency << 24) | (mTransparency << 28); + SetupStore("CustomColor", mConf.mCustomColor); char lstr[MAXLANGUAGES*2*4 + 1]; char histr[MAXLANGUAGES*2 + 1]; diff -Nru ttxtsubs-0.0.5/ttxtsubschannelsettings.c ttxtsubs-0.0.5-premium-edition/ttxtsubschannelsettings.c --- ttxtsubs-0.0.5/ttxtsubschannelsettings.c 1970-01-01 02:00:00.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubschannelsettings.c 2005-03-14 12:47:33.084250000 +0200 @@ -0,0 +1,37 @@ +#include "ttxtsubschannelsettings.h" + +#include +#include +#include + +cTtxtSubsChannelSetting::cTtxtSubsChannelSetting(const cChannel *Channel, int PageMode, int PageNumber) +{ + channelid=Channel->GetChannelID(); + pagemode=PageMode; + pagenumber=PageNumber; +} + +bool cTtxtSubsChannelSetting::Parse(const char *s) +{ + bool result=false; + char *buffer=NULL; + int PageMode; + int PageNumber; + if (3 == sscanf(s, "%a[^,],%d,%d\n", &buffer, &PageMode, &PageNumber)) { + tChannelID channelID=tChannelID::FromString(buffer); + if (channelID.Valid()) { + channelid=channelID; + pagemode=PageMode; + pagenumber=PageNumber; + result=true; + } + } + free(buffer); + return result; +} + +bool cTtxtSubsChannelSetting::Save(FILE *f) +{ + return fprintf(f, "%s,%d,%d\n", *channelid.ToString(), pagemode, pagenumber) > 0; +} + diff -Nru ttxtsubs-0.0.5/ttxtsubschannelsettings.h ttxtsubs-0.0.5-premium-edition/ttxtsubschannelsettings.h --- ttxtsubs-0.0.5/ttxtsubschannelsettings.h 1970-01-01 02:00:00.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubschannelsettings.h 2005-03-14 12:47:33.115500000 +0200 @@ -0,0 +1,51 @@ +#ifndef __TTXTSUBSCHANNELSETTINGS_H +#define __TTXTSUBSCHANNELSETTINGS_H + +#include +#include + +#define PAGE_MODE_DISABLED -1 +#define PAGE_MODE_AUTO 0 +#define PAGE_MODE_MANUAL 1 + +class cTtxtSubsChannelSetting:public cListObject { +private: + tChannelID channelid; + int pagemode; + int pagenumber; +public: + cTtxtSubsChannelSetting(void) {} + cTtxtSubsChannelSetting(const cChannel* Channel, int PageMode, int PageNumber); + bool Parse(const char *s); + bool Save(FILE *f); + tChannelID ChannelID(void) const { return channelid; } + int PageMode(void) const { return pagemode; } + int PageNumber(void) const { return pagenumber; } + void Set(int PageMode, int PageNumber) { pagemode=PageMode; pagenumber=PageNumber; } + }; + +class cTtxtSubsChannelSettings:public cConfig { +public: + cTtxtSubsChannelSetting *Get(const cChannel *Channel) { + tChannelID ChannelID=Channel->GetChannelID(); + for (cTtxtSubsChannelSetting *p=First(); p; p=Next(p)) { + if (p->ChannelID()==ChannelID) return p; + } + return NULL; + } + int Page(const cChannel *Channel) { + cTtxtSubsChannelSetting *cs=Get(Channel); + if (!cs) return(0); + if (cs->PageMode()==PAGE_MODE_DISABLED) return(-1); + int temp=cs->PageNumber(); + int mag=temp/100; + temp=temp%100; + int page_no=(mag<<8)+((temp/10)<<4)+(temp%10); + if (page_no>=0x800) page_no-=0x800; + return(page_no); + } +}; + +extern cTtxtSubsChannelSettings TtxtSubsChannelSettings; + +#endif //__TTXTSUBSCHANNELSETTINGS_H diff -Nru ttxtsubs-0.0.5/ttxtsubsdisplay.c ttxtsubs-0.0.5-premium-edition/ttxtsubsdisplay.c --- ttxtsubs-0.0.5/ttxtsubsdisplay.c 2004-04-07 11:49:31.000000000 +0300 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubsdisplay.c 2005-03-14 12:47:30.568625000 +0200 @@ -9,6 +9,7 @@ #include #include #include +#include #include "ttxtsubsglobals.h" #include "ttxtsubsdisplay.h" @@ -22,12 +23,6 @@ finished }; -// extra colours -enum eMyDvbColor { - myClrGrey = 0xFF808080 -}; - - // -------------------- class cOSDSelfMemory { @@ -90,7 +85,11 @@ { if(mLastDataTime) free(mLastDataTime); - ClearOSD(); + if(mOsd) { + cOsd* tmp = mOsd; + mOsd = NULL; + delete tmp; + } } @@ -112,8 +111,8 @@ //dprint("cTtxtSubsDisplay::Hide\n"); cMutexLock lock(&mOsdLock); - ClearOSD(); mDoDisplay = 0; + ClearOSD(); } @@ -341,7 +340,7 @@ TEXTX = 15 }; -static eDvbColor +static tColor getcolor(int color) { switch (color) @@ -354,11 +353,11 @@ case 5: return clrMagenta; case 6: return clrBlue; case 7: return clrCyan; - case 8: return (eDvbColor) myClrGrey; + case 8: return globals.customColor(); case 9: return clrTransparent; - default: return clrBackground; + default: return clrGray50; } - return clrBackground; + return clrGray50; } void cTtxtSubsDisplay::ShowOSD(void) @@ -366,8 +365,9 @@ int i, y; int rowcount = 0; char buf[TTXT_DISPLAYABLE_ROWS][41]; - int doneWidthWorkaround = 0; int bottom = globals.bottomAdj() + (globals.bottomLB() ? BOTLETTERBOX : BOTNORM); + tArea areas[MAXOSDAREAS]; + int numAreas = 0; cOSDSelfMemoryLock selfmem(&gSelfMem); cMutexLock lock(&mOsdLock); @@ -382,76 +382,81 @@ return; } - if(mOsd != NULL) - ClearOSD(); - - //print_page(&page); - for(i = 1; i < 24; i++) { if(page.data[i][0] != 0) // anything on this line? if(ttxt2la1(page.data[i], buf[rowcount], page.national_charset)) rowcount++; } - mOsd = cOsd::OpenRaw(SCREENLEFT, SCREENTOP); - - if(mOsd == NULL) { - //dprint("Error: cOsd::OpenRaw returned NULL!\n"); - return; + if(mOsd) { + cOsd* tmp = mOsd; + mOsd = NULL; + delete tmp; } - mOsd->SetFont(fontOsd); - + if (cOsd::IsOpen()) { + //dprint("NOT displaying subtitles because of other OSD activities!\n"); + return; + } + else { + mOsd = cOsdProvider::NewOsd(SCREENLEFT, SCREENTOP); + if(!mOsd) { + //dprint("Error: cOsdProvider::NewOsd() returned NULL!\n"); + return; + } + } + + cFont::SetCode(I18nCharSets()[globals.i18nLanguage()]); if(rowcount > MAXTTXTROWS) rowcount = MAXTTXTROWS; - -#if 0 // XXXX - rowcount = 4; - strcpy(buf[0], "1234567890123456789012345678901234567890"); - strcpy(buf[1], "1234567890123456789012345678901234567890"); - strcpy(buf[2], "1234567890123456789012345678901234567890"); - strcpy(buf[3], "1234567890123456789012345678901234567890"); -#endif - y = bottom - SCREENTOP - ROWH - ((ROWINCR + globals.lineSpacing()) * (rowcount-1)); for(i = 0; i < rowcount; i++) { - tWindowHandle wind; int w = 0; int left = SIDEMARGIN; - - // XXX Width calculations doesn't work before we have created a window... - if(!doneWidthWorkaround) { - //wind = mOsd->Create(0, y, 4, ROWH, 2); - //mOsd->Fill(0, y, 4, y + ROWH, clrWhite, wind); - //mOsd->Fill(0, y, 4, y + ROWH, clrBackground, wind); - wind = mOsd->Create(0, 575, 4, 1, 2, false); - mOsd->Fill(0, 574, 4, 575, getcolor(globals.fgColor()), wind); - mOsd->Fill(0, 574, 4, 575, clrTransparent, wind); - doneWidthWorkaround = 1; - } - - w = mOsd->Width(buf[i]) + 2 * TEXTX; + w = cFont::GetFont(fontOsd)->Width(buf[i]) + 2 * TEXTX; if(w % 4) w += 4 - (w % 4); - switch(globals.textPos()) { - case 1: - left = (SCREENRIGHT - w) / 2; - break; - case 2: - left = SCREENRIGHT - SIDEMARGIN - w; - break; - } - - wind = mOsd->Create(left, y, w, ROWH, 2, false); - mOsd->Fill(left, y, left + w, y + ROWH, getcolor(globals.fgColor()), wind); // needed for dxr3s... - mOsd->Fill(left, y, left + w, y + ROWH, getcolor(globals.bgColor()), wind); - mOsd->Text(left + TEXTX, y + TEXTY, buf[i], getcolor(globals.fgColor()), getcolor(globals.bgColor()), wind); - + case 1: + left = (SCREENRIGHT - w) / 2; + break; + case 2: + left = SCREENRIGHT - SIDEMARGIN - w; + break; + } + tArea area = {left, y, left+w-1, y+ROWH-1, 2}; + areas[numAreas++] = area; y += (ROWINCR + globals.lineSpacing()); } - - mOsd->Flush(); + if (mOsd->CanHandleAreas(areas, numAreas) != oeOk) { + cFont::SetCode(I18nCharSets()[Setup.OSDLanguage]); + dprint("ttxtsubs: OSD Cannot handle areas (error code: %d) - try to enlarge the line spacing!\n", mOsd->CanHandleAreas(areas, numAreas)); + } + else { + mOsd->SetAreas(areas, numAreas); + y = bottom - SCREENTOP - ROWH - ((ROWINCR + globals.lineSpacing()) * (rowcount-1)); + for(i = 0; i < rowcount; i++) { + int w = 0; + int left = SIDEMARGIN; + w = cFont::GetFont(fontOsd)->Width(buf[i]) + 2 * TEXTX; + if(w % 4) + w += 4 - (w % 4); + switch(globals.textPos()) { + case 1: + left = (SCREENRIGHT - w) / 2; + break; + case 2: + left = SCREENRIGHT - SIDEMARGIN - w; + break; + } + mOsd->DrawRectangle(left, y, left + w, y + ROWH, getcolor(globals.bgColor())); + mOsd->DrawText(left + TEXTX, y + TEXTY, buf[i], getcolor(globals.fgColor()), getcolor(globals.bgColor()), cFont::GetFont(fontOsd)); + //dprint("%d/%d (%d,%d) (%d,%d): %s\n", i, rowcount-1, areas[i].x1, areas[i].y1, left + TEXTX, y + TEXTY, buf[i]); + y += (ROWINCR + globals.lineSpacing()); + } + cFont::SetCode(I18nCharSets()[Setup.OSDLanguage]); + mOsd->Flush(); + } } @@ -461,20 +466,9 @@ cOSDSelfMemoryLock selfmem(&gSelfMem); cMutexLock lock(&mOsdLock); - if(!mDoDisplay) { - //dprint("NOT clearing subtitles because of other OSD activities!\n"); - return; - } - if(mOsd) { - - //mOsd->Clear(ALL_WINDOWS); -#if 0 - // not needed, windows are removed in mOsd destructor - mOsd->Hide(ALL_WINDOWS); - mOsd->Flush(); -#endif - delete mOsd; + cOsd* tmp = mOsd; mOsd = NULL; + delete tmp; } } diff -Nru ttxtsubs-0.0.5/ttxtsubsdisplay.h ttxtsubs-0.0.5-premium-edition/ttxtsubsdisplay.h --- ttxtsubs-0.0.5/ttxtsubsdisplay.h 2004-03-02 00:53:17.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubsdisplay.h 2005-03-14 12:47:30.599875000 +0200 @@ -4,7 +4,7 @@ struct ttxt_data_field; struct timeval; -class cOsdBase; +class cOsd; #define MAXTTXTROWS 5 @@ -29,7 +29,7 @@ int mNo; int mDoDisplay; struct ttxt_page page; - cOsdBase *mOsd; + cOsd *mOsd; cMutex mOsdLock; struct timeval *mLastDataTime; }; diff -Nru ttxtsubs-0.0.5/ttxtsubsdisplayer.c ttxtsubs-0.0.5-premium-edition/ttxtsubsdisplayer.c --- ttxtsubs-0.0.5/ttxtsubsdisplayer.c 2004-03-02 00:53:17.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubsdisplayer.c 2005-03-14 12:47:30.615500000 +0200 @@ -72,7 +72,7 @@ cTtxtSubsLiveReceiver::cTtxtSubsLiveReceiver(int Pid, int textpage) : - cReceiver(0, -1, 1, Pid), + cReceiver(0, -1, Pid), cTtxtSubsDisplayer(textpage) { } diff -Nru ttxtsubs-0.0.5/ttxtsubsglobals.h ttxtsubs-0.0.5-premium-edition/ttxtsubsglobals.h --- ttxtsubs-0.0.5/ttxtsubsglobals.h 2004-03-02 00:57:58.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubsglobals.h 2005-03-14 12:47:33.131125000 +0200 @@ -1,17 +1,21 @@ class cPluginTtxtsubs; class cMenuSetupTtxtsubs; +class cTtxtsubsPageMenu; +class cTtxtSubsChannelSettings; #define MAXLANGUAGES 5 class cTtxtsubsConf { friend class cPluginTtxtsubs; friend class cMenuSetupTtxtsubs; + friend class cTtxtsubsPageMenu; public: cTtxtsubsConf(void) { mDoDisplay = 1; + mRealDoDisplay =1; mDoRecord = 1; mMainMenuEntry = 0; mTextPos = 0; @@ -19,14 +23,17 @@ mBottomAdj = 0; mFrenchSpecial = 0; mLineSpacing = 0; + mDvbSources = 0; mFgColor = 1; - mBgColor = 10; + mBgColor = 8; + mCustomColor = 0xBB333333; memset(mLanguages, 0, sizeof(mLanguages)); memset(mHearingImpaireds, 0, sizeof(mHearingImpaireds)); + mI18nLanguage = 0; } public: - int doDisplay(void) {return mDoDisplay;} + int doDisplay(void) {return mRealDoDisplay;} int doRecord(void) {return mDoRecord;} int mainMenuEntry(void) {return mMainMenuEntry;} int textPos(void) {return mTextPos;} @@ -34,15 +41,19 @@ int bottomAdj(void) {return mBottomAdj;} int frenchSpecial(void) {return mFrenchSpecial;} int lineSpacing(void) {return mLineSpacing;} + int dvbSources(void) {return mDvbSources;} int fgColor(void) {return mFgColor;} int bgColor(void) {return mBgColor;} + int customColor(void) {return mCustomColor;} char (*languages(void))[MAXLANGUAGES][2][4] {return &mLanguages;} int (*hearingImpaireds(void))[MAXLANGUAGES][2] {return &mHearingImpaireds;} int langChoise(const char *lang, const int HI); + int i18nLanguage(void) {return mI18nLanguage;} protected: int mDoDisplay; + int mRealDoDisplay; int mDoRecord; int mMainMenuEntry; int mTextPos; @@ -50,10 +61,14 @@ int mBottomAdj; int mFrenchSpecial; int mLineSpacing; + int mDvbSources; int mFgColor; int mBgColor; + int mCustomColor; char mLanguages[MAXLANGUAGES][2][4]; int mHearingImpaireds[MAXLANGUAGES][2]; + int mI18nLanguage; }; extern cTtxtsubsConf globals; + diff -Nru ttxtsubs-0.0.5/ttxtsubsi18n.c ttxtsubs-0.0.5-premium-edition/ttxtsubsi18n.c --- ttxtsubs-0.0.5/ttxtsubsi18n.c 2004-05-31 22:12:22.000000000 +0300 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubsi18n.c 2005-03-14 12:47:33.178000000 +0200 @@ -21,15 +21,16 @@ "", // Norwegian "Tekstitys (Teksti-TV)", // Finnish - Rolf Ahrenberg 2004-03-01 "", // Polish - "", // Spanish + "Subtítulos teletexto", // Spanish "", // Greek "Textning (Text-TV)", // Swedish "", // Romanian "", // Hungarian - "", // Catalanian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Subtítols teletext", // Catalanian + "ÂÕÛÕâÕÚáâ-áãÑâØâàë", // Russian - Vyacheslav Dikonov 2004-xx-xx + "", // Croatian + "", // Eesti + "", // Dansk }, { "Hide teletext subtitles", // English "Verstecke Videotextuntertitel", // German @@ -41,15 +42,16 @@ "", // Norwegian "Piilota tekstitys (Teksti-TV)", // Finnish "", // Polish - "", // Spanish + "Esconde subtítulos teletexto", // Spanish "", // Greek "Göm textning (Text-TV)", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Amaga subtítols teletext", // Catalenian + "ÁÚàëâì áãÑâØâàë", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Display teletext subtitles", // English "Zeige Videotextuntertitel", // German @@ -61,15 +63,16 @@ "", // Norwegian "Näytä tekstitys (Teksti-TV)", // Finnish "", // Polish - "", // Spanish + "Visualiza subtítulos teletexto", // Spanish "", // Greek "Visa textning (Text-TV)", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Visualitza subtítols teletext", // Catalenian + "¿ÞÚÐ×ëÒÐâì áãÑâØâàë", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Position Teletext Subtitles for 4:3/Anamorph", // English "Positioniere Videotext-Untertitel für 4:3/Anamorph", // German @@ -81,15 +84,16 @@ "", // Norwegian "4:3/Anamorfinen tekstitys (Teksti-TV)", // Finnish "", // Polish - "", // Spanish + "Posiciona subtítulos teletexto para 4:3/anamórfico", // Spanish "", // Greek "Textning för 4:3/anamorf (Text-TV)", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Posiciona subtítols teletext per a 4:3/anamòrfic", // Catalenian + "ÁãÑâØâàë Ò ÚÐÔàÕ 4:3", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Position Teletext Subtitles for Letterbox", // English "Positioniere Videotext-Untertitel für Letterbox", // German @@ -101,15 +105,16 @@ "", // Norwegian "Letterbox tekstitys (Teksti-TV)", // Finnish "", // Polish - "", // Spanish + "Posicióna subtítulos teletexto para Letterbox", // Spanish "", // Greek "Textning för brevlådeformat (Text-TV)", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Posiciona subtítols teletext per a Letterbox", // Catalenian + "ÁãÑâØâàë Ò ÚÐÔàÕ èØàÞÚÞíÚàÐÝÝÞÓÞ äØÛìÜÐ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Display Subtitles", // English "Zeige Untertitel", // German @@ -121,15 +126,16 @@ "", // Norwegian "Näytä tekstitykset", // Finnish "", // Polish - "", // Spanish + "Visualiza subtítulos", // Spanish "", // Greek "Visa textning", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Visualitza subtítols", // Catalenian + "¿ÞÚÐ×ëÒÐâì áãÑâØâàë", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Record Subtitles", // English "Nimm Untertitel auf", // German @@ -141,15 +147,16 @@ "", // Norwegian "Tallenna tekstitykset", // Finnish "", // Polish - "", // Spanish + "Graba subtítulos", // Spanish "", // Greek "Spela in textning", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Grava subtítols", // Catalenian + "·ÐßØáëÒÐâì áãÑâØâàë", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Main Menu Alternative", // English "Hauptmenu Alternative", // German @@ -161,15 +168,16 @@ "", // Norwegian "Päävalikon toiminnot", // Finnish "", // Polish - "", // Spanish + "Alternativa del menú principal", // Spanish "", // Greek "Huvudmenyalternativ", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Alternativa del menú principal", // Catalenian + "ºÞÜÐÝÔÐ Ò ÓÛÐÒÝÞÜ ÜÕÝî", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Display on/off", // English "Anzeige ein/aus", // German @@ -181,15 +189,16 @@ "", // Norwegian "aktivointi", // Finnish "", // Polish - "", // Spanish + "Visualiza sí/no", // Spanish "", // Greek "Visa textning på/av", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Visualitza si/no", // Catalenian + "ÒÚÛîçØâì/ÒëÚÛîçØâì", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "4:3/Letterbox", // English "4:3/Letterbox", @@ -201,15 +210,16 @@ "", // Norwegian "kuvasuhde", // Finnish "", // Polish - "", // Spanish + "4:3/Letterbox", // Spanish "", // Greek "4:3/brevlådeformat", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "4:3/Letterbox", // Catalenian + "4:3/èØàÞÚØÙ íÚàÐÝ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Text Horizontal Position", // English "Horizontale Textposition", // German @@ -221,15 +231,16 @@ "", // Norwegian "Vaakatasaus", // Finnish "", // Polish - "", // Spanish + "´Posición horizontal del texto", // Spanish "", // Greek "Horisontell position", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Posició horitzontal del text ", // Catalenian + "ÀÐ×ÜÕéÕÝØÕ âÕÚáâÐ ßÞ ÓÞàØ×ÞÝâÐÛØ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Left", // English "Links", // German @@ -241,15 +252,16 @@ "", // Norwegian "vasen", // Finnish "", // Polish - "", // Spanish + "Izquierda", // Spanish "", // Greek "vänster", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Esquerra", // Catalenian + "áÛÕÒÐ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Center", // English "Mitte", // German @@ -261,15 +273,16 @@ "", // Norwegian "keskitä", // Finnish "", // Polish - "", // Spanish + "Centro", // Spanish "", // Greek "centrerad", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Centre", // Catalenian + "Ò æÕÝâàÕ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Right", // English "Rechts", // German @@ -281,15 +294,16 @@ "", // Norwegian "oikea", // Finnish "", // Polish - "", // Spanish + "Derecha", // Spanish "", // Greek "höger", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Dreta", // Catalenian + "áßàÐÒÐ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Text Vertical Position", // English "Vertikale Textposition", // German @@ -301,15 +315,16 @@ "", // Norwegian "Pystytasaus", // Finnish "", // Polish - "", // Spanish + "Posición vertical del texto", // Spanish "", // Greek "Vertikal positon", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Posición vertical del text", // Catalenian + "ÀÐ×ÜÕéÕÝØÕ âÕÚáâÐ ßÞ ÒÕàâØÚÐÛØ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "4:3/Anamorph", // English "4:3/Anamorph", // German @@ -321,15 +336,16 @@ "", // Norwegian "4:3/anamorfinen", // Finnish "", // Polish - "", // Spanish + "4:3/Anamórfico", // Spanish "", // Greek "4:3/anamorf", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "4:3/Anamòrfic", // Catalenian + "4:3", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Letterbox", // English "Letterbox", // German @@ -341,15 +357,16 @@ "", // Norwegian "letterbox", // Finnish "", // Polish - "", // Spanish + "Letterbox", // Spanish "", // Greek "brevlådeformat", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Letterbox", // Catalenian + "èØàÞÚØÙ íÚàÐÝ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Text Vertical Adjust", // English "Text vertikal verschieben", // German @@ -361,15 +378,16 @@ "", // Norwegian "Pystytasauksen hienosäätö", // Finnish "", // Polish - "", // Spanish + "Ajuste vertical del texto", // Spanish "", // Greek "Vertikal justering", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Ajustament vertical del text", // Catalenian + "²ÕàâØÚÐÛìÝëÙ áÔÒØÓ âÕÚáâÐ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Line Spacing Adjust", // English "Zeilenabstand einstellen", // German @@ -381,15 +399,16 @@ "", // Norwegian "Rivivälin hienosäätö", // Finnish "", // Polish - "", // Spanish + "Ajuste distancia entre líneas", // Spanish "", // Greek "Radavstånd", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Ajustament distancia entre línies", // Catalenian + "ÀÐááâÞïÝØÕ ÜÕÖÔã áâàÞÚÐÜØ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Workaround for some French chns", // English "Workaround für französische Kanäle", // German @@ -401,15 +420,16 @@ "", // Norwegian "Ranskalainen silmänkääntötemppu", // Finnish "", // Polish - "", // Spanish + "Corrección para canales franceses", // Spanish "", // Greek "Fix för vissa franska kanaler", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Correcció per a canals francesos", // Catalenian + "ÁßÕæ. ÝÐáâàÞÙÚØ ÔÛï äàÐÝæ. ÚÐÝÐÛÞÒ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Language", // English "Sprache", // German @@ -421,15 +441,16 @@ "", // Norwegian "Tekstityskieli", // Finnish "", // Polish - "", // Spanish + "Idioma", // Spanish "", // Greek "Språk", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Idioma", // Catalenian + "Ï×ëÚ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Hearing Impaired", // English "Gehörlose", // German @@ -441,15 +462,16 @@ "", // Norwegian "kuulorajoitteisille", // Finnish "", // Polish - "", // Spanish + "No oyente", // Spanish "", // Greek "Nedsatt hörsel", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Discapacitats auditius", // Catalenian + "ÔÛï áÛÐÑÞáÛëèÐéØå", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Text Color", // English "Textfarbe", // German @@ -461,15 +483,16 @@ "", // Norwegian "Kirjasimen väri", // Finnish "", // Polish - "", // Spanish + "Color del texto", // Spanish "", // Greek "Färg på text", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Color del text", // Catalenian + "ÆÒÕâ âÕÚáâÐ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Background Color", // English "Hintergrundfarbe", // German @@ -481,15 +504,16 @@ "", // Norwegian "Taustaväri", // Finnish "", // Polish - "", // Spanish + "Color de fondo", // Spanish "", // Greek "Färg på bakgrund", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Color de fons", // Catalenian + "ÆÒÕâ äÞÝÐ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Black", // English "Schwarz", // German @@ -501,15 +525,16 @@ "", // Norwegian "musta", // Finnish "", // Polish - "", // Spanish + "Negro", // Spanish "", // Greek "svart", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Negre", // Catalenian + "çñàÝëÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "White", // English "Weiss", // German @@ -521,15 +546,16 @@ "", // Norwegian "valkoinen", // Finnish "", // Polish - "", // Spanish + "Blanco", // Spanish "", // Greek "vit", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Blanc", // Catalenian + "ÑÕÛëÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Red", // English "Rot", // German @@ -541,15 +567,16 @@ "", // Norwegian "punainen", // Finnish "", // Polish - "", // Spanish + "Rojo", // Spanish "", // Greek "röd", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Vermell", // Catalenian + "ÚàÐáÝëÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Green", // English "Grün", // German @@ -561,15 +588,16 @@ "", // Norwegian "vihreä", // Finnish "", // Polish - "", // Spanish + "Verde", // Spanish "", // Greek "grön", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Verd", // Catalenian + "×ÕÛñÝëÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Yellow", // English "Gelb", // German @@ -581,15 +609,16 @@ "", // Norwegian "keltainen", // Finnish "", // Polish - "", // Spanish + "Amarillo", // Spanish "", // Greek "gul", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Groc", // Catalenian + "ÖñÛâëÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Magenta", // English "Magenta", // German @@ -601,15 +630,16 @@ "", // Norwegian "magenta", // Finnish "", // Polish - "", // Spanish + "Magenta", // Spanish "", // Greek "magenta", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Magenta", // Catalenian + "ßãàßãàÝëÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Blue", // English "Blau", // German @@ -621,15 +651,16 @@ "", // Norwegian "sininen", // Finnish "", // Polish - "", // Spanish + "Azul", // Spanish "", // Greek "blå", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Blau", // Catalenian + "áØÝØÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Cyan", // English "Türkis", // German @@ -641,15 +672,16 @@ "", // Norwegian "syaani", // Finnish "", // Polish - "", // Spanish + "Cian", // Spanish "", // Greek "cyan", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Cian", // Catalenian + "ÓÞÛãÑÞÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Grey", // English "Grau", // German @@ -661,15 +693,16 @@ "", // Norwegian "harmaa", // Finnish "", // Polish - "", // Spanish + "Gris", // Spanish "", // Greek "grå", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Gris", // Catalenian + "áÕàëÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Transparent", // English "Transparent", // German @@ -681,15 +714,16 @@ "", // Norwegian "läpinäkyvä", // Finnish "", // Polish - "", // Spanish + "Transparente", // Spanish "", // Greek "transparent", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 - "", // Russian -#endif + "Transparent", // Catalenian + "ßàÞ×àÐçÝëÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk }, { "Background", // English "Hintergrund", // German @@ -701,15 +735,415 @@ "", // Norwegian "tausta", // Finnish "", // Polish - "", // Spanish + "Fondo", // Spanish "", // Greek "bakgrund", // Swedish "", // Romanian "", // Hungarian - "", // Catalenian -#if VDRVERSNUM >= 10300 + "Fons", // Catalenian + "æÒÕâ äÞÝÐ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Custom Color", // English + "", // German + "", // Slovenian + "Colore personalizzato", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Muokattava väri", // Finnish + "", // Polish + "Color personalizado", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Color personalitzat", // Catalenian + "½ÐáâàÐØÒÐÕÜëÙ æÒÕâ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Custom", // English + "", // German + "", // Slovenian + "Personalizzato", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "muokattava", // Finnish + "", // Polish + "Personalizado", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Personalitzat", // Catalenian + "ÝÐáâàÐØÒÐÕÜëÙ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Red Value", // English + "", // German + "", // Slovenian + "Valore rosso", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Punainen", // Finnish + "", // Polish + "Valor rojo", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Valor vermell", // Catalenian + "ÃàÞÒÕÝì ÚàÐáÝÞÓÞ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Green Value", // English + "", // German + "", // Slovenian + "Valore verde", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Vihreä", // Finnish + "", // Polish + "Valor verde", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Valor vert", // Catalenian + "ÃàÞÒÕÝì ×ÕÛñÝÞÓÞ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Blue Value", // English + "", // German + "", // Slovenian + "Valore azzurro", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Sininen", // Finnish + "", // Polish + "Valor azul", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Valor blau", // Catalenian + "ÃàÞÒÕÝì áØÝÕÓÞ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Transparency Value", // English + "", // German + "", // Slovenian + "Valore trasparenza", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Läpinäkyvyys", // Finnish + "", // Polish + "Valor transparencia", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Valor transparència", // Catalenian + "ÁâÕßÕÝì ßàÞ×àÐçÝÞáâØ", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "DVB Source Selection", // English + "", // German + "", // Slovenian + "Selezione sorgente DVB", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Tekstityslähteen valinta", // Finnish + "", // Polish + "Selección fuente DVB", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Selecció font DVB", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "All", // English + "", // German + "", // Slovenian + "Tutte", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "kaikki", // Finnish + "", // Polish + "Todas", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Totes", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Only DVB-S", // English + "", // German + "", // Slovenian + "Solo DVB-S", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "vain DVB-S", // Finnish + "", // Polish + "Sólo DVB-S", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Només DVB-S", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Only DVB-T", // English + "", // German + "", // Slovenian + "Solo DVB-T", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "vain DVB-T", // Finnish + "", // Polish + "Sólo DVB-T", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Només DVB-T", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Only DVB-C", // English + "", // German + "", // Slovenian + "Solo DVB-C", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "vain DVB-C", // Finnish + "", // Polish + "Sólo DVB-C", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Només DVB-C", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Page Mode", // English + "", // German + "", // Slovenian + "Modo pagina", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "sivun valinta", // Finnish + "", // Polish + "Modo página", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Modalitat pàgina", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Page Selection", // English + "", // German + "", // Slovenian + "Selezione pagina", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Tekstityssivun valinta", // Finnish + "", // Polish + "Selección página subtítulos", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Selecció pàgina subtítols", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Subtitle Mode", // English + "", // German + "", // Slovenian + "Modo sottotitoli", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Tekstitystapa", // Finnish + "", // Polish + "Modo subtítulos", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Modalitat subtítols", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Manual Subtitle Page", // English + "", // German + "", // Slovenian + "Pagina manuale sottotitoli", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Asetettu tekstityssivu", // Finnish + "", // Polish + "Página manual subtítulos", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Pàgina manual subtítols", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Subtitle Page Settings", // English + "", // German + "", // Slovenian + "Settaggi pagina sottotitoli", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "Tekstityssivun asetukset", // Finnish + "", // Polish + "Opciones página subtítulos", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Opcions pàgina subtítols", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Auto", // English + "", // German + "", // Slovenian + "Automatico", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "automaattinen", // Finnish + "", // Polish + "Automático", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Automàtic", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Manual", // English + "", // German + "", // Slovenian + "Manuale", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "manuaalinen", // Finnish + "", // Polish + "Manual", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Manual", // Catalenian + "", // Russian + "", // Croatian + "", // Eesti + "", // Dansk + }, + { "Disabled", // English + "", // German + "", // Slovenian + "Disattivati", // Italian + "", // Dutch + "", // Portuguese + "", // French + "", // Norwegian + "pois", // Finnish + "", // Polish + "Desactivados", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hungarian + "Desactivats", // Catalenian "", // Russian -#endif + "", // Croatian + "", // Eesti + "", // Dansk }, { NULL } }; diff -Nru ttxtsubs-0.0.5/ttxtsubspagemenu.c ttxtsubs-0.0.5-premium-edition/ttxtsubspagemenu.c --- ttxtsubs-0.0.5/ttxtsubspagemenu.c 1970-01-01 02:00:00.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubspagemenu.c 2005-03-14 12:47:33.209250000 +0200 @@ -0,0 +1,62 @@ +#include "ttxtsubschannelsettings.h" + +#include +#include + +#include "ttxtsubspagemenu.h" +#include "ttxtsubsi18n.h" +#include "ttxtsubsglobals.h" + +const char * MODE_CHOICES[4] = {NULL, NULL, NULL, NULL}; + +cTtxtsubsPageMenu::~cTtxtsubsPageMenu() +{ +} + +cTtxtsubsPageMenu::cTtxtsubsPageMenu() + :cOsdMenu(tr("Subtitle Page Settings"), 30) +{ + cDevice *device = cDevice::ActualDevice(); + channel = Channels.GetByNumber(device->CurrentChannel()); + setting = TtxtSubsChannelSettings.Get(channel); + if (setting) { + origPageMode = mPageMode = setting->PageMode(); + origPageNumber = mPageNumber = setting->PageNumber(); + } else { + origPageMode = mPageMode = 0; + origPageNumber = mPageNumber = 0; + } + DoDisplay=globals.mRealDoDisplay; + + MODE_CHOICES[0] = tr("Auto"); + MODE_CHOICES[1] = tr("Manual"); + MODE_CHOICES[2] = tr("Disabled"); + MODE_CHOICES[3] = NULL; + + Add(new cMenuEditBoolItem(tr("Display Subtitles"), &DoDisplay, tr("no"), tr("yes"))); + Add(new cMenuEditStraItem(tr("Subtitle Mode"), &mPageMode, 3, MODE_CHOICES )); + Add(new cMenuEditIntItem(tr("Manual Subtitle Page"), &mPageNumber, 100, 899)); + + Display(); +}; + +eOSState cTtxtsubsPageMenu::ProcessKey(eKeys Key) +{ + eOSState state = cOsdMenu::ProcessKey(Key); + + if (state == osUnknown) + { + if (Key == kOk) + { + if(origPageMode!=mPageMode || origPageNumber!=mPageNumber) { + if (setting) setting->Set(mPageMode, mPageNumber); + else TtxtSubsChannelSettings.Add(new cTtxtSubsChannelSetting(channel, mPageMode, mPageNumber)); + TtxtSubsChannelSettings.Save(); + } + globals.mRealDoDisplay=DoDisplay; + state = osEnd; + } + } + + return state; +} diff -Nru ttxtsubs-0.0.5/ttxtsubspagemenu.h ttxtsubs-0.0.5-premium-edition/ttxtsubspagemenu.h --- ttxtsubs-0.0.5/ttxtsubspagemenu.h 1970-01-01 02:00:00.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubspagemenu.h 2005-03-14 12:47:33.224875000 +0200 @@ -0,0 +1,26 @@ +#ifndef ___TTXTSUBSPAGEMENU_H +#define ___TTXTSUBSPAGEMENU_H + +#include +#include +#include +#include "ttxtsubs.h" +#include "ttxtsubschannelsettings.h" + +class cTtxtsubsPageMenu : public cOsdMenu +{ + private: + cChannel *channel; + cTtxtSubsChannelSetting *setting; + int mPageNumber; + int mPageMode; + int origPageNumber; + int origPageMode; + int DoDisplay; + public: + cTtxtsubsPageMenu(); + virtual ~cTtxtsubsPageMenu(); + virtual eOSState ProcessKey(eKeys Key); +}; + +#endif //___TTXTSUBSPAGEMENU_H diff -Nru ttxtsubs-0.0.5/ttxtsubsreceiver.c ttxtsubs-0.0.5-premium-edition/ttxtsubsreceiver.c --- ttxtsubs-0.0.5/ttxtsubsreceiver.c 2004-03-02 00:53:17.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubsreceiver.c 2005-03-14 12:47:30.740500000 +0200 @@ -19,7 +19,7 @@ cTtxtSubsReceiver::cTtxtSubsReceiver(int Ca, struct ttxtpidinfo *PI) : - cReceiver(Ca, -1, 1, PI->pid), + cReceiver(Ca, -1, PI->pid), mGetMutex(), mGetCond(), mRingBuf(sizeof(ringBufItem) * 500, true), diff -Nru ttxtsubs-0.0.5/ttxtsubsrecorder.c ttxtsubs-0.0.5-premium-edition/ttxtsubsrecorder.c --- ttxtsubs-0.0.5/ttxtsubsrecorder.c 2004-03-02 00:53:17.000000000 +0200 +++ ttxtsubs-0.0.5-premium-edition/ttxtsubsrecorder.c 2005-03-14 12:47:33.240500000 +0200 @@ -31,11 +31,12 @@ mTtxtinfo = (struct ttxtinfo *) malloc(sizeof(*mTtxtinfo)); struct ttxtpidinfo *pi = NULL; int pid, page; + char lang[4] = ""; - if(GetTtxtInfo(dev->CardIndex(), ch->Number(), ch->Sid(), ch->Vpid(), mTtxtinfo)) { + if(GetTtxtInfo(dev->CardIndex(), ch, mTtxtinfo)) { fprintf(stderr, "cTtxtSubsRecorder::cTtxtSubsRecorder: GetTtxtSubtitleInfo error!\n"); } else { - pi = FindSubs(mTtxtinfo, &pid, &page); + pi = FindSubs(mTtxtinfo, &pid, &page, lang); if(!pi && mTtxtinfo->pidcount > 0) { pi = &(mTtxtinfo->p[0]);