summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
authoretobi <git@e-tobi.net>2010-02-12 21:55:04 +0100
committeretobi <git@e-tobi.net>2010-03-06 12:07:45 +0100
commit2e1ffe9283833fdbe211291f794b8ee2576421de (patch)
treef26bd116c3dd91dbd81b783bc6af0f66a2628ba8 /channels.h
parent5ce592e54a4aa741444afae8eb80dff47bc355fd (diff)
downloadvdr-patches-2e1ffe9283833fdbe211291f794b8ee2576421de.tar.gz
vdr-patches-2e1ffe9283833fdbe211291f794b8ee2576421de.tar.bz2
Record teletext subtitles
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/channels.h b/channels.h
index 4ed1358..defb6bc 100644
--- a/channels.h
+++ b/channels.h
@@ -35,6 +35,7 @@
#define MAXDPIDS 16 // dolby (AC3 + DTS)
#define MAXSPIDS 32 // subtitles
#define MAXCAIDS 8 // conditional access
+#define MAXTXTPAGES 8 // teletext pages
#define MAXLANGCODE1 4 // a 3 letter language code, zero terminated
#define MAXLANGCODE2 8 // up to two 3 letter language codes, separated by '+' and zero terminated
@@ -71,6 +72,16 @@ public:
static const tChannelID InvalidID;
};
+struct tTeletextSubtitlePage {
+ 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;
+ uchar ttxtType;
+ int PageNumber(void) const { return BCDCHARTOINT(ttxtMagazine) * 100 + BCDCHARTOINT(ttxtPage); }
+ };
+
class cChannel;
class cLinkChannel : public cListObject {
@@ -113,6 +124,8 @@ private:
uint16_t compositionPageIds[MAXSPIDS];
uint16_t ancillaryPageIds[MAXSPIDS];
int tpid;
+ int totalTtxtSubtitlePages;
+ tTeletextSubtitlePage teletextSubtitlePages[MAXTXTPAGES];
int caids[MAXCAIDS + 1]; // list is zero-terminated
int nid;
int tid;
@@ -160,6 +173,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 *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; }
@@ -184,6 +199,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[], int numberOfPages);
void SetCaIds(const int *CaIds); // list must be zero-terminated
void SetCaDescriptors(int Level);
void SetLinkChannels(cLinkChannels *LinkChannels);