summaryrefslogtreecommitdiff
path: root/patches/vdr-1.7.12-ttxtsubs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/vdr-1.7.12-ttxtsubs.patch')
-rw-r--r--patches/vdr-1.7.12-ttxtsubs.patch314
1 files changed, 164 insertions, 150 deletions
diff --git a/patches/vdr-1.7.12-ttxtsubs.patch b/patches/vdr-1.7.12-ttxtsubs.patch
index 113e14a..3333382 100644
--- a/patches/vdr-1.7.12-ttxtsubs.patch
+++ b/patches/vdr-1.7.12-ttxtsubs.patch
@@ -26,18 +26,18 @@ index 01408cb..b280030 100644
DEFINES += -DREMOTE_KBD
endif
diff --git a/channels.c b/channels.c
-index c14df19..aaaea30 100644
+index c14df19..0e23389 100644
--- a/channels.c
+++ b/channels.c
@@ -551,6 +551,13 @@ void cChannel::SetSubtitlingDescriptors(uchar *SubtitlingTypes, uint16_t *Compos
}
}
-+void cChannel::SetTeletextSubtitlePages(tTeletextSubtitlePage pages[])
++void cChannel::SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages)
+{
-+ for (int i = fixedTeletextSubtitlePages; i < MAXTXTPAGES; i++)
-+ teletextSubtitlePages[i] = pages[i];
-+ teletextSubtitlePages[MAXTXTPAGES].ttxtType = 0;
++ totalTtxtSubtitlePages = fixedTtxtSubtitlePages;
++ for (int i = 0; (i < numberOfPages) && (totalTtxtSubtitlePages < MAXTXTPAGES); i++)
++ teletextSubtitlePages[totalTtxtSubtitlePages++] = pages[i];
+}
+
void cChannel::SetCaIds(const int *CaIds)
@@ -51,9 +51,9 @@ index c14df19..aaaea30 100644
+ char tpidbuf[TBufferSize];
+ q = tpidbuf;
+ q += snprintf(q, sizeof(tpidbuf), "%d", Channel->tpid);
-+ if (Channel->fixedTeletextSubtitlePages > 0) {
++ if (Channel->fixedTtxtSubtitlePages > 0) {
+ q += snprintf(q, sizeof(tpidbuf) - (q - tpidbuf), ";");
-+ for (int i = 0; i < Channel->fixedTeletextSubtitlePages; ++i) {
++ for (int i = 0; i < Channel->fixedTtxtSubtitlePages; ++i) {
+ tTeletextSubtitlePage page = Channel->teletextSubtitlePages[i];
+ q += snprintf(q, sizeof(tpidbuf) - (q - tpidbuf), "%d=%s", page.PageNumber(), page.ttxtLanguage);
+ }
@@ -78,27 +78,28 @@ index c14df19..aaaea30 100644
if (fields >= 9) {
if (fields == 9) {
// allow reading of old format
-@@ -879,7 +898,35 @@ bool cChannel::Parse(const char *s)
+@@ -879,7 +898,36 @@ bool cChannel::Parse(const char *s)
}
dpids[NumDpids] = 0;
}
-
+ if (tpidbuf) {
+ char *p;
-+ fixedTeletextSubtitlePages = 0;
++ fixedTtxtSubtitlePages = 0;
+ // 2001;150=deu,151=fin
+ if ((p = strchr(tpidbuf, ';')) != NULL) {
+ char *q, *strtok_next;
+ *p++ = 0;
+ while ((q = strtok_r(p, ",", &strtok_next)) != NULL) {
-+ if (fixedTeletextSubtitlePages < MAXTXTPAGES) {
++ if (fixedTtxtSubtitlePages < MAXTXTPAGES) {
+ int page;
+ char *l = strchr(q, '=');
+ if (l)
+ *l++ = 0;
+ if (sscanf(q, "%d", &page) == 1) {
-+ teletextSubtitlePages[fixedTeletextSubtitlePages++] = tTeletextSubtitlePage(page);
-+ strn0cpy(teletextSubtitlePages[fixedTeletextSubtitlePages].ttxtLanguage, l ? l : "und", MAXLANGCODE1);
++ teletextSubtitlePages[fixedTtxtSubtitlePages++] = tTeletextSubtitlePage(page);
++ if (l)
++ strn0cpy(teletextSubtitlePages[fixedTtxtSubtitlePages].ttxtLanguage, l, MAXLANGCODE1);
+ }
+ else
+ esyslog("ERROR: invalid Teletext page!"); // no need to set ok to 'false'
@@ -107,7 +108,7 @@ index c14df19..aaaea30 100644
+ esyslog("ERROR: too many Teletext pages!"); // no need to set ok to 'false'
+ p = NULL;
+ }
-+ teletextSubtitlePages[fixedTeletextSubtitlePages].ttxtType = 0; // end of list
++ totalTtxtSubtitlePages = fixedTtxtSubtitlePages;
+ }
+ if (sscanf(tpidbuf, "%d", &tpid) != 1)
+ return false;
@@ -115,7 +116,7 @@ index c14df19..aaaea30 100644
if (caidbuf) {
char *p = caidbuf;
char *q;
-@@ -916,6 +963,7 @@ bool cChannel::Parse(const char *s)
+@@ -916,6 +964,7 @@ bool cChannel::Parse(const char *s)
free(sourcebuf);
free(vpidbuf);
free(apidbuf);
@@ -124,7 +125,7 @@ index c14df19..aaaea30 100644
free(namebuf);
if (!GetChannelID().Valid()) {
diff --git a/channels.h b/channels.h
-index b465f6a..1ddef40 100644
+index b465f6a..c61f770 100644
--- a/channels.h
+++ b/channels.h
@@ -35,6 +35,7 @@
@@ -140,8 +141,8 @@ index b465f6a..1ddef40 100644
};
+struct tTeletextSubtitlePage {
-+ tTeletextSubtitlePage(void) { ttxtPage = ttxtMagazine = ttxtType = ttxtLanguage[0] = 0; }
-+ tTeletextSubtitlePage(int page) { ttxtMagazine = (page / 100) & 0x7; ttxtPage = (((page % 100) / 10) << 4) + (page % 10); ttxtType = 0x02; }
++ tTeletextSubtitlePage(void) { ttxtPage = ttxtMagazine = 0; ttxtType = 0x02; strcpy(ttxtLanguage, "und"); }
++ tTeletextSubtitlePage(int page) { ttxtMagazine = (page / 100) & 0x7; ttxtPage = (((page % 100) / 10) << 4) + (page % 10); ttxtType = 0x02; strcpy(ttxtLanguage, "und"); }
+ char ttxtLanguage[MAXLANGCODE1];
+ uchar ttxtPage;
+ uchar ttxtMagazine;
@@ -152,54 +153,65 @@ index b465f6a..1ddef40 100644
class cChannel;
class cLinkChannel : public cListObject {
-@@ -133,6 +144,8 @@ private:
+@@ -133,6 +144,9 @@ private:
uint16_t compositionPageIds[MAXSPIDS];
uint16_t ancillaryPageIds[MAXSPIDS];
int tpid;
-+ int fixedTeletextSubtitlePages;
-+ tTeletextSubtitlePage teletextSubtitlePages[MAXTXTPAGES + 1]; // list is termintated by ttxtType=0
++ int fixedTtxtSubtitlePages;
++ int totalTtxtSubtitlePages;
++ tTeletextSubtitlePage teletextSubtitlePages[MAXTXTPAGES];
int caids[MAXCAIDS + 1]; // list is zero-terminated
int nid;
int tid;
-@@ -192,6 +205,7 @@ public:
+@@ -192,6 +206,8 @@ public:
uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : uint16_t(0); }
uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); }
int Tpid(void) const { return tpid; }
-+ const tTeletextSubtitlePage TeletextSubtitlePage(int i) const { return (0 <= i && i < MAXTXTPAGES) ? teletextSubtitlePages[i] : tTeletextSubtitlePage(); };
++ const tTeletextSubtitlePage *TeletextSubtitlePages() const { return teletextSubtitlePages; };
++ int TotalTeletextSubtitlePages() const { return totalTtxtSubtitlePages; };
const int *Caids(void) const { return caids; }
int Ca(int Index = 0) const { return Index < MAXCAIDS ? caids[Index] : 0; }
int Nid(void) const { return nid; }
-@@ -228,6 +242,7 @@ public:
+@@ -228,6 +244,7 @@ public:
void SetName(const char *Name, const char *ShortName, const char *Provider);
void SetPortalName(const char *PortalName);
void SetPids(int Vpid, int Ppid, int Vtype, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid);
-+ void SetTeletextSubtitlePages(tTeletextSubtitlePage pages[]);
++ void SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages);
void SetCaIds(const int *CaIds); // list must be zero-terminated
void SetCaDescriptors(int Level);
void SetLinkChannels(cLinkChannels *LinkChannels);
diff --git a/ci.c b/ci.c
-index 6c7b031..f158a18 100644
+index 6c7b031..22fda9f 100644
--- a/ci.c
+++ b/ci.c
-@@ -1932,6 +1932,9 @@ bool cCamSlot::CanDecrypt(const cChannel *Channel)
+@@ -1911,6 +1911,8 @@ void cCamSlot::AddChannel(const cChannel *Channel)
+ AddPid(Channel->Sid(), *Apid, STREAM_TYPE_AUDIO);
+ for (const int *Dpid = Channel->Dpids(); *Dpid; Dpid++)
+ AddPid(Channel->Sid(), *Dpid, STREAM_TYPE_DOLBY);
++ if (Channel->Tpid() && Setup.SupportTeletext)
++ AddPid(Channel->Sid(), Channel->Tpid(), STREAM_TYPE_DOLBY);
+ }
+ }
+
+@@ -1932,6 +1934,9 @@ bool cCamSlot::CanDecrypt(const cChannel *Channel)
CaPmt.AddPid(*Apid, STREAM_TYPE_AUDIO);
for (const int *Dpid = Channel->Dpids(); *Dpid; Dpid++)
CaPmt.AddPid(*Dpid, STREAM_TYPE_DOLBY);
-+ if (Channel->Tpid() && Setup.RecordTtxtSubtitles) {
++ if (Channel->Tpid() && Setup.SupportTeletext) {
+ CaPmt.AddPid(Channel->Tpid(), STREAM_TYPE_DOLBY); // FIXME: STREAM_TYPE_DOLBY should probably be renamed STREAM_TYPE_PRIVATE
+ }
cas->SendPMT(&CaPmt);
cTimeMs Timeout(QUERY_REPLY_TIMEOUT);
do {
diff --git a/config.c b/config.c
-index acdf4c4..4aaf720 100644
+index acdf4c4..29377d9 100644
--- a/config.c
+++ b/config.c
@@ -333,6 +333,7 @@ cSetup::cSetup(void)
MarginStop = 10;
AudioLanguages[0] = -1;
DisplaySubtitles = 0;
-+ RecordTtxtSubtitles = 0;
++ SupportTeletext = 0;
SubtitleLanguages[0] = -1;
SubtitleOffset = 0;
SubtitleFgTransparency = 0;
@@ -207,7 +219,7 @@ index acdf4c4..4aaf720 100644
else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value);
else if (!strcasecmp(Name, "AudioLanguages")) return ParseLanguages(Value, AudioLanguages);
else if (!strcasecmp(Name, "DisplaySubtitles")) DisplaySubtitles = atoi(Value);
-+ else if (!strcasecmp(Name, "RecordTtxtSubtitles")) RecordTtxtSubtitles = atoi(Value);
++ else if (!strcasecmp(Name, "SupportTeletext")) SupportTeletext = atoi(Value);
else if (!strcasecmp(Name, "SubtitleLanguages")) return ParseLanguages(Value, SubtitleLanguages);
else if (!strcasecmp(Name, "SubtitleOffset")) SubtitleOffset = atoi(Value);
else if (!strcasecmp(Name, "SubtitleFgTransparency")) SubtitleFgTransparency = atoi(Value);
@@ -215,19 +227,19 @@ index acdf4c4..4aaf720 100644
Store("MarginStop", MarginStop);
StoreLanguages("AudioLanguages", AudioLanguages);
Store("DisplaySubtitles", DisplaySubtitles);
-+ Store("RecordTtxtSubtitles", RecordTtxtSubtitles);
++ Store("SupportTeletext", SupportTeletext);
StoreLanguages("SubtitleLanguages", SubtitleLanguages);
Store("SubtitleOffset", SubtitleOffset);
Store("SubtitleFgTransparency", SubtitleFgTransparency);
diff --git a/config.h b/config.h
-index be1d7bd..5dcbe20 100644
+index be1d7bd..e7b094d 100644
--- a/config.h
+++ b/config.h
@@ -235,6 +235,7 @@ public:
int MarginStart, MarginStop;
int AudioLanguages[I18N_MAX_LANGUAGES + 1];
int DisplaySubtitles;
-+ int RecordTtxtSubtitles;
++ int SupportTeletext;
int SubtitleLanguages[I18N_MAX_LANGUAGES + 1];
int SubtitleOffset;
int SubtitleFgTransparency, SubtitleBgTransparency;
@@ -296,19 +308,19 @@ index 897de2a..2e36351 100644
protected:
const cPatPmtParser *PatPmtParser(void) const { return &patPmtParser; }
diff --git a/menu.c b/menu.c
-index 7ddf0cf..1f49f3d 100644
+index 7ddf0cf..35fa9c3 100644
--- a/menu.c
+++ b/menu.c
@@ -2790,6 +2790,7 @@ void cMenuSetupDVB::Setup(void)
Add(new cMenuEditIntItem( tr("Setup.DVB$Subtitle foreground transparency"), &data.SubtitleFgTransparency, 0, 9));
Add(new cMenuEditIntItem( tr("Setup.DVB$Subtitle background transparency"), &data.SubtitleBgTransparency, 0, 10));
}
-+ Add(new cMenuEditBoolItem(tr("Setup.DVB$Record Teletext Subtitles"), &data.RecordTtxtSubtitles));
++ Add(new cMenuEditBoolItem(tr("Setup.DVB$Enable teletext support"), &data.SupportTeletext));
SetCurrent(Get(current));
Display();
diff --git a/pat.c b/pat.c
-index 9b3ded6..444be21 100644
+index 9b3ded6..c6e7834 100644
--- a/pat.c
+++ b/pat.c
@@ -13,6 +13,7 @@
@@ -351,24 +363,21 @@ index 9b3ded6..444be21 100644
break;
case SI::ISO639LanguageDescriptorTag: {
SI::ISO639LanguageDescriptor *ld = (SI::ISO639LanguageDescriptor *)d;
-@@ -458,6 +474,15 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
+@@ -458,6 +474,12 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
if (Setup.UpdateChannels >= 2) {
Channel->SetPids(Vpid, Ppid, Vtype, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
+ if (NumTPages < MAXTXTPAGES) {
+ int manualPageNumber = cVDRTtxtsubsHookListener::Hook()->ManualPageNumber(Channel);
-+ if (manualPageNumber) {
-+ TeletextSubtitlePages[NumTPages] = tTeletextSubtitlePage(manualPageNumber);
-+ strn0cpy(TeletextSubtitlePages[NumTPages].ttxtLanguage, "und", MAXLANGCODE1);
-+ NumTPages++;
-+ }
++ if (manualPageNumber)
++ TeletextSubtitlePages[NumTPages++] = tTeletextSubtitlePage(manualPageNumber);
+ }
-+ Channel->SetTeletextSubtitlePages(TeletextSubtitlePages);
++ Channel->SetTeletextSubtitlePages(TeletextSubtitlePages, NumTPages);
Channel->SetCaIds(CaDescriptors->CaIds());
Channel->SetSubtitlingDescriptors(SubtitlingTypes, CompositionPageIds, AncillaryPageIds);
}
diff --git a/po/ca_ES.po b/po/ca_ES.po
-index fcdf672..1197fe1 100644
+index fcdf672..cc137c0 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -10,7 +10,7 @@ msgid ""
@@ -376,7 +385,7 @@ index fcdf672..1197fe1 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-03-02 19:02+0100\n"
"Last-Translator: Luca Olivetti <luca@ventoso.org>\n"
"Language-Team: Catalanian\n"
@@ -384,14 +393,14 @@ index fcdf672..1197fe1 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Transparncia fons subttols"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "Configuraci de l'LNB"
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
-index 3bbd6eb..c15fc13 100644
+index 3bbd6eb..9802516 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -8,7 +8,7 @@ msgid ""
@@ -399,7 +408,7 @@ index 3bbd6eb..c15fc13 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-02-28 15:00+0200\n"
"Last-Translator: Vladimr Brta <vladimir.barta@k2atmitec.cz>, Ji Dobr <jdobry@centrum.cz>\n"
"Language-Team: Czech\n"
@@ -407,14 +416,14 @@ index 3bbd6eb..c15fc13 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Prhlednost pozad titulk"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/da_DK.po b/po/da_DK.po
-index fbad909..3416080 100644
+index fbad909..740486d 100644
--- a/po/da_DK.po
+++ b/po/da_DK.po
@@ -7,7 +7,7 @@ msgid ""
@@ -422,7 +431,7 @@ index fbad909..3416080 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Mogens Elneff <mogens@elneff.dk>\n"
"Language-Team: Danish\n"
@@ -430,37 +439,39 @@ index fbad909..3416080 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Undertekst baggrundsgennemsigtighed"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/de_DE.po b/po/de_DE.po
-index ad6401b..775fd30 100644
+index ad6401b..8e93111 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
-@@ -7,7 +7,7 @@ msgid ""
+@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
- "PO-Revision-Date: 2010-01-16 16:46+0100\n"
+-"PO-Revision-Date: 2010-01-16 16:46+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
++"PO-Revision-Date: 2010-02-14 17:50+0100\n"
"Last-Translator: Klaus Schmidinger <kls@tvdr.de>\n"
"Language-Team: German\n"
+ "MIME-Version: 1.0\n"
@@ -931,6 +931,9 @@ msgstr "Untertitel-Transparenz Vordergrund"
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Untertitel-Transparenz Hintergrund"
-+msgid "Setup.DVB$Record Teletext Subtitles"
-+msgstr "Teletext-Untertitel aufnehmen"
++msgid "Setup.DVB$Enable teletext support"
++msgstr "Videotext-Untersttzung aktivieren"
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/el_GR.po b/po/el_GR.po
-index e8382b8..741cb4a 100644
+index e8382b8..72d966a 100644
--- a/po/el_GR.po
+++ b/po/el_GR.po
@@ -7,7 +7,7 @@ msgid ""
@@ -468,7 +479,7 @@ index e8382b8..741cb4a 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Dimitrios Dimitrakos <mail@dimitrios.de>\n"
"Language-Team: Greek\n"
@@ -476,14 +487,14 @@ index e8382b8..741cb4a 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr ""
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/es_ES.po b/po/es_ES.po
-index d2bf5b0..0515348 100644
+index d2bf5b0..0eb591e 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -8,7 +8,7 @@ msgid ""
@@ -491,7 +502,7 @@ index d2bf5b0..0515348 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-03-02 19:02+0100\n"
"Last-Translator: Luca Olivetti <luca@ventoso.org>\n"
"Language-Team: Spanish\n"
@@ -499,14 +510,14 @@ index d2bf5b0..0515348 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Transparencia fondo subttulos"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/et_EE.po b/po/et_EE.po
-index 97e2aee..72a95ae 100644
+index 97e2aee..4d8e612 100644
--- a/po/et_EE.po
+++ b/po/et_EE.po
@@ -7,7 +7,7 @@ msgid ""
@@ -514,7 +525,7 @@ index 97e2aee..72a95ae 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Arthur Konovalov <artlov@gmail.com>\n"
"Language-Team: Estonian\n"
@@ -522,14 +533,14 @@ index 97e2aee..72a95ae 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Subtiitri tausta lbipaistvus"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/fi_FI.po b/po/fi_FI.po
-index 916b51e..372a1a2 100644
+index 916b51e..034de64 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -10,7 +10,7 @@ msgid ""
@@ -537,7 +548,7 @@ index 916b51e..372a1a2 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2007-08-15 15:52+0200\n"
"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
"Language-Team: Finnish\n"
@@ -545,14 +556,14 @@ index 916b51e..372a1a2 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Tekstityksen taustan lpinkyvyys"
-+msgid "Setup.DVB$Record Teletext Subtitles"
-+msgstr ""
++msgid "Setup.DVB$Enable teletext support"
++msgstr "Salli teksti-TV-tuki"
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/fr_FR.po b/po/fr_FR.po
-index 4c4dcce..8ebfd3e 100644
+index 4c4dcce..dc35127 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -13,7 +13,7 @@ msgid ""
@@ -560,7 +571,7 @@ index 4c4dcce..8ebfd3e 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-02-27 18:14+0100\n"
"Last-Translator: Jean-Claude Repetto <jc@repetto.org>\n"
"Language-Team: French\n"
@@ -568,14 +579,14 @@ index 4c4dcce..8ebfd3e 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Transparence du fond"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/hr_HR.po b/po/hr_HR.po
-index b7cf5a0..d769dc1 100644
+index b7cf5a0..b04cbb5 100644
--- a/po/hr_HR.po
+++ b/po/hr_HR.po
@@ -9,7 +9,7 @@ msgid ""
@@ -583,7 +594,7 @@ index b7cf5a0..d769dc1 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-03-17 19:00+0100\n"
"Last-Translator: Adrian Caval <anrxc@sysphere.org>\n"
"Language-Team: Croatian\n"
@@ -591,14 +602,14 @@ index b7cf5a0..d769dc1 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Transparentnost pozadine titla"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/hu_HU.po b/po/hu_HU.po
-index d09c8dd..e2b9364 100644
+index d09c8dd..570efbb 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -10,7 +10,7 @@ msgid ""
@@ -606,7 +617,7 @@ index d09c8dd..e2b9364 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2007-12-01 21:42+0200\n"
"Last-Translator: Istvn Fley <ifuley@tigercomp.ro>\n"
"Language-Team: Hungarian\n"
@@ -614,14 +625,14 @@ index d09c8dd..e2b9364 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Felirat htternek transzparencija"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/it_IT.po b/po/it_IT.po
-index 3a8f2e2..41335d8 100644
+index 3a8f2e2..48d9f14 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -11,7 +11,7 @@ msgid ""
@@ -629,7 +640,7 @@ index 3a8f2e2..41335d8 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2010-01-12 23:53+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: Italian\n"
@@ -637,14 +648,14 @@ index 3a8f2e2..41335d8 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Trasparenza sfondo sottotitoli"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/lt_LT.po b/po/lt_LT.po
-index 93583c5..2b55e82 100644
+index 93583c5..a9370f5 100644
--- a/po/lt_LT.po
+++ b/po/lt_LT.po
@@ -7,7 +7,7 @@ msgid ""
@@ -652,7 +663,7 @@ index 93583c5..2b55e82 100644
"Project-Id-Version: VDR 1.7.9\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2009-10-17 14:19+0200\n"
"Last-Translator: Valdemaras Pipiras <varas@ambernet.lt>\n"
"Language-Team: Lithuanian\n"
@@ -660,14 +671,14 @@ index 93583c5..2b55e82 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Subtitrų fono permatomumas"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "Konverteris (LNB)"
diff --git a/po/nl_NL.po b/po/nl_NL.po
-index fdfaf8d..56523f4 100644
+index fdfaf8d..68de220 100644
--- a/po/nl_NL.po
+++ b/po/nl_NL.po
@@ -11,7 +11,7 @@ msgid ""
@@ -675,7 +686,7 @@ index fdfaf8d..56523f4 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-02-26 17:20+0100\n"
"Last-Translator: Johan Schuring <johan.schuring@vetteblei.nl>\n"
"Language-Team: Dutch\n"
@@ -683,14 +694,14 @@ index fdfaf8d..56523f4 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Transparantie achtergrond ondertiteling"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/nn_NO.po b/po/nn_NO.po
-index 1f50117..3e492ad 100644
+index 1f50117..2e08b7e 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -8,7 +8,7 @@ msgid ""
@@ -698,7 +709,7 @@ index 1f50117..3e492ad 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Truls Slevigen <truls@slevigen.no>\n"
"Language-Team: Norwegian\n"
@@ -706,14 +717,14 @@ index 1f50117..3e492ad 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr ""
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/pl_PL.po b/po/pl_PL.po
-index 038d058..e99d90e 100644
+index 038d058..70335d2 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -8,7 +8,7 @@ msgid ""
@@ -721,7 +732,7 @@ index 038d058..e99d90e 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-03-09 12:59+0100\n"
"Last-Translator: Michael Rakowski <mrak@gmx.de>\n"
"Language-Team: Polish\n"
@@ -729,14 +740,14 @@ index 038d058..e99d90e 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Przerocze podtytuw: To"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/pt_PT.po b/po/pt_PT.po
-index e409581..f795bae 100644
+index e409581..c9ea089 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -7,7 +7,7 @@ msgid ""
@@ -744,7 +755,7 @@ index e409581..f795bae 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-03-18 17:04+0100\n"
"Last-Translator: anonymous\n"
"Language-Team: Portuguese\n"
@@ -752,14 +763,14 @@ index e409581..f795bae 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Transparncia de background das legendas"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/ro_RO.po b/po/ro_RO.po
-index f52a7d8..c857472 100644
+index f52a7d8..a4714f6 100644
--- a/po/ro_RO.po
+++ b/po/ro_RO.po
@@ -8,7 +8,7 @@ msgid ""
@@ -767,7 +778,7 @@ index f52a7d8..c857472 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-02-25 00:39+0100\n"
"Last-Translator: Lucian Muresan <lucianm@users.sourceforge.net>\n"
"Language-Team: Romanian\n"
@@ -775,14 +786,14 @@ index f52a7d8..c857472 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Transparena fundalului subtitrrii"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/ru_RU.po b/po/ru_RU.po
-index c6d6aca..e55f00d 100644
+index c6d6aca..8c7907e 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -8,7 +8,7 @@ msgid ""
@@ -790,7 +801,7 @@ index c6d6aca..e55f00d 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-12-15 14:37+0100\n"
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
"Language-Team: Russian\n"
@@ -798,14 +809,14 @@ index c6d6aca..e55f00d 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr " "
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr ""
diff --git a/po/sk_SK.po b/po/sk_SK.po
-index c66132a..44b0833 100644
+index c66132a..8414523 100644
--- a/po/sk_SK.po
+++ b/po/sk_SK.po
@@ -8,7 +8,7 @@ msgid ""
@@ -813,7 +824,7 @@ index c66132a..44b0833 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2009-09-30 12:50+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: Slovak\n"
@@ -821,14 +832,14 @@ index c66132a..44b0833 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Priehadnos pozadia titulkov"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/sl_SI.po b/po/sl_SI.po
-index 2c20440..2bd42ea 100644
+index 2c20440..1682a16 100644
--- a/po/sl_SI.po
+++ b/po/sl_SI.po
@@ -8,7 +8,7 @@ msgid ""
@@ -836,7 +847,7 @@ index 2c20440..2bd42ea 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-02-28 19:44+0100\n"
"Last-Translator: Matjaz Thaler <matjaz.thaler@guest.arnes.si>\n"
"Language-Team: Slovenian\n"
@@ -844,14 +855,14 @@ index 2c20440..2bd42ea 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Transparentnost ozadja podnapisov"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/sv_SE.po b/po/sv_SE.po
-index 4ac9a0f..1cceb44 100644
+index 4ac9a0f..1f55853 100644
--- a/po/sv_SE.po
+++ b/po/sv_SE.po
@@ -10,7 +10,7 @@ msgid ""
@@ -859,7 +870,7 @@ index 4ac9a0f..1cceb44 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-03-12 18:25+0100\n"
"Last-Translator: Magnus Andersson <svankan@bahnhof.se>\n"
"Language-Team: Swedish\n"
@@ -867,14 +878,14 @@ index 4ac9a0f..1cceb44 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Transparent bakgrund textremsa"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/tr_TR.po b/po/tr_TR.po
-index 02a9642..73fec22 100644
+index 02a9642..abce6da 100644
--- a/po/tr_TR.po
+++ b/po/tr_TR.po
@@ -7,7 +7,7 @@ msgid ""
@@ -882,7 +893,7 @@ index 02a9642..73fec22 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2008-02-28 00:33+0100\n"
"Last-Translator: Oktay Yolgeen <oktay_73@yahoo.de>\n"
"Language-Team: Turkish\n"
@@ -890,14 +901,14 @@ index 02a9642..73fec22 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Altyaz arka effaflk"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "LNB"
diff --git a/po/uk_UA.po b/po/uk_UA.po
-index 7e3010c..37e1f64 100644
+index 7e3010c..d52f3ea 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -7,7 +7,7 @@ msgid ""
@@ -905,7 +916,7 @@ index 7e3010c..37e1f64 100644
"Project-Id-Version: VDR 1.7.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2009-05-31 13:17+0200\n"
"Last-Translator: Yarema aka Knedlyk <yupadmin@gmail.com>\n"
"Language-Team: Ukrainian\n"
@@ -913,14 +924,14 @@ index 7e3010c..37e1f64 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "Прозорість заднього плану субтитрів"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "Конвертер"
diff --git a/po/zh_CN.po b/po/zh_CN.po
-index 1d12f71..2969540 100644
+index 1d12f71..482b487 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -7,7 +7,7 @@ msgid ""
@@ -928,7 +939,7 @@ index 1d12f71..2969540 100644
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
-"POT-Creation-Date: 2010-01-17 16:18+0100\n"
-+"POT-Creation-Date: 2010-02-13 14:31+0100\n"
++"POT-Creation-Date: 2010-02-14 17:47+0100\n"
"PO-Revision-Date: 2009-09-23 23:50+0800\n"
"Last-Translator: Nan Feng <nfgx@21cn.com>\n"
"Language-Team: Chinese\n"
@@ -936,14 +947,14 @@ index 1d12f71..2969540 100644
msgid "Setup.DVB$Subtitle background transparency"
msgstr "字幕背景透明度"
-+msgid "Setup.DVB$Record Teletext Subtitles"
++msgid "Setup.DVB$Enable teletext support"
+msgstr ""
+
msgid "LNB"
msgstr "切换器设置"
diff --git a/receiver.c b/receiver.c
-index f922e98..4403410 100644
+index f922e98..8bfb36e 100644
--- a/receiver.c
+++ b/receiver.c
@@ -82,7 +82,8 @@ bool cReceiver::SetPids(const cChannel *Channel)
@@ -952,31 +963,31 @@ index f922e98..4403410 100644
(!Setup.UseDolbyDigital || AddPids(Channel->Dpids())) &&
- AddPids(Channel->Spids());
+ AddPids(Channel->Spids()) &&
-+ (!Setup.RecordTtxtSubtitles || AddPid(Channel->Tpid()));
++ (!Setup.SupportTeletext || AddPid(Channel->Tpid()));
}
return true;
}
diff --git a/remux.c b/remux.c
-index 070a06a..24fcbd3 100644
+index 070a06a..ead63ea 100644
--- a/remux.c
+++ b/remux.c
@@ -215,6 +215,29 @@ int cPatPmtGenerator::MakeSubtitlingDescriptor(uchar *Target, const char *Langua
return i;
}
-+int cPatPmtGenerator::MakeTeletextDescriptor(uchar *Target, const cChannel *Channel)
++int cPatPmtGenerator::MakeTeletextDescriptor(uchar *Target, const tTeletextSubtitlePage *pages, int pageCount)
+{
+ int i = 0, j = 0;
+ Target[i++] = SI::TeletextDescriptorTag;
+ int l = i;
+ Target[i++] = 0x00; // length
-+ for (int n = 0; Channel->TeletextSubtitlePage(n).ttxtType; n++) {
-+ const char* Language = Channel->TeletextSubtitlePage(n).ttxtLanguage;
++ for (int n = 0; n < pageCount; n++) {
++ const char* Language = pages[n].ttxtLanguage;
+ Target[i++] = *Language++;
+ Target[i++] = *Language++;
+ Target[i++] = *Language++;
-+ Target[i++] = (Channel->TeletextSubtitlePage(n).ttxtType << 3) + Channel->TeletextSubtitlePage(n).ttxtMagazine;
-+ Target[i++] = Channel->TeletextSubtitlePage(n).ttxtPage;
++ Target[i++] = (pages[n].ttxtType << 3) + pages[n].ttxtMagazine;
++ Target[i++] = pages[n].ttxtPage;
+ j++;
+ }
+ if (j > 0) {
@@ -1004,7 +1015,7 @@ index 070a06a..24fcbd3 100644
}
+ if (Tpid) {
+ i += MakeStream(buf + i, 0x06, Tpid);
-+ i += MakeTeletextDescriptor(buf + i, Channel);
++ i += MakeTeletextDescriptor(buf + i, Channel->TeletextSubtitlePages(), Channel->TotalTeletextSubtitlePages());
+ }
int sl = i - SectionLength - 2 + 4; // -2 = SectionLength storage, +4 = length of CRC
@@ -1017,18 +1028,21 @@ index 070a06a..24fcbd3 100644
}
void cPatPmtParser::ParsePat(const uchar *Data, int Length)
-@@ -486,8 +515,10 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
- int NumApids = 0;
- int NumDpids = 0;
+@@ -488,11 +517,13 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
int NumSpids = 0;
-+ int NumTPages = 0;
vpid = vtype = 0;
ppid = 0;
+ tpid = 0;
apids[0] = 0;
dpids[0] = 0;
spids[0] = 0;
-@@ -586,6 +617,29 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
+ atypes[0] = 0;
+ dtypes[0] = 0;
++ totalTtxtSubtitlePages = 0;
+ SI::PMT::Stream stream;
+ for (SI::Loop::Iterator it; Pmt.streamLoop.getNext(stream, it); ) {
+ dbgpatpmt(" stream type = %02X, pid = %d", stream.getStreamType(), stream.getPid());
+@@ -586,6 +617,28 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
spids[NumSpids]= 0;
}
break;
@@ -1037,21 +1051,20 @@ index 070a06a..24fcbd3 100644
+ tpid = stream.getPid();
+ SI::TeletextDescriptor *sd = (SI::TeletextDescriptor *)d;
+ SI::TeletextDescriptor::Teletext ttxt;
-+ if (NumTPages < MAXTXTPAGES) {
++ if (totalTtxtSubtitlePages < MAXTXTPAGES) {
+ for (SI::Loop::Iterator it; sd->teletextLoop.getNext(ttxt, it); ) {
+ bool isSubtitlePage = (ttxt.getTeletextType() == 0x02) || (ttxt.getTeletextType() == 0x05);
+ if (isSubtitlePage && ttxt.languageCode[0]) {
+ dbgpatpmt(" '%s:%x.%x'", ttxt.languageCode, ttxt.getTeletextMagazineNumber(), ttxt.getTeletextPageNumber());
-+ strn0cpy(teletextSubtitlePages[NumTPages].ttxtLanguage, I18nNormalizeLanguageCode(ttxt.languageCode), MAXLANGCODE1);
-+ teletextSubtitlePages[NumTPages].ttxtPage = ttxt.getTeletextPageNumber();
-+ teletextSubtitlePages[NumTPages].ttxtMagazine = ttxt.getTeletextMagazineNumber();
-+ teletextSubtitlePages[NumTPages].ttxtType = ttxt.getTeletextType();
-+ NumTPages++;
-+ if (NumTPages >= MAXTXTPAGES)
++ strn0cpy(teletextSubtitlePages[totalTtxtSubtitlePages].ttxtLanguage, I18nNormalizeLanguageCode(ttxt.languageCode), MAXLANGCODE1);
++ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtPage = ttxt.getTeletextPageNumber();
++ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtMagazine = ttxt.getTeletextMagazineNumber();
++ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtType = ttxt.getTeletextType();
++ totalTtxtSubtitlePages++;
++ if (totalTtxtSubtitlePages >= MAXTXTPAGES)
+ break;
+ }
+ }
-+ teletextSubtitlePages[NumTPages].ttxtType = 0; // indicates end of list
+ }
+ }
+ break;
@@ -1059,14 +1072,14 @@ index 070a06a..24fcbd3 100644
SI::ISO639LanguageDescriptor *ld = (SI::ISO639LanguageDescriptor *)d;
dbgpatpmt(" '%s'", ld->languageCode);
diff --git a/remux.h b/remux.h
-index 1115c4a..43809fc 100644
+index 1115c4a..390236a 100644
--- a/remux.h
+++ b/remux.h
@@ -170,6 +170,7 @@ protected:
int MakeStream(uchar *Target, uchar Type, int Pid);
int MakeAC3Descriptor(uchar *Target);
int MakeSubtitlingDescriptor(uchar *Target, const char *Language, uchar SubtitlingType, uint16_t CompositionPageId, uint16_t AncillaryPageId);
-+ int MakeTeletextDescriptor(uchar *Target, const cChannel *Channel);
++ int MakeTeletextDescriptor(uchar *Target, const tTeletextSubtitlePage *pages, int pageCount);
int MakeLanguageDescriptor(uchar *Target, const char *Language);
int MakeCRC(uchar *Target, const uchar *Data, int Length);
void GeneratePmtPid(const cChannel *Channel);
@@ -1078,15 +1091,16 @@ index 1115c4a..43809fc 100644
int apids[MAXAPIDS + 1]; // list is zero-terminated
int atypes[MAXAPIDS + 1]; // list is zero-terminated
char alangs[MAXAPIDS][MAXLANGCODE2];
-@@ -227,6 +229,7 @@ private:
+@@ -227,6 +229,8 @@ private:
uint16_t compositionPageIds[MAXSPIDS];
uint16_t ancillaryPageIds[MAXSPIDS];
bool updatePrimaryDevice;
-+ tTeletextSubtitlePage teletextSubtitlePages[MAXTXTPAGES + 1]; // list is zero-terminated
++ int totalTtxtSubtitlePages;
++ tTeletextSubtitlePage teletextSubtitlePages[MAXTXTPAGES];
protected:
int SectionLength(const uchar *Data, int Length) { return (Length >= 3) ? ((int(Data[1]) & 0x0F) << 8)| Data[2] : 0; }
public:
-@@ -259,6 +262,9 @@ public:
+@@ -259,6 +263,9 @@ public:
int Vtype(void) const { return vtype; }
///< Returns the video stream type as defined by the current PMT, or 0 if no video
///< stream type has been detected, yet.
@@ -1096,7 +1110,7 @@ index 1115c4a..43809fc 100644
const int *Apids(void) const { return apids; }
const int *Dpids(void) const { return dpids; }
const int *Spids(void) const { return spids; }
-@@ -273,6 +279,7 @@ public:
+@@ -273,6 +280,7 @@ public:
uchar SubtitlingType(int i) const { return (0 <= i && i < MAXSPIDS) ? subtitlingTypes[i] : uchar(0); }
uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : uint16_t(0); }
uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); }