summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY15
-rw-r--r--channels.c83
-rw-r--r--channels.conf282
-rw-r--r--channels.h29
-rw-r--r--config.h3
-rw-r--r--eit.c60
-rw-r--r--eit.h29
-rw-r--r--menu.c17
-rw-r--r--timers.c10
-rw-r--r--timers.h3
-rw-r--r--vdr.523
12 files changed, 318 insertions, 240 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 70d4238e..dc95df2e 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -470,3 +470,7 @@ Peter Seyringer <e9425234@student.tuwien.ac.at>
Stefan Schluenss <dxr3_osd@schluenss.de>
for reporting a bug where PID handles were not closed correctly
+
+Régis Bossut <rbossut@auchan.com>
+ for pointing out that with some providers the channels can only be distinguished
+ through the RID
diff --git a/HISTORY b/HISTORY
index d8772301..a83a5e43 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1788,3 +1788,18 @@ Video Disk Recorder Revision History
a very primitive game that shows how a plugin can have its own raw OSD. Especially
look into cLineGame and see how it implements the Show() function. See also
the chapter on "User interaction" in PLUGINS.html.
+- Added three new fields to the lines in 'channels.conf': NID, TID and RID. NID and
+ TID are the Network and Transport Stream IDs, respectively. RID is an additional ID
+ that can be used to tell apart channels that would otherwise be indistinguishable.
+ This is typically the case with radio channels, which may have the same NID, TID
+ and SID, but different "radio IDs". This new field is therefore called RID ("radio
+ ID"). Currently NID and TID are not yet used by VDR and should always be 0. The
+ RID is actually used when building the "unique channel ID", so if you have channels
+ in your 'channels.conf' file that cause error messages when loading, you can set
+ the RIDs of these channels to different values.
+ When reading an old 'channels.conf' these new fields will be automatically
+ initialized to 0 and once the file is written back to disk they will be appended
+ to the channel definitions.
+ Thanks to Régis Bossut for pointing out that with some providers the channels can
+ only be distinguished through the RID.
+- The "unique channel ID" now contains an optional 5th part (the RID). See man vdr(5).
diff --git a/channels.c b/channels.c
index cb05e2ca..6afa7b95 100644
--- a/channels.c
+++ b/channels.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.c 1.8 2002/11/10 13:01:55 kls Exp $
+ * $Id: channels.c 1.9 2002/11/24 14:28:48 kls Exp $
*/
#include "channels.h"
@@ -120,6 +120,39 @@ int MapToDriver(int Value, const tChannelParameterMap *Map)
return -1;
}
+// -- tChannelID -------------------------------------------------------------
+
+const tChannelID tChannelID::InvalidID;
+
+bool tChannelID::operator== (const tChannelID &arg) const
+{
+ return source == arg.source && nid == arg.nid && tid == arg.tid && sid == arg.sid && rid == arg.rid;
+}
+
+tChannelID tChannelID::FromString(const char *s)
+{
+ char *sourcebuf = NULL;
+ int nid;
+ int tid;
+ int sid;
+ int rid = 0;
+ int fields = sscanf(s, "%a[^-]-%d-%d-%d-%d", &sourcebuf, &nid, &tid, &sid, &rid);
+ if (fields == 4 || fields == 5) {
+ int source = cSource::FromString(sourcebuf);
+ free(sourcebuf);
+ if (source >= 0)
+ return tChannelID(source, nid, tid, sid, rid);
+ }
+ return tChannelID::InvalidID;
+}
+
+const char *tChannelID::ToString(void)
+{
+ static char buffer[256];
+ snprintf(buffer, sizeof(buffer), rid ? "%s-%d-%d-%d-%d" : "%s-%d-%d-%d", cSource::ToString(source), nid, tid, sid, rid);
+ return buffer;
+}
+
// -- cChannel ---------------------------------------------------------------
char *cChannel::buffer = NULL;
@@ -137,7 +170,10 @@ cChannel::cChannel(void)
dpid2 = 0;
tpid = 32;
ca = 0;
- sid = 0;
+ nid = 0;
+ tid = 0;
+ sid = 888;
+ rid = 0;
groupSep = false;
polarization = 'v';
inversion = INVERSION_AUTO;
@@ -158,36 +194,14 @@ cChannel& cChannel::operator= (const cChannel &Channel)
static int MHz(int frequency)
{
- while (frequency > 20000) {
+ while (frequency > 20000)
frequency /= 1000;
- }
return frequency;
}
-uint64 cChannel::GetChannelID(void) const
+tChannelID cChannel::GetChannelID(void) const
{
- return (uint64(source) << 48) | (uint64(0) << 32) | ((MHz(frequency)) << 16) | sid;
-}
-
-const char *cChannel::GetChannelIDStr(void) const
-{
- static char buffer[256];
- snprintf(buffer, sizeof(buffer), "%s-%d-%d-%d", cSource::ToString(source), 0, MHz(frequency), sid);
- return buffer;
-}
-
-uint64 cChannel::StringToChannelID(const char *s)
-{
- char *sourcebuf = NULL;
- int reserved;
- int frequency;
- int sid;
- if (4 == sscanf(s, "%a[^-]-%d-%d-%d", &sourcebuf, &reserved, &frequency, &sid)) {
- int source = cSource::FromString(sourcebuf);
- if (source >= 0)
- return (uint64(source) << 48) | (uint64(reserved) << 32) | (frequency << 16) | sid;
- }
- return 0;
+ return tChannelID(source, nid, nid ? tid : MHz(frequency), sid, rid);
}
static int PrintParameter(char *p, char Name, int Value)
@@ -281,7 +295,7 @@ const char *cChannel::ToText(cChannel *Channel)
if (Channel->dpid2)
q += snprintf(q, sizeof(apidbuf) - (q - apidbuf), ",%d", Channel->dpid2);
*q = 0;
- asprintf(&buffer, "%s:%d:%s:%s:%d:%d:%s:%d:%d:%d\n", s, Channel->frequency, Channel->ParametersToString(), cSource::ToString(Channel->source), Channel->srate, Channel->vpid, apidbuf, Channel->tpid, Channel->ca, Channel->sid);
+ asprintf(&buffer, "%s:%d:%s:%s:%d:%d:%s:%d:%d:%d:%d:%d:%d\n", s, Channel->frequency, Channel->ParametersToString(), cSource::ToString(Channel->source), Channel->srate, Channel->vpid, apidbuf, Channel->tpid, Channel->ca, Channel->sid, Channel->nid, Channel->tid, Channel->rid);
}
return buffer;
}
@@ -312,7 +326,7 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
char *sourcebuf = NULL;
char *parambuf = NULL;
char *apidbuf = NULL;
- int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%d :%a[^:]:%d :%d :%d ", &namebuf, &frequency, &parambuf, &sourcebuf, &srate, &vpid, &apidbuf, &tpid, &ca, &sid);
+ int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%d :%a[^:]:%d :%d :%d :%d :%d :%d ", &namebuf, &frequency, &parambuf, &sourcebuf, &srate, &vpid, &apidbuf, &tpid, &ca, &sid, &nid, &tid, &rid);
if (fields >= 9) {
if (fields == 9) {
// allow reading of old format
@@ -430,18 +444,25 @@ cChannel *cChannels::GetByServiceID(int Source, unsigned short ServiceID)
return NULL;
}
-cChannel *cChannels::GetByChannelID(uint64 ChannelID)
+cChannel *cChannels::GetByChannelID(tChannelID ChannelID, bool TryWithoutRid)
{
for (cChannel *channel = First(); channel; channel = Next(channel)) {
if (!channel->GroupSep() && channel->GetChannelID() == ChannelID)
return channel;
}
+ if (TryWithoutRid) {
+ ChannelID.ClrRid();
+ for (cChannel *channel = First(); channel; channel = Next(channel)) {
+ if (!channel->GroupSep() && channel->GetChannelID().ClrRid() == ChannelID)
+ return channel;
+ }
+ }
return NULL;
}
bool cChannels::HasUniqueChannelID(cChannel *NewChannel, cChannel *OldChannel)
{
- uint64 NewChannelID = NewChannel->GetChannelID();
+ tChannelID NewChannelID = NewChannel->GetChannelID();
for (cChannel *channel = First(); channel; channel = Next(channel)) {
if (!channel->GroupSep() && channel != OldChannel && channel->GetChannelID() == NewChannelID)
return false;
diff --git a/channels.conf b/channels.conf
index f440ca7e..ab6b4b84 100644
--- a/channels.conf
+++ b/channels.conf
@@ -1,149 +1,149 @@
-RTL:12188:h:S19.2E:27500:163:104:105:0:12003
-Sat.1:12480:v:S19.2E:27500:1791:1792:34:0:46
-Pro-7:12480:v:S19.2E:27500:255:256;257:32:0:898
-RTL2:12188:h:S19.2E:27500:166:128:68:0:12020
-ARD:11837:h:S19.2E:27500:101:102:104:0:28106
-BR3:11837:h:S19.2E:27500:201:202:204:0:28107
-Hessen-3:11837:h:S19.2E:27500:301:302:304:0:28108
-N3:12110:h:S19.2E:27500:2401:2402:2404:0:28224
-SR3:11837:h:S19.2E:27500:501:502:504:0:28110
-WDR:11837:h:S19.2E:27500:601:602:604:0:28111
-BR-alpha:11837:h:S19.2E:27500:701:702:704:0:28112
-SWR BW:11837:h:S19.2E:27500:801:802:804:0:28113
-Phoenix:11837:h:S19.2E:27500:901:902:904:0:28114
-ZDF:11954:h:S19.2E:27500:110:120:130:0:28006
-3sat:11954:h:S19.2E:27500:210:220:230:0:28007
-KiKa:11954:h:S19.2E:27500:310:320:330:0:28008
-arte:11836:h:S19.2E:27500:401:402:404:0:28109
-ORF1:12692:h:S19.2E:22000:160:161:165:102:13001
-ORF2:12692:h:S19.2E:22000:500:501:505:102:13002
-ZDF.info:11954:h:S19.2E:27500:610:620:0:0:28011
-CNN:12168:v:S19.2E:27500:165:100:0:0:28512
-Super RTL:12188:h:S19.2E:27500:165:120:65:0:12040
-VOX:12188:h:S19.2E:27500:167:136:71:0:12060
-DW TV:10788:v:S19.2E:22000:305:306:0:0:8905
-Kabel 1:12480:v:S19.2E:27500:511:512:33:0:899
-Neun Live:12480:v:S19.2E:27500:767:768:35:0:897
-DSF:12480:v:S19.2E:27500:1023:1024:0:0:900
-HOT:12480:v:S19.2E:27500:1279:1280:0:0:40
-Bloomberg TV Germany:12552:v:S19.2E:22000:162:99:0:0:12160
-Bloomberg TV France:11817:v:S19.2E:27500:163:92:0:0:8004
-Bloomberg TV Spain:12168:v:S19.2E:27500:167:112:0:0:12721
-Sky News:12552:v:S19.2E:22000:305:306:0:0:3995
-Fox Kids Netherlands:12574:h:S19.2E:22000:163:92:0:0:5020
-Alice:12610:v:S19.2E:22000:162:96:0:0:12200
-n-tv:12670:v:S19.2E:22000:162:96:55:0:12730
-Grand Tourisme:12670:v:S19.2E:22000:289:290:0:0:17300
-TW1:12692:h:S19.2E:22000:166:167:0:0:13013
-Eurosport:11954:h:S19.2E:27500:410:420:0:0:28009
-EinsExtra:12110:h:S19.2E:27500:101:102:0:0:28201
-EinsFestival:12110:h:S19.2E:27500:201:202:0:0:28202
-EinsMuXx:12110:h:S19.2E:27500:301:302:0:0:28203
-ZDF Theaterkanal:11954:h:S19.2E:27500:1110:1120:0:0:28016
-ZDF.doku:11954:h:S19.2E:27500:660:670:0:0:28014
-MDR:12110:h:S19.2E:27500:401:402:404:0:28204
-ORB:12110:h:S19.2E:27500:501:502:504:0:28205
-B1:12110:h:S19.2E:27500:601:602:604:0:28206
+RTL:12188:h:S19.2E:27500:163:104:105:0:12003:0:0:0
+Sat.1:12480:v:S19.2E:27500:1791:1792:34:0:46:0:0:0
+Pro-7:12480:v:S19.2E:27500:255:256;257:32:0:898:0:0:0
+RTL2:12188:h:S19.2E:27500:166:128:68:0:12020:0:0:0
+ARD:11837:h:S19.2E:27500:101:102:104:0:28106:0:0:0
+BR3:11837:h:S19.2E:27500:201:202:204:0:28107:0:0:0
+Hessen-3:11837:h:S19.2E:27500:301:302:304:0:28108:0:0:0
+N3:12110:h:S19.2E:27500:2401:2402:2404:0:28224:0:0:0
+SR3:11837:h:S19.2E:27500:501:502:504:0:28110:0:0:0
+WDR:11837:h:S19.2E:27500:601:602:604:0:28111:0:0:0
+BR-alpha:11837:h:S19.2E:27500:701:702:704:0:28112:0:0:0
+SWR BW:11837:h:S19.2E:27500:801:802:804:0:28113:0:0:0
+Phoenix:11837:h:S19.2E:27500:901:902:904:0:28114:0:0:0
+ZDF:11954:h:S19.2E:27500:110:120:130:0:28006:0:0:0
+3sat:11954:h:S19.2E:27500:210:220:230:0:28007:0:0:0
+KiKa:11954:h:S19.2E:27500:310:320:330:0:28008:0:0:0
+arte:11836:h:S19.2E:27500:401:402:404:0:28109:0:0:0
+ORF1:12692:h:S19.2E:22000:160:161:165:102:13001:0:0:0
+ORF2:12692:h:S19.2E:22000:500:501:505:102:13002:0:0:0
+ZDF.info:11954:h:S19.2E:27500:610:620:0:0:28011:0:0:0
+CNN:12168:v:S19.2E:27500:165:100:0:0:28512:0:0:0
+Super RTL:12188:h:S19.2E:27500:165:120:65:0:12040:0:0:0
+VOX:12188:h:S19.2E:27500:167:136:71:0:12060:0:0:0
+DW TV:10788:v:S19.2E:22000:305:306:0:0:8905:0:0:0
+Kabel 1:12480:v:S19.2E:27500:511:512:33:0:899:0:0:0
+Neun Live:12480:v:S19.2E:27500:767:768:35:0:897:0:0:0
+DSF:12480:v:S19.2E:27500:1023:1024:0:0:900:0:0:0
+HOT:12480:v:S19.2E:27500:1279:1280:0:0:40:0:0:0
+Bloomberg TV Germany:12552:v:S19.2E:22000:162:99:0:0:12160:0:0:0
+Bloomberg TV France:11817:v:S19.2E:27500:163:92:0:0:8004:0:0:0
+Bloomberg TV Spain:12168:v:S19.2E:27500:167:112:0:0:12721:0:0:0
+Sky News:12552:v:S19.2E:22000:305:306:0:0:3995:0:0:0
+Fox Kids Netherlands:12574:h:S19.2E:22000:163:92:0:0:5020:0:0:0
+Alice:12610:v:S19.2E:22000:162:96:0:0:12200:0:0:0
+n-tv:12670:v:S19.2E:22000:162:96:55:0:12730:0:0:0
+Grand Tourisme:12670:v:S19.2E:22000:289:290:0:0:17300:0:0:0
+TW1:12692:h:S19.2E:22000:166:167:0:0:13013:0:0:0
+Eurosport:11954:h:S19.2E:27500:410:420:0:0:28009:0:0:0
+EinsExtra:12110:h:S19.2E:27500:101:102:0:0:28201:0:0:0
+EinsFestival:12110:h:S19.2E:27500:201:202:0:0:28202:0:0:0
+EinsMuXx:12110:h:S19.2E:27500:301:302:0:0:28203:0:0:0
+ZDF Theaterkanal:11954:h:S19.2E:27500:1110:1120:0:0:28016:0:0:0
+ZDF.doku:11954:h:S19.2E:27500:660:670:0:0:28014:0:0:0
+MDR:12110:h:S19.2E:27500:401:402:404:0:28204:0:0:0
+ORB:12110:h:S19.2E:27500:501:502:504:0:28205:0:0:0
+B1:12110:h:S19.2E:27500:601:602:604:0:28206:0:0:0
:Premiere World
-Premiere Start:11797:h:S19.2E:27500:255:256:0:101:8
-Premiere 1:11797:h:S19.2E:27500:511:512,513;515:0:101:10
-Premiere 2:11797:h:S19.2E:27500:1791:1792,1793;1795:0:101:11
-Premiere 3:11797:h:S19.2E:27500:2303:2304:0:101:43
-Premiere 4:11797:h:S19.2E:27500:767:768:0:101:9
-Premiere 5:11797:h:S19.2E:27500:1279:1280:0:101:29
-Premiere 6:11797:h:S19.2E:27500:1535:1536:0:101:41
-Premiere 7:11797:h:S19.2E:27500:1023:1024:0:101:20
-13th Street:11758:h:S19.2E:27500:2303:2304:0:101:42
-Studio Universal:12090:v:S19.2E:27500:255:256:0:101:36
-Premiere Serie:12031:h:S19.2E:27500:1023:1024:0:101:16
-Disney Channel:12090:v:S19.2E:27500:767:768:0:101:34
-Premiere Nostalgie:12031:h:S19.2E:27500:2559:2560:0:101:516
-Discovery Channel:12031:h:S19.2E:27500:1791:1792:0:101:14
-Planet:12090:v:S19.2E:27500:1279:1280:0:101:13
-Fox Kids:11758:h:S19.2E:27500:1279:1280:0:101:28
-Junior:11758:h:S19.2E:27500:255:256:0:101:19
-K-Toon:11758:h:S19.2E:27500:511:512:0:101:12
-Krimi&Co:12031:h:S19.2E:27500:1535:1536:0:101:23
-Goldstar TV:11758:h:S19.2E:27500:3839:3840:0:101:518
-Classica:11758:h:S19.2E:27500:767:768:0:101:15
-Sonnenklar TV:12090:v:S19.2E:27500:1023:1024:0:0:32
+Premiere Start:11797:h:S19.2E:27500:255:256:0:101:8:0:0:0
+Premiere 1:11797:h:S19.2E:27500:511:512,513;515:0:101:10:0:0:0
+Premiere 2:11797:h:S19.2E:27500:1791:1792,1793;1795:0:101:11:0:0:0
+Premiere 3:11797:h:S19.2E:27500:2303:2304:0:101:43:0:0:0
+Premiere 4:11797:h:S19.2E:27500:767:768:0:101:9:0:0:0
+Premiere 5:11797:h:S19.2E:27500:1279:1280:0:101:29:0:0:0
+Premiere 6:11797:h:S19.2E:27500:1535:1536:0:101:41:0:0:0
+Premiere 7:11797:h:S19.2E:27500:1023:1024:0:101:20:0:0:0
+13th Street:11758:h:S19.2E:27500:2303:2304:0:101:42:0:0:0
+Studio Universal:12090:v:S19.2E:27500:255:256:0:101:36:0:0:0
+Premiere Serie:12031:h:S19.2E:27500:1023:1024:0:101:16:0:0:0
+Disney Channel:12090:v:S19.2E:27500:767:768:0:101:34:0:0:0
+Premiere Nostalgie:12031:h:S19.2E:27500:2559:2560:0:101:516:0:0:0
+Discovery Channel:12031:h:S19.2E:27500:1791:1792:0:101:14:0:0:0
+Planet:12090:v:S19.2E:27500:1279:1280:0:101:13:0:0:0
+Fox Kids:11758:h:S19.2E:27500:1279:1280:0:101:28:0:0:0
+Junior:11758:h:S19.2E:27500:255:256:0:101:19:0:0:0
+K-Toon:11758:h:S19.2E:27500:511:512:0:101:12:0:0:0
+Krimi&Co:12031:h:S19.2E:27500:1535:1536:0:101:23:0:0:0
+Goldstar TV:11758:h:S19.2E:27500:3839:3840:0:101:518:0:0:0
+Classica:11758:h:S19.2E:27500:767:768:0:101:15:0:0:0
+Sonnenklar TV:12090:v:S19.2E:27500:1023:1024:0:0:32:0:0:0
:Premiere Direkt
-Premiere Direkt 1A:12031:h:S19.2E:27500:511:512,513;515:0:101:177
-Premiere Direkt 1B:11719:h:S19.2E:27500:1023:1024,1025;1027:0:101:182
-Premiere Direkt 2A:12031:h:S19.2E:27500:255:256;259:0:101:176
-Premiere Direkt 2B:11719:h:S19.2E:27500:767:768;769:0:101:181
-Premiere Direkt 3A:11719:h:S19.2E:27500:511:512;515:0:101:180
-Premiere Direkt 3B:11719:h:S19.2E:27500:1279:1280;1283:0:101:183
-Premiere Direkt 4A:12031:h:S19.2E:27500:2815:2816:0:101:18
-:#Premiere Direkt 4B:12070:h:S19.2E:27500:1535:1536:0:101:216
+Premiere Direkt 1A:12031:h:S19.2E:27500:511:512,513;515:0:101:177:0:0:0
+Premiere Direkt 1B:11719:h:S19.2E:27500:1023:1024,1025;1027:0:101:182:0:0:0
+Premiere Direkt 2A:12031:h:S19.2E:27500:255:256;259:0:101:176:0:0:0
+Premiere Direkt 2B:11719:h:S19.2E:27500:767:768;769:0:101:181:0:0:0
+Premiere Direkt 3A:11719:h:S19.2E:27500:511:512;515:0:101:180:0:0:0
+Premiere Direkt 3B:11719:h:S19.2E:27500:1279:1280;1283:0:101:183:0:0:0
+Premiere Direkt 4A:12031:h:S19.2E:27500:2815:2816:0:101:18:0:0:0
+:#Premiere Direkt 4B:12070:h:S19.2E:27500:1535:1536:0:101:216:0:0:0
:PW Erotic
-Beate-Uhse.TV:11758:h:S19.2E:27500:1023:1024:0:101:21
-Premiere Erotik 1:12031:h:S19.2E:27500:1279:1280:0:101:513
-Premiere Erotik 2:11719:h:S19.2E:27500:1535:1536:0:101:778
-Premiere Erotik 3:11719:h:S19.2E:27500:1791:1792:0:101:779
-Premiere Erotik 4:11719:h:S19.2E:27500:3583:3584:0:101:780
+Beate-Uhse.TV:11758:h:S19.2E:27500:1023:1024:0:101:21:0:0:0
+Premiere Erotik 1:12031:h:S19.2E:27500:1279:1280:0:101:513:0:0:0
+Premiere Erotik 2:11719:h:S19.2E:27500:1535:1536:0:101:778:0:0:0
+Premiere Erotik 3:11719:h:S19.2E:27500:1791:1792:0:101:779:0:0:0
+Premiere Erotik 4:11719:h:S19.2E:27500:3583:3584:0:101:780:0:0:0
:Sportsworld
-Premiere Sport 1:11720:h:S19.2E:27500:255:256,257:0:101:17
-Premiere Sport 2:12031:h:S19.2E:27500:3839:3840:0:101:27
+Premiere Sport 1:11720:h:S19.2E:27500:255:256,257:0:101:17:0:0:0
+Premiere Sport 2:12031:h:S19.2E:27500:3839:3840:0:101:27:0:0:0
:Formel 1
-:#Supersignal:12070:h:S19.2E:27500:255:256:0:101:211
-:#Cockpitkanal:12070:h:S19.2E:27500:511:512:0:101:212
-:#Boxengasse:12070:h:S19.2E:27500:767:768:0:101:213
-:#Verfolgerfeld:12070:h:S19.2E:27500:1023:1024:0:101:214
-:#Infokanal:12070:h:S19.2E:27500:1279:1280:0:101:215
-:#Multikanal:11720:h:S19.2E:27500:255:256:0:101:17
+:#Supersignal:12070:h:S19.2E:27500:255:256:0:101:211:0:0:0
+:#Cockpitkanal:12070:h:S19.2E:27500:511:512:0:101:212:0:0:0
+:#Boxengasse:12070:h:S19.2E:27500:767:768:0:101:213:0:0:0
+:#Verfolgerfeld:12070:h:S19.2E:27500:1023:1024:0:101:214:0:0:0
+:#Infokanal:12070:h:S19.2E:27500:1279:1280:0:101:215:0:0:0
+:#Multikanal:11720:h:S19.2E:27500:255:256:0:101:17:0:0:0
:Beta Digital
-N24:12480:v:S19.2E:27500:2047:2048:0:0:47
-CNBC:11954:h:S19.2E:27500:510:520:0:0:28010
-Liberty TV.com:12610:v:S19.2E:22000:941:943,942:0:0:12199
+N24:12480:v:S19.2E:27500:2047:2048:0:0:47:0:0:0
+CNBC:11954:h:S19.2E:27500:510:520:0:0:28010:0:0:0
+Liberty TV.com:12610:v:S19.2E:22000:941:943,942:0:0:12199:0:0:0
:Premiere Bundesliga
-BL-Konferenz:12031:h:S19.2E:27500:2303:2304,2305:0:101:210
-BuLi 1:11719:h:S19.2E:27500:255:256,257:0:101:17
-BuLi 2:11719:h:S19.2E:27500:2047:2048,2049:0:101:240
-BuLi 3:11719:h:S19.2E:27500:2303:2304,2305:0:101:241
-BuLi 4:11719:h:S19.2E:27500:2559:2560,2561:0:101:242
-BuLi 5:11719:h:S19.2E:27500:2815:2816,2817:0:101:243
-BuLi 6:11719:h:S19.2E:27500:3071:3072,3073:0:101:244
-BuLi 7:11719:h:S19.2E:27500:3327:3328,3329:0:101:245
-BuLi 8:12031:h:S19.2E:27500:3071:3072,3073:0:101:208
-BuLi 9:12031:h:S19.2E:27500:3327:3328,3329:0:101:209
+BL-Konferenz:12031:h:S19.2E:27500:2303:2304,2305:0:101:210:0:0:0
+BuLi 1:11719:h:S19.2E:27500:255:256,257:0:101:17:0:0:0
+BuLi 2:11719:h:S19.2E:27500:2047:2048,2049:0:101:240:0:0:0
+BuLi 3:11719:h:S19.2E:27500:2303:2304,2305:0:101:241:0:0:0
+BuLi 4:11719:h:S19.2E:27500:2559:2560,2561:0:101:242:0:0:0
+BuLi 5:11719:h:S19.2E:27500:2815:2816,2817:0:101:243:0:0:0
+BuLi 6:11719:h:S19.2E:27500:3071:3072,3073:0:101:244:0:0:0
+BuLi 7:11719:h:S19.2E:27500:3327:3328,3329:0:101:245:0:0:0
+BuLi 8:12031:h:S19.2E:27500:3071:3072,3073:0:101:208:0:0:0
+BuLi 9:12031:h:S19.2E:27500:3327:3328,3329:0:101:209:0:0:0
:-
-Mosaico:11934:v:S19.2E:27500:165:100:0:0:29010
-Andalucia TV:11934:v:S19.2E:27500:166:104:0:0:29011
-Canal J:11934:v:S19.2E:27500:167:108:0:0:8157
-Extreme Sports Channel:11992:h:S19.2E:27500:165:98,99:0:0:20365
-Pro 7 Austria:12051:v:S19.2E:27500:161:84:0:0:20002
-Kabel 1 Schweiz:12051:v:S19.2E:27500:162:163:0:0:20003
-Kabel 1 Austria:12051:v:S19.2E:27500:166:167:0:0:20004
-Pro 7 Schweiz:12051:v:S19.2E:27500:289:290:0:0:20001
-KTO:11739:v:S19.2E:27500:163:90:0:0:8304
-Cartoon Network France:12168:v:S19.2E:27500:161:84:0:0:28511
-TVBS Europe:12168:v:S19.2E:27500:162:88,89:0:0:28631
-travel channel:12168:v:S19.2E:27500:163:92,93:0:0:28001
-TCM Espana:12168:v:S19.2E:27500:164:96,97:0:0:28516
-TCM France:12168:v:S19.2E:27500:169:64,65:0:0:28515
-La Cinquieme:12207:v:S19.2E:27500:160:80:0:0:8501
-LCP:12207:v:S19.2E:27500:165:100:0:0:8506
-AB Moteurs:12266:h:S19.2E:27500:160:80:0:0:17000
-AB 1:12266:h:S19.2E:27500:161:84:0:0:17001
-Escales:12285:v:S19.2E:27500:165:100:0:0:17025
-Canal Club:12324:v:S19.2E:27500:160:80:0:0:8612
-RAI Uno:10788:v:S19.2E:22000:289:290:0:0:9004
-K13:12402:v:S19.2E:27500:163:92:0:0:8704
-Astra Mosaic 1:12552:v:S19.2E:22000:175:176:0:0:3988
-Astra Mosaic 2:12552:v:S19.2E:22000:179:120:0:0:3987
-Astra Mosaic 3:12552:v:S19.2E:22000:182:169:0:0:3986
-Astra Mosaic 4:12552:v:S19.2E:22000:185:170:0:0:3985
-Astra Mosaic 5:12552:v:S19.2E:22000:163:170:0:0:3984
-Chamber TV:12552:v:S19.2E:22000:55:56:0:0:12180
-RTL Tele Letzebuerg:12552:v:S19.2E:22000:168:144,146:0:0:3994
-VERONICA:12574:h:S19.2E:22000:161:84:0:0:5010
-VH1 Classic:12670:v:S19.2E:22000:3071:3072:0:0:28647
-MTV 2 Pop:12670:v:S19.2E:22000:3081:3082:0:0:28648
-Via 1 - Schöner Reisen:12148:h:S19.2E:27500:511:512:0:0:44
-Video Italia:12610:v:S19.2E:22000:121:122:0:0:12220
-ORF/ZDF:12670:h:S19.2E:22000:506:507:0:0:13012
-VIVA:12670:v:S19.2E:22000:309:310:0:0:12732
-VIVA PLUS:12552:v:S19.2E:22000:171:172:0:0:12120
-MTV German:12670:v:S19.2E:22000:3031:3032:0:0:28643
-QVC Germany:12552:v:S19.2E:22000:165:166:0:0:12100
+Mosaico:11934:v:S19.2E:27500:165:100:0:0:29010:0:0:0
+Andalucia TV:11934:v:S19.2E:27500:166:104:0:0:29011:0:0:0
+Canal J:11934:v:S19.2E:27500:167:108:0:0:8157:0:0:0
+Extreme Sports Channel:11992:h:S19.2E:27500:165:98,99:0:0:20365:0:0:0
+Pro 7 Austria:12051:v:S19.2E:27500:161:84:0:0:20002:0:0:0
+Kabel 1 Schweiz:12051:v:S19.2E:27500:162:163:0:0:20003:0:0:0
+Kabel 1 Austria:12051:v:S19.2E:27500:166:167:0:0:20004:0:0:0
+Pro 7 Schweiz:12051:v:S19.2E:27500:289:290:0:0:20001:0:0:0
+KTO:11739:v:S19.2E:27500:163:90:0:0:8304:0:0:0
+Cartoon Network France:12168:v:S19.2E:27500:161:84:0:0:28511:0:0:0
+TVBS Europe:12168:v:S19.2E:27500:162:88,89:0:0:28631:0:0:0
+travel channel:12168:v:S19.2E:27500:163:92,93:0:0:28001:0:0:0
+TCM Espana:12168:v:S19.2E:27500:164:96,97:0:0:28516:0:0:0
+TCM France:12168:v:S19.2E:27500:169:64,65:0:0:28515:0:0:0
+La Cinquieme:12207:v:S19.2E:27500:160:80:0:0:8501:0:0:0
+LCP:12207:v:S19.2E:27500:165:100:0:0:8506:0:0:0
+AB Moteurs:12266:h:S19.2E:27500:160:80:0:0:17000:0:0:0
+AB 1:12266:h:S19.2E:27500:161:84:0:0:17001:0:0:0
+Escales:12285:v:S19.2E:27500:165:100:0:0:17025:0:0:0
+Canal Club:12324:v:S19.2E:27500:160:80:0:0:8612:0:0:0
+RAI Uno:10788:v:S19.2E:22000:289:290:0:0:9004:0:0:0
+K13:12402:v:S19.2E:27500:163:92:0:0:8704:0:0:0
+Astra Mosaic 1:12552:v:S19.2E:22000:175:176:0:0:3988:0:0:0
+Astra Mosaic 2:12552:v:S19.2E:22000:179:120:0:0:3987:0:0:0
+Astra Mosaic 3:12552:v:S19.2E:22000:182:169:0:0:3986:0:0:0
+Astra Mosaic 4:12552:v:S19.2E:22000:185:170:0:0:3985:0:0:0
+Astra Mosaic 5:12552:v:S19.2E:22000:163:170:0:0:3984:0:0:0
+Chamber TV:12552:v:S19.2E:22000:55:56:0:0:12180:0:0:0
+RTL Tele Letzebuerg:12552:v:S19.2E:22000:168:144,146:0:0:3994:0:0:0
+VERONICA:12574:h:S19.2E:22000:161:84:0:0:5010:0:0:0
+VH1 Classic:12670:v:S19.2E:22000:3071:3072:0:0:28647:0:0:0
+MTV 2 Pop:12670:v:S19.2E:22000:3081:3082:0:0:28648:0:0:0
+Via 1 - Schöner Reisen:12148:h:S19.2E:27500:511:512:0:0:44:0:0:0
+Video Italia:12610:v:S19.2E:22000:121:122:0:0:12220:0:0:0
+ORF/ZDF:12670:h:S19.2E:22000:506:507:0:0:13012:0:0:0
+VIVA:12670:v:S19.2E:22000:309:310:0:0:12732:0:0:0
+VIVA PLUS:12552:v:S19.2E:22000:171:172:0:0:12120:0:0:0
+MTV German:12670:v:S19.2E:22000:3031:3032:0:0:28643:0:0:0
+QVC Germany:12552:v:S19.2E:22000:165:166:0:0:12100:0:0:0
diff --git a/channels.h b/channels.h
index 52e79b4d..0f6feb10 100644
--- a/channels.h
+++ b/channels.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.h 1.4 2002/11/10 13:01:23 kls Exp $
+ * $Id: channels.h 1.5 2002/11/24 14:27:51 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -35,6 +35,24 @@ extern const tChannelParameterMap TransmissionValues[];
extern const tChannelParameterMap GuardValues[];
extern const tChannelParameterMap HierarchyValues[];
+struct tChannelID {
+private:
+ int source;
+ int nid;
+ int tid;
+ int sid;
+ int rid;
+public:
+ tChannelID(void) { source = nid = tid = sid = rid = 0; }
+ tChannelID(int Source, int Nid, int Tid, int Sid, int Rid = 0) { source = Source; nid = Nid; tid = Tid; sid = Sid; rid = Rid; }
+ bool operator== (const tChannelID &arg) const;
+ bool Valid(void) { return source && tid && sid; } // nid and rid are optional
+ tChannelID &ClrRid(void) { rid = 0; return *this; }
+ static tChannelID FromString(const char *s);
+ const char *ToString(void);
+ static const tChannelID InvalidID;
+ };
+
class cChannel : public cListObject {
friend class cMenuEditChannel;
private:
@@ -51,7 +69,10 @@ private:
int dpid1, dpid2;
int tpid;
int ca;
+ int nid;
+ int tid;
int sid;
+ int rid;
int number; // Sequence number assigned on load
bool groupSep;
char polarization;
@@ -99,9 +120,7 @@ public:
bool IsCable(void) { return (source & cSource::st_Mask) == cSource::stCable; }
bool IsSat(void) { return (source & cSource::st_Mask) == cSource::stSat; }
bool IsTerr(void) { return (source & cSource::st_Mask) == cSource::stTerr; }
- uint64 GetChannelID(void) const;
- const char *GetChannelIDStr(void) const;
- static uint64 StringToChannelID(const char *s);
+ tChannelID GetChannelID(void) const;
};
class cChannels : public cConfig<cChannel> {
@@ -116,7 +135,7 @@ public:
void ReNumber(void); // Recalculate 'number' based on channel type
cChannel *GetByNumber(int Number, int SkipGap = 0);
cChannel *GetByServiceID(int Source, unsigned short ServiceID);
- cChannel *GetByChannelID(uint64 ChannelID);
+ cChannel *GetByChannelID(tChannelID ChannelID, bool TryWithoutRid = false);
bool HasUniqueChannelID(cChannel *NewChannel, cChannel *OldChannel = NULL);
bool SwitchTo(int Number);
int MaxNumber(void) { return maxNumber; }
diff --git a/config.h b/config.h
index 04a7c829..0c84ad41 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.140 2002/11/11 16:59:04 kls Exp $
+ * $Id: config.h 1.141 2002/11/24 12:28:20 kls Exp $
*/
#ifndef __CONFIG_H
@@ -17,7 +17,6 @@
#include <time.h>
#include <unistd.h>
#include "device.h"
-#include "eit.h"
#include "tools.h"
#define VDRVERSION "1.1.17"
diff --git a/eit.c b/eit.c
index f8b436c0..dd51f0cf 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.60 2002/11/10 15:50:21 kls Exp $
+ * $Id: eit.c 1.61 2002/11/24 14:37:38 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -180,7 +180,7 @@ bool cTDT::SetSystemTime()
// --- cEventInfo ------------------------------------------------------------
-cEventInfo::cEventInfo(uint64 channelid, unsigned short eventid)
+cEventInfo::cEventInfo(tChannelID channelid, unsigned short eventid)
{
pTitle = NULL;
pSubtitle = NULL;
@@ -190,7 +190,7 @@ cEventInfo::cEventInfo(uint64 channelid, unsigned short eventid)
tTime = 0;
uTableID = 0;
uEventID = eventid;
- uChannelID = channelid;
+ channelID = channelid;
nChannelNumber = 0;
}
@@ -325,15 +325,15 @@ void cEventInfo::SetEventID(unsigned short evid)
uEventID = evid;
}
/** */
-void cEventInfo::SetChannelID(uint64 channelid)
+void cEventInfo::SetChannelID(tChannelID channelid)
{
- uChannelID = channelid;
+ channelID = channelid;
}
/** */
-uint64 cEventInfo::GetChannelID() const
+tChannelID cEventInfo::GetChannelID() const
{
- return uChannelID;
+ return channelID;
}
/** */
@@ -404,13 +404,13 @@ bool cEventInfo::Read(FILE *f, cSchedule *Schedule)
struct tEpgBugFixStats {
int hits;
int n;
- uint64 channelIDs[MAXEPGBUGFIXCHANS];
+ tChannelID channelIDs[MAXEPGBUGFIXCHANS];
tEpgBugFixStats(void) { hits = n = 0; }
};
tEpgBugFixStats EpgBugFixStats[MAXEPGBUGFIXSTATS];
-static void EpgBugFixStat(int Number, uint64 ChannelID)
+static void EpgBugFixStat(int Number, tChannelID ChannelID)
{
if (0 <= Number && Number < MAXEPGBUGFIXSTATS) {
tEpgBugFixStats *p = &EpgBugFixStats[Number];
@@ -448,7 +448,7 @@ static void ReportEpgBugFixStats(bool Reset = false)
char *q = buffer;
q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits);
for (int c = 0; c < p->n; c++) {
- cChannel *channel = Channels.GetByChannelID(p->channelIDs[c]);
+ cChannel *channel = Channels.GetByChannelID(p->channelIDs[c], true);
if (channel) {
q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->Name());
delim = ", ";
@@ -608,10 +608,10 @@ void cEventInfo::FixEpgBugs(void)
// --- cSchedule -------------------------------------------------------------
-cSchedule::cSchedule(uint64 channelid)
+cSchedule::cSchedule(tChannelID channelid)
{
pPresent = pFollowing = NULL;
- uChannelID = channelid;
+ channelID = channelid;
}
@@ -645,14 +645,14 @@ const cEventInfo *cSchedule::GetFollowingEvent(void) const
return pe;
}
-void cSchedule::SetChannelID(uint64 channelid)
+void cSchedule::SetChannelID(tChannelID channelid)
{
- uChannelID = channelid;
+ channelID = channelid;
}
/** */
-uint64 cSchedule::GetChannelID() const
+tChannelID cSchedule::GetChannelID() const
{
- return uChannelID;
+ return channelID;
}
/** */
const cEventInfo * cSchedule::GetEvent(unsigned short uEventID, time_t tTime) const
@@ -735,10 +735,10 @@ void cSchedule::Cleanup(time_t tTime)
/** */
void cSchedule::Dump(FILE *f, const char *Prefix) const
{
- cChannel *channel = Channels.GetByChannelID(uChannelID);
+ cChannel *channel = Channels.GetByChannelID(channelID, true);
if (channel)
{
- fprintf(f, "%sC %s %s\n", Prefix, channel->GetChannelIDStr(), channel->Name());
+ fprintf(f, "%sC %s %s\n", Prefix, channel->GetChannelID().ToString(), channel->Name());
for (cEventInfo *p = Events.First(); p; p = Events.Next(p))
p->Dump(f, Prefix);
fprintf(f, "%sc\n", Prefix);
@@ -756,9 +756,9 @@ bool cSchedule::Read(FILE *f, cSchedules *Schedules)
if (p)
*p = 0; // strips optional channel name
if (*s) {
- uint64 uChannelID = cChannel::StringToChannelID(s);
- if (uChannelID) {
- cSchedule *p = (cSchedule *)Schedules->AddChannelID(uChannelID);
+ tChannelID channelID = tChannelID::FromString(s);
+ if (channelID.Valid()) {
+ cSchedule *p = (cSchedule *)Schedules->AddChannelID(channelID);
if (p) {
if (!cEventInfo::Read(f, p))
return false;
@@ -785,14 +785,13 @@ bool cSchedule::Read(FILE *f, cSchedules *Schedules)
cSchedules::cSchedules()
{
pCurrentSchedule = NULL;
- uCurrentChannelID = 0;
}
cSchedules::~cSchedules()
{
}
/** */
-const cSchedule *cSchedules::AddChannelID(uint64 channelid)
+const cSchedule *cSchedules::AddChannelID(tChannelID channelid)
{
const cSchedule *p = GetSchedule(channelid);
if (!p) {
@@ -802,11 +801,12 @@ const cSchedule *cSchedules::AddChannelID(uint64 channelid)
return p;
}
/** */
-const cSchedule *cSchedules::SetCurrentChannelID(uint64 channelid)
+const cSchedule *cSchedules::SetCurrentChannelID(tChannelID channelid)
{
+ channelid.ClrRid();
pCurrentSchedule = AddChannelID(channelid);
if (pCurrentSchedule)
- uCurrentChannelID = channelid;
+ currentChannelID = channelid;
return pCurrentSchedule;
}
/** */
@@ -815,10 +815,11 @@ const cSchedule * cSchedules::GetSchedule() const
return pCurrentSchedule;
}
/** */
-const cSchedule * cSchedules::GetSchedule(uint64 channelid) const
+const cSchedule * cSchedules::GetSchedule(tChannelID channelid) const
{
cSchedule *p;
+ channelid.ClrRid();
p = First();
while (p != NULL)
{
@@ -905,7 +906,8 @@ int cEIT::ProcessEIT(unsigned char *buffer, int CurrentSource)
for (VdrProgramInfo = (struct VdrProgramInfo *) VdrProgramInfos->Head; VdrProgramInfo; VdrProgramInfo = (struct VdrProgramInfo *) xSucc (VdrProgramInfo)) {
//XXX TODO use complete channel ID
cChannel *channel = Channels.GetByServiceID(CurrentSource, VdrProgramInfo->ServiceID);
- uint64 channelID = channel ? channel->GetChannelID() : (uint64(CurrentSource) << 48) | VdrProgramInfo->ServiceID;
+ tChannelID channelID = channel ? channel->GetChannelID() : tChannelID(CurrentSource, 0, 0, VdrProgramInfo->ServiceID);
+ channelID.ClrRid();
//XXX
pSchedule = (cSchedule *)schedules->GetSchedule(channelID);
if (!pSchedule) {
@@ -915,7 +917,7 @@ int cEIT::ProcessEIT(unsigned char *buffer, int CurrentSource)
break;
}
if (VdrProgramInfo->ReferenceServiceID) {
- rSchedule = (cSchedule *)schedules->GetSchedule((uint64(CurrentSource) << 48) | VdrProgramInfo->ReferenceServiceID);
+ rSchedule = (cSchedule *)schedules->GetSchedule(tChannelID(CurrentSource, 0, 0, VdrProgramInfo->ReferenceServiceID));
if (!rSchedule)
break;
rEvent = (cEventInfo *)rSchedule->GetEvent((unsigned short)VdrProgramInfo->ReferenceEventID);
@@ -1270,7 +1272,7 @@ void cSIProcessor::SetCurrentTransponder(int CurrentSource, int CurrentTranspond
}
/** */
-bool cSIProcessor::SetCurrentChannelID(uint64 channelid)
+bool cSIProcessor::SetCurrentChannelID(tChannelID channelid)
{
cMutexLock MutexLock(&schedulesMutex);
return schedules ? schedules->SetCurrentChannelID(channelid) : false;
diff --git a/eit.h b/eit.h
index d906725e..36c0a3e8 100644
--- a/eit.h
+++ b/eit.h
@@ -16,12 +16,13 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.h 1.21 2002/11/10 12:58:27 kls Exp $
+ * $Id: eit.h 1.22 2002/11/24 12:45:55 kls Exp $
***************************************************************************/
#ifndef __EIT_H
#define __EIT_H
+#include "channels.h"
#include "thread.h"
#include "tools.h"
@@ -32,7 +33,7 @@ class cEventInfo : public cListObject {
friend class cEIT;
private:
unsigned char uTableID; // Table ID this event came from
- uint64 uChannelID; // Channel ID of program for that event
+ tChannelID channelID; // Channel ID of program for that event
bool bIsFollowing; // true if this is the next event on this channel
bool bIsPresent; // true if this is the present event running
char *pExtendedDescription; // Extended description of this event
@@ -47,13 +48,13 @@ protected:
void SetFollowing(bool foll);
void SetPresent(bool pres);
void SetTitle(const char *string);
- void SetChannelID(uint64 channelid);
+ void SetChannelID(tChannelID channelid);
void SetEventID(unsigned short evid);
void SetDuration(long l);
void SetTime(time_t t);
void SetExtendedDescription(const char *string);
void SetSubtitle(const char *string);
- cEventInfo(uint64 channelid, unsigned short eventid);
+ cEventInfo(tChannelID channelid, unsigned short eventid);
public:
~cEventInfo();
const unsigned char GetTableID(void) const;
@@ -68,7 +69,7 @@ public:
unsigned short GetEventID(void) const;
long GetDuration(void) const;
time_t GetTime(void) const;
- uint64 GetChannelID(void) const;
+ tChannelID GetChannelID(void) const;
int GetChannelNumber(void) const { return nChannelNumber; }
void SetChannelNumber(int ChannelNumber) const { ((cEventInfo *)this)->nChannelNumber = ChannelNumber; } // doesn't modify the EIT data, so it's ok to make it 'const'
void Dump(FILE *f, const char *Prefix = "") const;
@@ -82,21 +83,21 @@ class cSchedule : public cListObject {
private:
cEventInfo *pPresent;
cEventInfo *pFollowing;
- uint64 uChannelID;
+ tChannelID channelID;
cList<cEventInfo> Events;
protected:
- void SetChannelID(uint64 channelid);
+ void SetChannelID(tChannelID channelid);
bool SetFollowingEvent(cEventInfo *pEvent);
bool SetPresentEvent(cEventInfo *pEvent);
void Cleanup(time_t tTime);
void Cleanup(void);
- cSchedule(uint64 channelid = 0);
+ cSchedule(tChannelID channelid = tChannelID::InvalidID);
public:
~cSchedule();
cEventInfo *AddEvent(cEventInfo *EventInfo);
const cEventInfo *GetPresentEvent(void) const;
const cEventInfo *GetFollowingEvent(void) const;
- uint64 GetChannelID(void) const;
+ tChannelID GetChannelID(void) const;
const cEventInfo *GetEvent(unsigned short uEventID, time_t tTime = 0) const;
const cEventInfo *GetEventAround(time_t tTime) const;
const cEventInfo *GetEventNumber(int n) const { return Events.Get(n); }
@@ -110,15 +111,15 @@ class cSchedules : public cList<cSchedule> {
friend class cSIProcessor;
private:
const cSchedule *pCurrentSchedule;
- uint64 uCurrentChannelID;
+ tChannelID currentChannelID;
protected:
- const cSchedule *AddChannelID(uint64 channelid);
- const cSchedule *SetCurrentChannelID(uint64 channelid);
+ const cSchedule *AddChannelID(tChannelID channelid);
+ const cSchedule *SetCurrentChannelID(tChannelID channelid);
void Cleanup();
public:
cSchedules(void);
~cSchedules();
- const cSchedule *GetSchedule(uint64 channelid) const;
+ const cSchedule *GetSchedule(tChannelID channelid) const;
const cSchedule *GetSchedule(void) const;
void Dump(FILE *f, const char *Prefix = "") const;
static bool Read(FILE *f);
@@ -162,7 +163,7 @@ public:
static void Clear(void);
void SetStatus(bool On);
void SetCurrentTransponder(int CurrentSource, int CurrentTransponder);
- static bool SetCurrentChannelID(uint64 channelid);
+ static bool SetCurrentChannelID(tChannelID channelid);
static void TriggerDump(void);
};
diff --git a/menu.c b/menu.c
index 663b2dc7..0210e2d5 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.225 2002/11/23 14:51:24 kls Exp $
+ * $Id: menu.c 1.226 2002/11/24 14:34:41 kls Exp $
*/
#include "menu.h"
@@ -582,6 +582,11 @@ void cMenuEditChannel::Setup(void)
Add(new cMenuEditIntItem( tr("Tpid"), &data.tpid, 0, 0x1FFF));
Add(new cMenuEditCaItem( tr("CA"), &data.ca, true));
Add(new cMenuEditIntItem( tr("Sid"), &data.sid, 0));
+ /* XXX not yet used
+ Add(new cMenuEditIntItem( tr("Nid"), &data.nid, 0));
+ Add(new cMenuEditIntItem( tr("Tid"), &data.tid, 0));
+ Add(new cMenuEditIntItem( tr("Rid"), &data.rid, 0));
+ XXX*/
// Parameters for specific types of sources:
ST(" S ") Add(new cMenuEditChrItem( tr("Polarization"), &data.polarization, "hv"));
ST("CS ") Add(new cMenuEditIntItem( tr("Srate"), &data.srate));
@@ -1089,7 +1094,7 @@ cMenuEvent::cMenuEvent(const cEventInfo *EventInfo, bool CanSwitch)
{
eventInfo = EventInfo;
if (eventInfo) {
- cChannel *channel = Channels.GetByChannelID(eventInfo->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(eventInfo->GetChannelID(), true);
if (channel) {
char *buffer;
asprintf(&buffer, "%-17.*s\t%.*s %s - %s", 17, channel->Name(), 5, eventInfo->GetDate(), eventInfo->GetTimeString(), eventInfo->GetEndTimeString());
@@ -1183,7 +1188,7 @@ cMenuWhatsOn::cMenuWhatsOn(const cSchedules *Schedules, bool Now, int CurrentCha
pArray[num] = Now ? Schedule->GetPresentEvent() : Schedule->GetFollowingEvent();
if (pArray[num]) {
- cChannel *channel = Channels.GetByChannelID(pArray[num]->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(pArray[num]->GetChannelID(), true);
if (channel) {
pArray[num]->SetChannelNumber(channel->Number());
num++;
@@ -1213,7 +1218,7 @@ eOSState cMenuWhatsOn::Switch(void)
{
cMenuWhatsOnItem *item = (cMenuWhatsOnItem *)Get(Current());
if (item) {
- cChannel *channel = Channels.GetByChannelID(item->eventInfo->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(item->eventInfo->GetChannelID(), true);
if (channel && cDevice::PrimaryDevice()->SwitchChannel(channel, true))
return osEnd;
}
@@ -1397,7 +1402,7 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key)
if (!now && !next) {
int ChannelNr = 0;
if (Count()) {
- cChannel *channel = Channels.GetByChannelID(((cMenuScheduleItem *)Get(Current()))->eventInfo->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(((cMenuScheduleItem *)Get(Current()))->eventInfo->GetChannelID(), true);
if (channel)
ChannelNr = channel->Number();
}
@@ -1424,7 +1429,7 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key)
now = next = false;
const cEventInfo *ei = cMenuWhatsOn::ScheduleEventInfo();
if (ei) {
- cChannel *channel = Channels.GetByChannelID(ei->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(ei->GetChannelID(), true);
if (channel) {
PrepareSchedule(channel);
if (channel->Number() != cDevice::CurrentChannel()) {
diff --git a/timers.c b/timers.c
index 60445222..8e2bead3 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 1.2 2002/11/10 10:19:12 kls Exp $
+ * $Id: timers.c 1.3 2002/11/24 14:29:21 kls Exp $
*/
#include "timers.h"
@@ -49,7 +49,7 @@ cTimer::cTimer(const cEventInfo *EventInfo)
startTime = stopTime = 0;
recording = pending = false;
active = true;
- channel = Channels.GetByChannelID(EventInfo->GetChannelID());
+ channel = Channels.GetByChannelID(EventInfo->GetChannelID(), true);
time_t tstart = EventInfo->GetTime();
time_t tstop = tstart + EventInfo->GetDuration() + Setup.MarginStop * 60;
tstart -= Setup.MarginStart * 60;
@@ -97,7 +97,7 @@ const char *cTimer::ToText(bool UseChannelID)
free(buffer);
strreplace(file, ':', '|');
strreplace(summary, '\n', '|');
- asprintf(&buffer, "%d:%s:%s:%04d:%04d:%d:%d:%s:%s\n", active, UseChannelID ? Channel()->GetChannelIDStr() : itoa(Channel()->Number()), PrintDay(day, firstday), start, stop, priority, lifetime, file, summary ? summary : "");
+ asprintf(&buffer, "%d:%s:%s:%04d:%04d:%d:%d:%s:%s\n", active, UseChannelID ? Channel()->GetChannelID().ToString() : itoa(Channel()->Number()), PrintDay(day, firstday), start, stop, priority, lifetime, file, summary ? summary : "");
strreplace(summary, '|', '\n');
strreplace(file, '|', ':');
return buffer;
@@ -216,8 +216,8 @@ bool cTimer::Parse(const char *s)
strn0cpy(file, filebuffer, MaxFileName);
strreplace(file, '|', ':');
strreplace(summary, '|', '\n');
- uint64 cid = cChannel::StringToChannelID(channelbuffer);
- channel = cid ? Channels.GetByChannelID(cid) : Channels.GetByNumber(atoi(channelbuffer));
+ tChannelID cid = tChannelID::FromString(channelbuffer);
+ channel = cid.Valid() ? Channels.GetByChannelID(cid) : Channels.GetByNumber(atoi(channelbuffer));
if (!channel) {
esyslog("ERROR: channel %s not defined", channelbuffer);
result = false;
diff --git a/timers.h b/timers.h
index 933c88e9..3d308888 100644
--- a/timers.h
+++ b/timers.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.h 1.2 2002/11/10 10:17:05 kls Exp $
+ * $Id: timers.h 1.3 2002/11/24 11:50:56 kls Exp $
*/
#ifndef __TIMERS_H
@@ -12,6 +12,7 @@
#include "channels.h"
#include "config.h"
+#include "eit.h"
#include "tools.h"
enum eTimerActive { taInactive = 0,
diff --git a/vdr.5 b/vdr.5
index 9720a657..5c0f4155 100644
--- a/vdr.5
+++ b/vdr.5
@@ -8,7 +8,7 @@
.\" License as specified in the file COPYING that comes with the
.\" vdr distribution.
.\"
-.\" $Id: vdr.5 1.12 2002/11/10 10:10:15 kls Exp $
+.\" $Id: vdr.5 1.13 2002/11/24 13:48:13 kls Exp $
.\"
.TH vdr 5 "10 Nov 2002" "1.2.0" "Video Disk Recorder Files"
.SH NAME
@@ -38,7 +38,7 @@ The given number must be larger than the number of any previous channel
A \fBchannel definition\fR is a line with channel data, where the fields
are separated by ':' characters. Example:
-\fBRTL:12188:h:S19.2E:27500:163:104:105:0:12003\fR
+\fBRTL:12188:h:S19.2E:27500:163:104:105:0:12003:0:0:0\fR
The line number of a channel definition (not counting group separators,
and based on a possible previous '@...' parameter)
@@ -119,16 +119,27 @@ l l.
.TE
.TP
.B SID
-The service ID of this channel.
+The Service ID of this channel.
+.TP
+.B NID
+The Network ID of this channel (for future use, currently always 0).
+.TP
+.B TID
+The Transport stream ID of this channel (for future use, currently always 0).
+.TP
+.B RID
+The Radio ID of this channel (typically 0, may be used to distinguish channels where
+NID, TID and SID are all equal).
.PP
A particular channel can be uniquely identified by its \fBchannel\ ID\fR,
which is a string that looks like this:
-\fBS19.2E-0-12188-12003\fR
+\fBS19.2E-0-12188-12003-0\fR
The components of this string are the \fBSource\fR (S19.2E), \fBFrequency\fR
-(12188, MHz) and \fBSID\fR (12003) as defined above. The part that is currently
-\fB0\fR is reserved for future use.
+(12188, MHz) and \fBSID\fR (12003) as defined above. The parts that are currently
+\fB0\fR are reserved for future use (the last part can be omitted if it is \fB0\fR,
+so the above example could also be written as \fBS19.2E-0-12188-12003\fR).
.br
The \fBchannel\ ID\fR is used in the \fItimers.conf\fR and \fIepg.data\fR
files to properly identify the channels.