summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS15
-rw-r--r--HISTORY34
-rw-r--r--MANUAL19
-rw-r--r--Makefile4
-rw-r--r--README.developer4
-rw-r--r--channels.c111
-rw-r--r--channels.conf188
-rw-r--r--channels.h12
-rw-r--r--config.c41
-rw-r--r--config.h13
-rw-r--r--device.c9
-rw-r--r--device.h4
-rw-r--r--dvbdevice.c6
-rw-r--r--eit.c47
-rw-r--r--eitscan.c100
-rw-r--r--eitscan.h7
-rw-r--r--epg.c18
-rw-r--r--epg.h4
-rw-r--r--filter.c44
-rw-r--r--filter.h15
-rw-r--r--i18n.c177
-rw-r--r--i18n.h5
-rw-r--r--libsi/si.c4
-rw-r--r--libsi/si.h6
-rw-r--r--menu.c79
-rw-r--r--nit.c139
-rw-r--r--nit.h25
-rw-r--r--pat.c10
-rwxr-xr-xrunvdr4
-rw-r--r--sdt.c86
-rw-r--r--sdt.h4
-rw-r--r--sections.c39
-rw-r--r--sections.h16
-rw-r--r--sources.c13
-rw-r--r--sources.h4
-rw-r--r--tools.c10
-rw-r--r--tools.h5
-rw-r--r--vdr.56
38 files changed, 1037 insertions, 290 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index d2f715d..9b21c58 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -522,6 +522,8 @@ Lauri Tischler <lauri.tischler@efore.fi>
for reporting a faulty parameter initialization in menu.c
for reporting a problem in case the original current channel becomes
unavailable due to a recording on a different transponder
+ for reporting a compiler warning about virtual cConfig::Load() functions
+ for reporting a warning about character comparison in libsi/si.c
Andy Carter <fruit@ukgateway.net>
for helping to test new DVB-T handling
@@ -584,6 +586,7 @@ Andreas Kool <akool@akool.de>
for reporting a problem with empty values in setup.conf
for fixing detecting the /dev/videoN devices for GRAB in case there are others
before the DVB devices
+ for fixing a possible NULL pointer access in cEITScanner::Process()
Guy Roussin <guy.roussin@teledetection.fr>
for suggesting not to display channel group delimiters without text
@@ -635,6 +638,9 @@ Teemu Rantanen <tvr@iki.fi>
for adding TS error checking to remux.c
for pinpointing a problem with excessive memmove() calls in 'Transfer Mode'
for fixing faulty calculation of section length in eit.c
+ for reporting a problem in calculation of channel ids for tv stations that use
+ the undefined NID value 0
+ for adding EPG preferred languages
Jan Ekholm <chakie@infa.abo.fi>
for adding/improving some Swedish language OSD texts
@@ -647,6 +653,7 @@ Marcel Wiesweg <marcel.wiesweg@gmx.de>
currently not transmitting
for fixing volume display in case a plugin has its own OSD open
for providing 'libsi' and adapting the EIT mechanisms to it
+ for fixing testing for matching section filters in case they are turned off
Torsten Herz <torsten.herz@web.de>
for fixing a possible deadlock when using the "Blue" button in the "Schedules" menu
@@ -670,6 +677,7 @@ Sascha Volkenandt <sascha@akv-soft.de>
for making the 'epg.data' file being read after all plugins have been started
for reporting a problem with cReceivers that use a ring buffer and didn't immediately
return from their Receive() function if the buffer runs full
+ for reporting a crash in case there is no DVB hardware present
Malcolm Caldwell <malcolm.caldwell@ntu.edu.au>
for modifying LOF handling to allow for C-band reception
@@ -887,3 +895,10 @@ Pedro Miguel Sequeira de Justo Teixeira <pedro.miguel.teixeira@bigfoot.com>
Antonino Sergi <voyaser@tiscalinet.it>
for adding 'StreamType' setting to CAM communication
+
+Martin Holst <holstm@gmx.de>
+ for reporting a lockup in 1.3.0 when the EPG scanner kicks in
+
+Robert Huitl <vdr@huitl.de>
+ for fixing 'su' call in 'runvdr' to make it work on systems that require the
+ user name to appear before the command option
diff --git a/HISTORY b/HISTORY
index e3fe7bc..bef76aa 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2537,3 +2537,37 @@ Video Disk Recorder Revision History
- Limited the line length in the EPG bugfix report, which appears to fix a buffer
overflow that caused a crash when cleaning up the EPG data (at 05:00 in the
morning).
+
+2004-01-11: Version 1.3.1
+
+- Fixed a lockup in the EPG scanner when no non-primary device was available
+ (thanks to Martin Holst for reporting this one).
+- Fixed a compiler warning about virtual cConfig::Load() functions (thanks to
+ Lauri Tischler for reporting this one).
+- Fixed a warning about character comparison in libsi/si.c (thanks to Lauri
+ Tischler for reporting this one).
+- The new parameter "Update channels" in the "Setup/DVB" menu can be used to
+ control if and how channels will be automatically updated (see MANUAL).
+ This has already been part of the 'autopid' patch by Andreas Schultz and has
+ now been adopted.
+- Fixed a crash in case there is no DVB hardware present (thanks to Sascha
+ Volkenandt for reporting this one).
+- Changed calculation of channel ids to make it work for tv stations that use
+ the undefined NID value 0 (thanks to Teemu Rantanen for reporting this one).
+- Enhanced the SDT filter to handle multi part sections.
+- Added support for selecting preferred EPG languages (based upon a patch by
+ Teemu Rantanen).
+- Fixed a 'const' in libsi/si.h (thanks to Marcel Wiesweg).
+- Fixed the 'su' call in 'runvdr' to make it work on systems that require the
+ user name to appear before the command option (thanks to Robert Huitl).
+- Fixed testing for matching section filters in case they are turned off (thanks
+ to Marcel Wiesweg).
+- In case of incomplete sections an error message is now logged only every 10
+ seconds.
+- Fixed a possible NULL pointer access in cEITScanner::Process() (thanks to
+ Andreas Kool).
+- The actual transponder data is now taken from the NIT and existing channels
+ are adjusted if necessary. If the NIT contains new transponders, they are
+ scanned for channels during the next EPG scan. Note that only the satellite
+ branches are tested, cable and terrestrial need to be tested by somebody who
+ actually has such equipment.
diff --git a/MANUAL b/MANUAL
index 8687e70..1873c51 100644
--- a/MANUAL
+++ b/MANUAL
@@ -482,6 +482,19 @@ Version 1.2
be taken. Note that in order to set the system time from
the transponder data the option "Set system time" must also
be enabled.
+ Preferred languages = 0
+ Some tv stations broadcast their EPG data in various
+ different languages. This option allows you to define
+ which language(s) you prefer in such cases. By default,
+ or if none of the preferred languages is broadcast, any
+ language will be accepted and the EPG data will be
+ displayed in the first language received from the data
+ stream. If this option is set to a non-zero value, the
+ menu page will contain that many "Preferred language"
+ options which allow you to select the individual preferred
+ languages. If an actual EPG data record is received in
+ different languages, the preferred languages are checked
+ in the given order to decide which one to take.
DVB:
@@ -498,6 +511,12 @@ Version 1.2
Video format = 4:3 The video format (or aspect ratio) of the tv set in use
(4:3 or 16:9).
+ Update channels = 4 Controls the automatic channel update function. '0' means
+ no update, '1' will only update channel names, '2' will
+ update channel names and PIDs, '3' will perform all
+ updates and also add newly found channels, and '4' will
+ also add newly found transponders.
+
LNB:
SLOF = 11700 The switching frequency (in MHz) between low and
diff --git a/Makefile b/Makefile
index cc3a3a9..eb1ccac 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: Makefile 1.62 2003/12/25 13:38:56 kls Exp $
+# $Id: Makefile 1.63 2004/01/10 14:11:57 kls Exp $
.DELETE_ON_ERROR:
@@ -35,7 +35,7 @@ SILIB = $(LSIDIR)/libsi.a
OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbosd.o\
dvbplayer.o dvbspu.o eit.o eitscan.o epg.o filter.o font.o i18n.o interface.o keys.o\
- lirc.o menu.o menuitems.o osdbase.o osd.o pat.o player.o plugin.o rcu.o\
+ lirc.o menu.o menuitems.o nit.o osdbase.o osd.o pat.o player.o plugin.o rcu.o\
receiver.o recorder.o recording.o remote.o remux.o ringbuffer.o sdt.o sections.o sources.o\
spu.o status.o svdrp.o thread.o timers.o tools.o transfer.o vdr.o videodir.o
diff --git a/README.developer b/README.developer
index eabb091..6b76566 100644
--- a/README.developer
+++ b/README.developer
@@ -32,7 +32,6 @@ Here's a list of the highlights - and what _not_ to expect yet
use the device that contains the proper CAM.
- No NVOD or "linked services" support yet.
- No radio support yet.
-- No transponder scan yet.
Note that this is currently work in progress, so there may be some
areas that don't work as smooth as expected, yet.
@@ -77,7 +76,8 @@ Known bugs:
are switched, and there is still an SDT data packet being processed.
The call to device->HasLock() in sections.c should fix this (and it
apparently does for most cases), but there must still be soemthing
- wrong in that area.
+ wrong in that area. This may be fixed in 1.3.1 - please report if
+ it does still happen there.
- Sometimes the current channel gets re-tuned even though the channel
data of this channel didn't change (but that of an other channel did
change).
diff --git a/channels.c b/channels.c
index 9a7965f..67ee2b5 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.17 2004/01/04 12:28:49 kls Exp $
+ * $Id: channels.c 1.19 2004/01/11 15:52:32 kls Exp $
*/
#include "channels.h"
@@ -160,25 +160,6 @@ char *cChannel::buffer = NULL;
cChannel::cChannel(void)
{
memset(&__BeginData__, 0, (char *)&__EndData__ - (char *)&__BeginData__);
- strcpy(name, "Pro7");
- frequency = 12480;
- source = cSource::FromString("S19.2E");
- srate = 27500;
- vpid = 255;
- ppid = 0;
- apid1 = 256;
- apid2 = 0;
- dpid1 = 257;
- dpid2 = 0;
- tpid = 32;
- caids[0] = 0;
- nid = 0;
- tid = 0;
- sid = 888;
- rid = 0;
- number = 0;
- groupSep = false;
- polarization = 'v';
inversion = INVERSION_AUTO;
bandwidth = BANDWIDTH_AUTO;
coderateH = FEC_AUTO;
@@ -227,7 +208,7 @@ int cChannel::Transponder(void) const
tChannelID cChannel::GetChannelID(void) const
{
- return tChannelID(source, nid, nid ? tid : Transponder(), sid, rid);
+ return tChannelID(source, nid, (nid || tid) ? tid : Transponder(), sid, rid);
}
int cChannel::Modification(int Mask)
@@ -237,6 +218,68 @@ int cChannel::Modification(int Mask)
return Result;
}
+bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, bool Log)
+{
+ // Workarounds for broadcaster stupidity:
+ // Some providers broadcast the transponder frequency of their channels with two different
+ // values (like 12551 and 12552), so we need to allow for a little tolerance here
+ if (abs(frequency - Frequency) <= 1)
+ Frequency = frequency;
+ // Sometimes the transponder frequency is set to 0, which is just wrong
+ if (Frequency == 0)
+ return false;
+
+ if (source != Source || frequency != Frequency || polarization != Polarization || srate != Srate || coderateH != CoderateH) {
+ if (Log)
+ dsyslog("changing transponder data of channel %d from %s:%d:%c:%d:%d to %s:%d:%c:%d:%d", Number(), cSource::ToString(source), frequency, polarization, srate, coderateH, cSource::ToString(Source), Frequency, Polarization, Srate, CoderateH);
+ source = Source;
+ frequency = Frequency;
+ polarization = Polarization;
+ srate = Srate;
+ coderateH = CoderateH;
+ modulation = QPSK;
+ modification |= CHANNELMOD_TRANSP;
+ Channels.SetModified();
+ }
+ return true;
+}
+
+bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH, bool Log)
+{
+ if (source != Source || frequency != Frequency || modulation != Modulation || srate != Srate || coderateH != CoderateH) {
+ if (Log)
+ dsyslog("changing transponder data of channel %d from %s:%d:%d:%d:%d to %s:%d:%d:%d:%d", Number(), cSource::ToString(source), frequency, modulation, srate, coderateH, cSource::ToString(Source), Frequency, Modulation, Srate, CoderateH);
+ source = Source;
+ frequency = Frequency;
+ modulation = Modulation;
+ srate = Srate;
+ coderateH = CoderateH;
+ modification |= CHANNELMOD_TRANSP;
+ Channels.SetModified();
+ }
+ return true;
+}
+
+bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CoderateH, int CoderateL, int Guard, int Transmission, bool Log)
+{
+ if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || coderateL != CoderateL || guard != Guard || transmission != Transmission) {
+ if (Log)
+ dsyslog("changing transponder data of channel %d from %s:%d:%d:%d:%d:%d:%d:%d:%d to %s:%d:%d:%d:%d:%d:%d:%d:%d", Number(), cSource::ToString(source), frequency, bandwidth, modulation, hierarchy, coderateH, coderateL, guard, transmission, cSource::ToString(Source), Frequency, Bandwidth, Modulation, Hierarchy, CoderateH, CoderateL, Guard, Transmission);
+ source = Source;
+ frequency = Frequency;
+ bandwidth = Bandwidth;
+ modulation = Modulation;
+ hierarchy = Hierarchy;
+ coderateH = CoderateH;
+ coderateL = CoderateL;
+ guard = Guard;
+ transmission = Transmission;
+ modification |= CHANNELMOD_TRANSP;
+ Channels.SetModified();
+ }
+ return true;
+}
+
void cChannel::SetId(int Nid, int Tid, int Sid, int Rid, bool Log)
{
if (nid != Nid || tid != Tid || sid != Sid || rid != Rid) {
@@ -382,9 +425,9 @@ bool cChannel::StringToParameters(const char *s)
case 'G': s = ParseParameter(s, guard, GuardValues); break;
case 'H': polarization = *s++; break;
case 'I': s = ParseParameter(s, inversion, InversionValues); break;
- // 'L' reserved for possible circular polarization
+ case 'L': polarization = *s++; break;
case 'M': s = ParseParameter(s, modulation, ModulationValues); break;
- // 'R' reserved for possible circular polarization
+ case 'R': polarization = *s++; break;
case 'T': s = ParseParameter(s, transmission, TransmissionValues); break;
case 'V': polarization = *s++; break;
case 'Y': s = ParseParameter(s, hierarchy, HierarchyValues); break;
@@ -675,18 +718,16 @@ bool cChannels::Modified(void)
return Result;
}
-cChannel *cChannels::NewChannel(int Source, int Transponder, const char *Name, int Nid, int Tid, int Sid, int Rid)
+cChannel *cChannels::NewChannel(const cChannel *Transponder, const char *Name, int Nid, int Tid, int Sid, int Rid)
{
- dsyslog("creating new channel '%s' on %s transponder %d with id %d-%d-%d-%d", Name, cSource::ToString(Source), Transponder, Nid, Tid, Sid, Rid);
- for (cChannel *channel = First(); channel; channel = Next(channel)) {
- if (!channel->GroupSep() && channel->Source() == Source && ISTRANSPONDER(channel->Transponder(), Transponder)) {
- cChannel *NewChannel = new cChannel(channel);
- Add(NewChannel);
- ReNumber();
- NewChannel->SetId(Nid, Tid, Sid, Rid, false);
- NewChannel->SetName(Name, false);
- return NewChannel;
- }
- }
+ if (Transponder) {
+ dsyslog("creating new channel '%s' on %s transponder %d with id %d-%d-%d-%d", Name, cSource::ToString(Transponder->Source()), Transponder->Transponder(), Nid, Tid, Sid, Rid);
+ cChannel *NewChannel = new cChannel(Transponder);
+ Add(NewChannel);
+ ReNumber();
+ NewChannel->SetId(Nid, Tid, Sid, Rid, false);
+ NewChannel->SetName(Name, false);
+ return NewChannel;
+ }
return NULL;
}
diff --git a/channels.conf b/channels.conf
index b1ad616..10628ac 100644
--- a/channels.conf
+++ b/channels.conf
@@ -1,95 +1,95 @@
-RTL,RTL Television:12188:h:S19.2E:27500:163:104:105:0:12003:1:1089:0
-SAT.1:12480:v:S19.2E:27500:1791:1792;1795:34:0:46:133:33:0
-ProSieben:12480:v:S19.2E:27500:255:256;257:32:0:898:133:33:0
-RTL2:12188:h:S19.2E:27500:166:128:68:0:12020:1:1089:0
-Das Erste:11837:h:S19.2E:27500:101:102:104:0:28106:1:1101:0
-Bayerisches FS:11837:h:S19.2E:27500:201:202:204:0:28107:1:1101:0
-hessen fernsehen:11837:h:S19.2E:27500:301:302:304:0:28108:1:1101:0
-NDR FS MV:12110:h:S19.2E:27500:2401:2402:2404:0:28224:1:1073:0
-SR Fernsehen Suedwest:11837:h:S19.2E:27500:501:502:504:0:28110:1:1101:0
-WDR FERNSEHEN:11837:h:S19.2E:27500:601:602:604:0:28111:1:1101:0
-BR-alpha:11837:h:S19.2E:27500:701:702:704:0:28112:1:1101:0
-SÜDWEST BW:11837:h:S19.2E:27500:801:802:804:0:28113:1:1101:0
-Phoenix:11837:h:S19.2E:27500:901:902:904:0:28114:1:1101:0
-ZDF:11954:h:S19.2E:27500:110:120;125:130:0:28006:1:1079:0
-3sat:11954:h:S19.2E:27500:210:220:230:0:28007:1:1079:0
-KiKa:11954:h:S19.2E:27500:310:320:330:0:28008:1:1079:0
-arte:11836:h:S19.2E:27500:401:402,403:404:0:28109:1:1101:0
-ORF 1:12692:h:S19.2E:22000:160:161;163:165:1762,D05,1702,1801:13001:1:1117:0
-ORF 2:12692:h:S19.2E:22000:500:501;503:505:1762,D05,1702,1801:13002:1:1117:0
-ZDFinfokanal:11954:h:S19.2E:27500:610:620:130:0:28011:1:1079:0
-CNN Int.:11778:v:S19.2E:27500:165:100:47:0:28522:1:1068:0
-S RTL,Super RTL:12188:h:S19.2E:27500:165:120:65:0:12040:1:1089:0
-VOX:12188:h:S19.2E:27500:167:136:71:0:12060:1:1089:0
-KABEL1:12480:v:S19.2E:27500:511:512:33:0:899:133:33:0
-NEUN LIVE,NEUN LIVE Television:12480:v:S19.2E:27500:767:768:35:0:897:133:33:0
-DSF:12480:v:S19.2E:27500:1023:1024:0:0:900:133:33:0
-HSEurope,Home Shopping Europe:12480:v:S19.2E:27500:1279:1280:37:0:40:133:33:0
-Bloomberg TV Germany:12552:v:S19.2E:22000:162:99:0:0:12160:1:1108:0
-EURONEWS:11817:v:S19.2E:27500:163:92,93:0:500,100:8004:1:1070:0
-Sky News:11597:v:S19.2E:22000:305:306:0:0:28707:1:1026:0
-Veronica/FoxKids:12574:h:S19.2E:22000:518+8190:92:38:622,602,100:5020:53:1109:0
-BVN:12574:h:S19.2E:22000:515+8190:96:36:0:5025:53:1109:0
-CNBC Europe:12610:v:S19.2E:22000:944:945:0:0:12200:1:1112:0
-n-tv:12670:v:S19.2E:22000:162:96:55:0:12730:1:1116:0
-Al Jazeera:11568:v:S19.2E:22000:55:56:0:0:9021:1:1024:0
-TW1:12692:h:S19.2E:22000:166:167:168:0:13013:1:1117:0
-Eurosport:11954:h:S19.2E:27500:410:420:430:0:28009:1:1079:0
-EinsExtra:12110:h:S19.2E:27500:101:102:0:0:28201:1:1073:0
-EinsFestival:12110:h:S19.2E:27500:201:202:0:0:28202:1:1073:0
-EinsMuXx:12110:h:S19.2E:27500:301:302:0:0:28203:1:1073:0
-ZDFtheaterkanal:11954:h:S19.2E:27500:1110:1120:130:0:28016:1:1079:0
-ZDFdokukanal:11954:h:S19.2E:27500:660:670:130:0:28014:1:1079:0
-MDR FERNSEHEN:12110:h:S19.2E:27500:401:402:404:0:28204:1:1073:0
-RBB Brandenburg:12110:h:S19.2E:27500:501:502:504:0:28205:1:1073:0
-RBB Berlin:12110:h:S19.2E:27500:601:602:604:0:28206:1:1073:0
+RTL,RTL Television:12187:hC34:S19.2E:27500:163:104:105:0:12003:1:1089:0
+SAT.1:12480:vC34:S19.2E:27500:1791:1792;1795:34:0:46:133:33:0
+ProSieben:12480:vC34:S19.2E:27500:255:256;257:32:0:898:133:33:0
+RTL2:12187:hC34:S19.2E:27500:166:128:68:0:12020:1:1089:0
+Das Erste:11836:hC34:S19.2E:27500:101:102:104:0:28106:1:1101:0
+Bayerisches FS:11836:hC34:S19.2E:27500:201:202:204:0:28107:1:1101:0
+hessen fernsehen:11836:hC34:S19.2E:27500:301:302:304:0:28108:1:1101:0
+NDR FS MV:12109:hC34:S19.2E:27500:2401:2402:2404:0:28224:1:1073:0
+SR Fernsehen Suedwest:11836:hC34:S19.2E:27500:501:502:504:0:28110:1:1101:0
+WDR Köln:11836:hC34:S19.2E:27500:601:602:604:0:28111:1:1101:0
+BR-alpha:11836:hC34:S19.2E:27500:701:702:704:0:28112:1:1101:0
+SÜDWEST BW:11836:hC34:S19.2E:27500:801:802:804:0:28113:1:1101:0
+Phoenix:11836:hC34:S19.2E:27500:901:902:904:0:28114:1:1101:0
+ZDF:11953:hC34:S19.2E:27500:110:120;125:130:0:28006:1:1079:0
+3sat:11953:hC34:S19.2E:27500:210:220:230:0:28007:1:1079:0
+KiKa:11953:hC34:S19.2E:27500:310:320:330:0:28008:1:1079:0
+arte:11836:hC34:S19.2E:27500:401:402,403:404:0:28109:1:1101:0
+ORF 1:12692:hC56:S19.2E:22000:160:161,162;163:165:1762,D05,1702,1801:13001:1:1117:0
+ORF 2:12692:hC56:S19.2E:22000:500:501;503:505:1762,D05,1702,1801:13002:1:1117:0
+ZDFinfokanal:11953:hC34:S19.2E:27500:610:620:130:0:28011:1:1079:0
+CNN Int.:11778:vC34:S19.2E:27500:165:100:47:0:28522:1:1068:0
+S RTL,Super RTL:12187:hC34:S19.2E:27500:165:120:65:0:12040:1:1089:0
+VOX:12187:hC34:S19.2E:27500:167:136:71:0:12060:1:1089:0
+KABEL1:12480:vC34:S19.2E:27500:511:512:33:0:899:133:33:0
+NEUN LIVE,NEUN LIVE Television:12480:vC34:S19.2E:27500:767:768:35:0:897:133:33:0
+DSF:12480:vC34:S19.2E:27500:1023:1024:0:0:900:133:33:0
+HSEurope,Home Shopping Europe:12480:vC34:S19.2E:27500:1279:1280:37:0:40:133:33:0
+Bloomberg TV Germany:12552:vC56:S19.2E:22000:162:99:0:0:12160:1:1108:0
+EURONEWS:11817:vC34:S19.2E:27500:163:92,93:0:500,100:8004:1:1070:0
+Sky News:11597:vC56:S19.2E:22000:305:306:0:0:28707:1:1026:0
+Veronica/FoxKids:12574:hC56:S19.2E:22000:518+8190:92:38:622,602,100:5020:53:1109:0
+BVN:12574:hC56:S19.2E:22000:515+8190:96:36:0:5025:53:1109:0
+CNBC Europe:12610:vC56:S19.2E:22000:944:945:0:0:12200:1:1112:0
+n-tv:12669:vC56:S19.2E:22000:162:96:55:0:12730:1:1116:0
+Al Jazeera:11567:vC56:S19.2E:22000:55:56:0:0:9021:1:1024:0
+TW1:12692:hC56:S19.2E:22000:166:167:168:0:13013:1:1117:0
+Eurosport:11953:hC34:S19.2E:27500:410:420:430:0:28009:1:1079:0
+EinsExtra:12109:hC34:S19.2E:27500:101:102:0:0:28201:1:1073:0
+EinsFestival:12109:hC34:S19.2E:27500:201:202:0:0:28202:1:1073:0
+EinsMuXx:12109:hC34:S19.2E:27500:301:302:0:0:28203:1:1073:0
+ZDFtheaterkanal:11953:hC34:S19.2E:27500:1110:1120:130:0:28016:1:1079:0
+ZDFdokukanal:11953:hC34:S19.2E:27500:660:670:130:0:28014:1:1079:0
+MDR FERNSEHEN:12109:hC34:S19.2E:27500:401:402:404:0:28204:1:1073:0
+RBB Brandenburg:12109:hC34:S19.2E:27500:501:502:504:0:28205:1:1073:0
+RBB Berlin:12109:hC34:S19.2E:27500:601:602:604:0:28206:1:1073:0
:Premiere World
-START,PREMIERE START:11797:h:S19.2E:27500:255:256:32:1702,1722,1801:8:133:2:0
-PREM 1,PREMIERE 1:11797:h:S19.2E:27500:511:512,513;515:0:1702,1722,1801:10:133:2:0
-PREM 2,PREMIERE 2:11797:h:S19.2E:27500:1791:1792,1793;1795:0:1702,1722,1801:11:133:2:0
-PREM 3,PREMIERE 3:11797:h:S19.2E:27500:2303:2304,2305:0:1702,1722,1801:43:133:2:0
-PREM 4,PREMIERE 4:11797:h:S19.2E:27500:767:768,769:0:1702,1722,1801:9:133:2:0
-PREM 5,PREMIERE 5:11797:h:S19.2E:27500:1279:1280,1281:0:1702,1722,1801:29:133:2:0
-PREM 6,PREMIERE 6:11797:h:S19.2E:27500:1535:1536:0:1702,1722,1801:41:133:2:0
-PREM 7,PREMIERE 7:11797:h:S19.2E:27500:1023:1024:0:1702,1722,1801:20:133:2:0
-DISNEY,DISNEY CHANNEL:11758:h:S19.2E:27500:2559:2560:0:1702,1722,1801:34:133:17:0
+START,PREMIERE START:11797:hC34:S19.2E:27500:255:256:32:1702,1722,1801:8:133:2:0
+PREM 1,PREMIERE 1:11797:hC34:S19.2E:27500:511:512,513;515:0:1702,1722,1801:10:133:2:0
+PREM 2,PREMIERE 2:11797:hC34:S19.2E:27500:1791:1792,1793;1795:0:1702,1722,1801:11:133:2:0
+PREM 3,PREMIERE 3:11797:hC34:S19.2E:27500:2303:2304,2305:0:1702,1722,1801:43:133:2:0
+PREM 4,PREMIERE 4:11797:hC34:S19.2E:27500:767:768,769:0:1702,1722,1801:9:133:2:0
+PREM 5,PREMIERE 5:11797:hC34:S19.2E:27500:1279:1280,1281:0:1702,1722,1801:29:133:2:0
+PREM 6,PREMIERE 6:11797:hC34:S19.2E:27500:1535:1536:0:1702,1722,1801:41:133:2:0
+PREM 7,PREMIERE 7:11797:hC34:S19.2E:27500:1023:1024:0:1702,1722,1801:20:133:2:0
+DISNEY,DISNEY CHANNEL:11758:hC34:S19.2E:27500:2559:2560:0:1702,1722,1801:34:133:17:0
:Premiere Direkt
-DIREKT,PREMIERE DIREKT:12031:h:S19.2E:27500:2815:2816,2817;2819:0:0:18:133:4:0
+DIREKT,PREMIERE DIREKT:12031:hC34:S19.2E:27500:2815:2816,2817;2819:0:0:18:133:4:0
:PW Erotic
-B-UHSE,BEATE-UHSE.TV:12071:h:S19.2E:27500:1023:1024:0:1702,1722,1801:21:133:1:0
-EROTIK,PREMIERE EROTIK:12031:h:S19.2E:27500:1279:0:0:1702,1722,1801:513:133:4:0
+B-UHSE,BEATE-UHSE.TV:12070:hC34:S19.2E:27500:1023:1024:0:1702,1722,1801:21:133:1:0
+EROTIK,PREMIERE EROTIK:12031:hC34:S19.2E:27500:1279:0:0:1702,1722,1801:513:133:4:0
:Sportsworld
-SPORT 1,PREMIERE SPORT 1:11720:h:S19.2E:27500:255:256,257:0:1702,1722,1801:17:133:3:0
-SPORT 2,PREMIERE SPORT 2:12031:h:S19.2E:27500:3839:3840,3841:0:1702,1722,1801:27:133:4:0
+SPORT 1,PREMIERE SPORT 1:11719:hC34:S19.2E:27500:255:256,257:0:1702,1722,1801:17:133:3:0
+SPORT 2,PREMIERE SPORT 2:12031:hC34:S19.2E:27500:3839:3840,3841:0:1702,1722,1801:27:133:4:0
:Beta Digital
-N24:12480:v:S19.2E:27500:2047:2048:36:0:47:133:33:0
-CNBC:11954:h:S19.2E:27500:510:520:530:0:28010:1:1079:0
-Liberty TV.com:12610:v:S19.2E:22000:941:943:0:0:12199:1:1112:0
+N24:12480:vC34:S19.2E:27500:2047:2048:36:0:47:133:33:0
+CNBC:11953:hC34:S19.2E:27500:510:520:530:0:28010:1:1079:0
+Liberty TV.com:12610:vC56:S19.2E:22000:941:943:0:0:12199:1:1112:0
:-
-ProSieben Austria:12051:v:S19.2E:27500:161:84:36:0:20002:1:1082:0
-Kabel 1 Schweiz:12051:v:S19.2E:27500:162:163:165:0:20003:1:1082:0
-Kabel 1 Austria:12051:v:S19.2E:27500:166:167:169:0:20004:1:1082:0
-ProSieben Schweiz:12051:v:S19.2E:27500:289:290:33:0:20001:1:1082:0
-FRANCE 5:12207:v:S19.2E:27500:160:80:32:0:8501:1:1090:0
-LCP:12207:v:S19.2E:27500:165:100:0:0:8506:1:1090:0
-ESCALES:12285:v:S19.2E:27500:165:100:0:500,100:17025:1:1094:0
-CANAL CLUB:12324:v:S19.2E:27500:160:80:0:0:8612:1:1096:0
-ASTRA-Mosaic:12552:v:S19.2E:22000:175:176:0:0:3988:1:1108:0
-ASTRA-Mosaic 2:12552:v:S19.2E:22000:179:120:0:0:3987:1:1108:0
-ASTRA-Mosaic 3:12552:v:S19.2E:22000:182:169:0:0:3986:1:1108:0
-ASTRA-Mosaic 4:12552:v:S19.2E:22000:185:170:0:0:3985:1:1108:0
-ASTRA-Mosaic 5:12552:v:S19.2E:22000:163:164:0:0:3984:1:1108:0
-Chamber TV:12552:v:S19.2E:22000:55:56:0:0:12180:1:1108:0
-RTL TELE Letzebuerg:12552:v:S19.2E:22000:168:144,146:74:0:3994:1:1108:0
-Yorin:12574:h:S19.2E:22000:512+8190:84:33:622,602,100:5010:53:1109:0
-MTV2 Pop Channel:12225:h:S19.2E:27500:513:661:577:0:28640:1:1091:0
+ProSieben Austria:12051:vC34:S19.2E:27500:161:84:36:0:20002:1:1082:0
+Kabel 1 Schweiz:12051:vC34:S19.2E:27500:162:163:165:0:20003:1:1082:0
+Kabel 1 Austria:12051:vC34:S19.2E:27500:166:167:169:0:20004:1:1082:0
+ProSieben Schweiz:12051:vC34:S19.2E:27500:289:290:33:0:20001:1:1082:0
+FRANCE 5:12207:vC34:S19.2E:27500:160:80:32:0:8501:1:1090:0
+LCP:12207:vC34:S19.2E:27500:165:100:0:0:8506:1:1090:0
+ESCALES:12285:vC34:S19.2E:27500:165:100:0:500,100:17025:1:1094:0
+CANAL CLUB:12324:vC34:S19.2E:27500:160:80:0:0:8612:1:1096:0
+ASTRA-Mosaic:12552:vC56:S19.2E:22000:175:176:0:0:3988:1:1108:0
+ASTRA-Mosaic 2:12552:vC56:S19.2E:22000:179:120:0:0:3987:1:1108:0
+ASTRA-Mosaic 3:12552:vC56:S19.2E:22000:182:169:0:0:3986:1:1108:0
+ASTRA-Mosaic 4:12552:vC56:S19.2E:22000:185:170:0:0:3985:1:1108:0
+ASTRA-Mosaic 5:12552:vC56:S19.2E:22000:163:164:0:0:3984:1:1108:0
+Chamber TV:12552:vC56:S19.2E:22000:55:56:0:0:12180:1:1108:0
+RTL TELE Letzebuerg:12552:vC56:S19.2E:22000:168:144,146:74:0:3994:1:1108:0
+Yorin:12574:hC56:S19.2E:22000:512+8190:84:33:622,602,100:5010:53:1109:0
+MTV2 Pop Channel:12226:hC34:S19.2E:27500:513:661:577:0:28640:1:1091: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
-VIVA:12670:v:S19.2E:22000:309:310:311:0:12732:1:1116:0
-VIVA PLUS:12552:v:S19.2E:22000:171:172:173:0:12120:1:1108:0
-MTV Central:11739:v:S19.2E:27500:3031:3032:3034:0:28653:1:1066:0
-QVC GERMANY:12552:v:S19.2E:22000:165:166:167:0:12100:1:1108:0
-TELE 5:12480:v:S19.2E:27500:1535:1536:38:0:51:133:33:0
+VIVA:12669:vC56:S19.2E:22000:309:310:311:0:12732:1:1116:0
+VIVA PLUS:12552:vC56:S19.2E:22000:171:172:173:0:12120:1:1108:0
+MTV Central:11739:vC34:S19.2E:27500:3031:3032:3034:0:28653:1:1066:0
+QVC GERMANY:12552:vC56:S19.2E:22000:165:166:167:0:12100:1:1108:0
+TELE 5:12480:vC34:S19.2E:27500:1535:1536:38:0:51:133:33:0
:@201 Sky
Sky One:106:h:S28.2E:0:160:80:0:30:222:0:0:0
Sky One Mix:107:h:S28.2E:0:160:80:0:30:919:0:0:0
@@ -97,14 +97,14 @@ itv2:226:h:S28.2E:0:160:80:0:30:451:0:0:0
sci-fi:130:h:S28.2E:0:160:80:0:30:161:0:0:0
Paramount Comedy:127:h:S28.2E:0:160:80:0:30:185:0:0:0
:@900 Some 'seed' channels
-Chelsea TV:11778:v:S28.2E:27500:2308+2304:2309:0:960,961:9307:2:2004:0
-Sky One:12285:v:S28.2E:27500:2311+2304:2312,2313:2307:960,961:4703:2:2030:0
-WDR Münster:12421:h:S19.2E:27500:101:102:104:0:28310:1:1201:0
-Going Places:10921:h:S28.2E:22000:2310+2304:2311:2312:0:5008:2:2055:0
-Animal Plnt+:12070:h:S28.2E:27500:2315+2307:2316:0:960,961:50002:2:2019:0
-S1T:11954:h:S28.2E:27500:0:0:0:0:4409:2:2030:0
-CNN:12032:v:S28.2E:27500:2309:2311:2310:0:7140:2:2018:0
-BBC PARL'MNT:12129:v:S28.2E:27500:2306:2308,2309:2307:0:7300:2:2022:0
-AL HAYAT:11200:v:S13.0E:27500:413:414:0:0:4733:318:13400:0
-EURO1080:12168:v:S19.2E:27500:308:256:0:FF:21100:1:1088:0
+Chelsea TV:11778:vC23:S28.2E:27500:2308+2304:2309:0:960,961:9307:2:2004:0
+Sky One:12285:vC23:S28.2E:27500:2311+2304:2312,2313:2307:960,961:4703:2:2030:0
+WDR Münster:12421:hC34:S19.2E:27500:101:102:104:0:28310:1:1201:0
+Going Places:10920:hC56:S28.2E:22000:2310+2304:2311:2312:0:5008:2:2055:0
+Animal Plnt+:12070:hC23:S28.2E:27500:2315+2307:2316:0:960,961:50002:2:2019:0
+S1T:12285:vC23:S28.2E:27500:2311+2304:2312,2313:2314:960,961:4409:2:2030:0
+CNN:12051:vC23:S28.2E:27500:2309:2311:2310:0:7140:2:2018:0
+BBC PARL'MNT:12129:vC23:S28.2E:27500:2306:2308,2309:2307:0:7300:2:2022:0
+AL HAYAT:11200:vC56:S13.0E:27500:413:414:0:0:4733:318:13400:0
+EURO1080:12168:vC34:S19.2E:27500:308:256:0:FF:21100:1:1088:0
:@1000 New channels
diff --git a/channels.h b/channels.h
index c3d9ad4..64c05eb 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.10 2004/01/04 12:26:37 kls Exp $
+ * $Id: channels.h 1.12 2004/01/11 15:20:18 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -23,7 +23,8 @@
#define CHANNELMOD_PIDS 0x02
#define CHANNELMOD_ID 0x04
#define CHANNELMOD_CA 0x10
-#define CHANNELMOD_RETUNE (CHANNELMOD_PIDS | CHANNELMOD_CA)
+#define CHANNELMOD_TRANSP 0x20
+#define CHANNELMOD_RETUNE (CHANNELMOD_PIDS | CHANNELMOD_CA | CHANNELMOD_TRANSP)
#define MAXAPIDS 2
#define MAXCAIDS 8
@@ -142,6 +143,9 @@ public:
bool IsTerr(void) const { return (source & cSource::st_Mask) == cSource::stTerr; }
tChannelID GetChannelID(void) const;
int Modification(int Mask = CHANNELMOD_ALL);
+ bool SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, bool Log = true);
+ bool SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH, bool Log = true);
+ bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission, bool Log = true);
void SetId(int Nid, int Tid, int Sid, int Rid = 0, bool Log = true);
void SetName(const char *Name, bool Log = true);
void SetPids(int Vpid, int Ppid, int Apid1, int Apid2, int Dpid1, int Dpid2, int Tpid);
@@ -156,7 +160,7 @@ private:
int beingEdited;
public:
cChannels(void);
- virtual bool Load(const char *FileName, bool AllowComments = false, bool MustExist = false);
+ bool Load(const char *FileName, bool AllowComments = false, bool MustExist = false);
int GetNextGroup(int Idx); // Get next channel group
int GetPrevGroup(int Idx); // Get previous channel group
int GetNextNormal(int Idx); // Get next normal channel (not group)
@@ -172,7 +176,7 @@ public:
int MaxNumber(void) { return maxNumber; }
void SetModified(void);
bool Modified(void);
- cChannel *NewChannel(int Source, int Transponder, const char *Name, int Nid, int Tid, int Sid, int Rid = 0);
+ cChannel *NewChannel(const cChannel *Transponder, const char *Name, int Nid, int Tid, int Sid, int Rid = 0);
};
extern cChannels Channels;
diff --git a/config.c b/config.c
index d3f2db7..6caf587 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.117 2003/10/17 14:11:27 kls Exp $
+ * $Id: config.c 1.120 2004/01/11 15:38:11 kls Exp $
*/
#include "config.h"
@@ -259,6 +259,7 @@ cSetup::cSetup(void)
TimeTransponder = 0;
MarginStart = 2;
MarginStop = 10;
+ EPGLanguages[0] = -1;
EPGScanTimeout = 5;
EPGBugfixLevel = 2;
SVDRPTimeout = 300;
@@ -272,6 +273,7 @@ cSetup::cSetup(void)
UseSubtitle = 1;
RecordingDirs = 1;
VideoFormat = 0;
+ UpdateChannels = 4;
RecordDolbyDigital = 1;
ChannelInfoPos = 0;
OSDwidth = 52;
@@ -394,6 +396,39 @@ bool cSetup::ParseCaCaps(const char *Value)
return false;
}
+void cSetup::StoreLanguages(const char *Name, int *Values)
+{
+ char buffer[I18nNumLanguages * 4];
+ char *q = buffer;
+ for (int i = 0; i < I18nNumLanguages; i++) {
+ if (Values[i] < 0)
+ break;
+ const char *s = I18nLanguageAbbreviation(Values[i]);
+ if (s) {
+ if (q > buffer)
+ *q++ = ' ';
+ strncpy(q, s, 3);
+ q += 3;
+ }
+ }
+ *q = 0;
+ Store(Name, buffer);
+}
+
+bool cSetup::ParseLanguages(const char *Value, int *Values)
+{
+ int n = 0;
+ while (Value && *Value && n < I18nNumLanguages) {
+ int i = I18nLanguageIndex(Value);
+ if (i >= 0)
+ Values[n++] = i;
+ if ((Value = strchr(Value, ' ')) != NULL)
+ Value++;
+ }
+ Values[n] = -1;
+ return true;
+}
+
bool cSetup::Parse(const char *Name, const char *Value)
{
if (!strcasecmp(Name, "OSDLanguage")) OSDLanguage = atoi(Value);
@@ -411,6 +446,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "TimeTransponder")) TimeTransponder = atoi(Value);
else if (!strcasecmp(Name, "MarginStart")) MarginStart = atoi(Value);
else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value);
+ else if (!strcasecmp(Name, "EPGLanguages")) return ParseLanguages(Value, EPGLanguages);
else if (!strcasecmp(Name, "EPGScanTimeout")) EPGScanTimeout = atoi(Value);
else if (!strcasecmp(Name, "EPGBugfixLevel")) EPGBugfixLevel = atoi(Value);
else if (!strcasecmp(Name, "SVDRPTimeout")) SVDRPTimeout = atoi(Value);
@@ -424,6 +460,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "UseSubtitle")) UseSubtitle = atoi(Value);
else if (!strcasecmp(Name, "RecordingDirs")) RecordingDirs = atoi(Value);
else if (!strcasecmp(Name, "VideoFormat")) VideoFormat = atoi(Value);
+ else if (!strcasecmp(Name, "UpdateChannels")) UpdateChannels = atoi(Value);
else if (!strcasecmp(Name, "RecordDolbyDigital")) RecordDolbyDigital = atoi(Value);
else if (!strcasecmp(Name, "ChannelInfoPos")) ChannelInfoPos = atoi(Value);
else if (!strcasecmp(Name, "OSDwidth")) OSDwidth = atoi(Value);
@@ -461,6 +498,7 @@ bool cSetup::Save(void)
Store("TimeTransponder", TimeTransponder);
Store("MarginStart", MarginStart);
Store("MarginStop", MarginStop);
+ StoreLanguages("EPGLanguages", EPGLanguages);
Store("EPGScanTimeout", EPGScanTimeout);
Store("EPGBugfixLevel", EPGBugfixLevel);
Store("SVDRPTimeout", SVDRPTimeout);
@@ -474,6 +512,7 @@ bool cSetup::Save(void)
Store("UseSubtitle", UseSubtitle);
Store("RecordingDirs", RecordingDirs);
Store("VideoFormat", VideoFormat);
+ Store("UpdateChannels", UpdateChannels);
Store("RecordDolbyDigital", RecordDolbyDigital);
Store("ChannelInfoPos", ChannelInfoPos);
Store("OSDwidth", OSDwidth);
diff --git a/config.h b/config.h
index 08368e4..22623e7 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.178 2003/12/27 13:57:56 kls Exp $
+ * $Id: config.h 1.182 2004/01/06 16:47:41 kls Exp $
*/
#ifndef __CONFIG_H
@@ -17,10 +17,11 @@
#include <time.h>
#include <unistd.h>
#include "device.h"
+#include "i18n.h"
#include "tools.h"
-#define VDRVERSION "1.3.0"
-#define VDRVERSNUM 10300 // Version * 10000 + Major * 100 + Minor
+#define VDRVERSION "1.3.1"
+#define VDRVERSNUM 10301 // Version * 10000 + Major * 100 + Minor
#define MAXPRIORITY 99
#define MAXLIFETIME 99
@@ -87,7 +88,7 @@ public:
cConfig(void) { fileName = NULL; }
virtual ~cConfig() { free(fileName); }
const char *FileName(void) { return fileName; }
- virtual bool Load(const char *FileName = NULL, bool AllowComments = false, bool MustExist = false)
+ bool Load(const char *FileName = NULL, bool AllowComments = false, bool MustExist = false)
{
Clear();
if (FileName) {
@@ -195,6 +196,8 @@ class cSetup : public cConfig<cSetupLine> {
private:
void StoreCaCaps(const char *Name);
bool ParseCaCaps(const char *Value);
+ void StoreLanguages(const char *Name, int *Values);
+ bool ParseLanguages(const char *Value, int *Values);
bool Parse(const char *Name, const char *Value);
cSetupLine *Get(const char *Name, const char *Plugin = NULL);
void Store(const char *Name, const char *Value, const char *Plugin = NULL, bool AllowMultiple = false);
@@ -216,6 +219,7 @@ public:
int SetSystemTime;
int TimeTransponder;
int MarginStart, MarginStop;
+ int EPGLanguages[I18nNumLanguages + 1];
int EPGScanTimeout;
int EPGBugfixLevel;
int SVDRPTimeout;
@@ -227,6 +231,7 @@ public:
int UseSubtitle;
int RecordingDirs;
int VideoFormat;
+ int UpdateChannels;
int RecordDolbyDigital;
int ChannelInfoPos;
int OSDwidth, OSDheight;
diff --git a/device.c b/device.c
index 8f73a14..46d9ab8 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.51 2004/01/04 11:30:05 kls Exp $
+ * $Id: device.c 1.52 2004/01/11 13:21:12 kls Exp $
*/
#include "device.h"
@@ -48,6 +48,7 @@ cDevice::cDevice(void)
eitFilter = NULL;
patFilter = NULL;
sdtFilter = NULL;
+ nitFilter = NULL;
ciHandler = NULL;
player = NULL;
@@ -69,6 +70,7 @@ cDevice::~cDevice()
for (int i = 0; i < MAXRECEIVERS; i++)
Detach(receiver[i]);
delete ciHandler;
+ delete nitFilter;
delete sdtFilter;
delete patFilter;
delete eitFilter;
@@ -328,6 +330,7 @@ void cDevice::StartSectionHandler(void)
AttachFilter(eitFilter = new cEitFilter);
AttachFilter(patFilter = new cPatFilter);
AttachFilter(sdtFilter = new cSdtFilter(patFilter));
+ AttachFilter(nitFilter = new cNitFilter);
sectionHandler->SetStatus(true);
}
}
@@ -444,12 +447,12 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
// Stop section handling:
if (sectionHandler) {
sectionHandler->SetStatus(false);
- sectionHandler->SetSource(0, 0);
+ sectionHandler->SetChannel(NULL);
}
if (SetChannelDevice(Channel, LiveView)) {
// Start section handling:
if (sectionHandler) {
- sectionHandler->SetSource(Channel->Source(), Channel->Transponder());
+ sectionHandler->SetChannel(Channel);
sectionHandler->SetStatus(true);
}
}
diff --git a/device.h b/device.h
index 196ccfe..8599474 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 1.37 2004/01/04 11:52:00 kls Exp $
+ * $Id: device.h 1.38 2004/01/10 14:15:10 kls Exp $
*/
#ifndef __DEVICE_H
@@ -13,6 +13,7 @@
#include "ci.h"
#include "eit.h"
#include "filter.h"
+#include "nit.h"
#include "pat.h"
#include "sdt.h"
#include "sections.h"
@@ -241,6 +242,7 @@ private:
cEitFilter *eitFilter;
cPatFilter *patFilter;
cSdtFilter *sdtFilter;
+ cNitFilter *nitFilter;
protected:
void StartSectionHandler(void);
///< A derived device that provides section data must call
diff --git a/dvbdevice.c b/dvbdevice.c
index e42ff4b..cddde8e 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.76 2004/01/04 14:48:37 kls Exp $
+ * $Id: dvbdevice.c 1.78 2004/01/10 12:21:41 kls Exp $
*/
#include "dvbdevice.h"
@@ -632,7 +632,7 @@ int cDvbDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask)
if (ioctl(f, DMX_SET_FILTER, &sctFilterParams) >= 0)
return f;
else {
- esyslog("ERROR: can't set filter (pid=%d, tid=%02X, mask=%02X)", Pid, Tid, Mask);
+ esyslog("ERROR: can't set filter (pid=%d, tid=%02X, mask=%02X): %m", Pid, Tid, Mask);
close(f);
}
}
@@ -772,7 +772,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
bool cDvbDevice::HasLock(void)
{
- return dvbTuner->Locked();
+ return dvbTuner ? dvbTuner->Locked() : false;
}
void cDvbDevice::SetVolumeDevice(int Volume)
diff --git a/eit.c b/eit.c
index 45a4d80..d71cad8 100644
--- a/eit.c
+++ b/eit.c
@@ -8,11 +8,12 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
*
- * $Id: eit.c 1.84 2004/01/02 22:27:29 kls Exp $
+ * $Id: eit.c 1.85 2004/01/09 15:44:43 kls Exp $
*/
#include "eit.h"
#include "epg.h"
+#include "i18n.h"
#include "libsi/section.h"
#include "libsi/descriptor.h"
@@ -88,19 +89,36 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
pEvent->SetTableID(Tid);
pEvent->SetEventID(SiEitEvent.getEventId()); // unfortunately some stations use different event ids for the same event in different tables :-(
+ int LanguagePreferenceShort = -1;
+ int LanguagePreferenceExt = -1;
+ bool UseExtendedEventDescriptor = false;
SI::Descriptor *d;
- SI::ExtendedEventDescriptors exGroup;
- char text[256];
+ SI::ExtendedEventDescriptors *ExtendedEventDescriptors = NULL;
+ SI::ShortEventDescriptor *ShortEventDescriptor = NULL;
for (SI::Loop::Iterator it2; (d = SiEitEvent.eventDescriptors.getNext(it2)); ) {
switch (d->getDescriptorTag()) {
- case SI::ExtendedEventDescriptorTag:
- exGroup.Add((SI::ExtendedEventDescriptor *)d);
- d = NULL; //so that it is not deleted
+ case SI::ExtendedEventDescriptorTag: {
+ SI::ExtendedEventDescriptor *eed = (SI::ExtendedEventDescriptor *)d;
+ if (I18nIsPreferredLanguage(Setup.EPGLanguages, I18nLanguageIndex(eed->languageCode), LanguagePreferenceExt) || !ExtendedEventDescriptors) {
+ delete ExtendedEventDescriptors;
+ ExtendedEventDescriptors = new SI::ExtendedEventDescriptors;
+ UseExtendedEventDescriptor = true;
+ }
+ if (UseExtendedEventDescriptor) {
+ ExtendedEventDescriptors->Add(eed);
+ d = NULL; // so that it is not deleted
+ }
+ if (eed->getDescriptorNumber() == eed->getLastDescriptorNumber())
+ UseExtendedEventDescriptor = false;
+ }
break;
case SI::ShortEventDescriptorTag: {
SI::ShortEventDescriptor *sed = (SI::ShortEventDescriptor *)d;
- pEvent->SetTitle(sed->name.getText(text));
- pEvent->SetShortText(sed->text.getText(text));
+ if (I18nIsPreferredLanguage(Setup.EPGLanguages, I18nLanguageIndex(sed->languageCode), LanguagePreferenceShort) || !ShortEventDescriptor) {
+ delete ShortEventDescriptor;
+ ShortEventDescriptor = sed;
+ d = NULL; // so that it is not deleted
+ }
}
break;
case SI::ContentDescriptorTag:
@@ -126,9 +144,18 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
}
if (!rEvent) {
- char buffer[exGroup.getMaximumTextLength()];
- pEvent->SetDescription(exGroup.getText(buffer));
+ if (ShortEventDescriptor) {
+ char buffer[256];
+ pEvent->SetTitle(ShortEventDescriptor->name.getText(buffer));
+ pEvent->SetShortText(ShortEventDescriptor->text.getText(buffer));
+ }
+ if (ExtendedEventDescriptors) {
+ char buffer[ExtendedEventDescriptors->getMaximumTextLength()];
+ pEvent->SetDescription(ExtendedEventDescriptors->getText(buffer));
+ }
}
+ delete ExtendedEventDescriptors;
+ delete ShortEventDescriptor;
pEvent->SetStartTime(SiEitEvent.getStartTime());
pEvent->SetDuration(SiEitEvent.getDuration());
diff --git a/eitscan.c b/eitscan.c
index b4039c5..fc734d2 100644
--- a/eitscan.c
+++ b/eitscan.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: eitscan.c 1.15 2004/01/04 14:54:01 kls Exp $
+ * $Id: eitscan.c 1.18 2004/01/11 15:50:59 kls Exp $
*/
#include "eitscan.h"
@@ -23,7 +23,7 @@ public:
virtual bool operator< (const cListObject &ListObject);
int Source(void) { return source; }
int Transponder(void) { return transponder; }
- cChannel *GetChannel(void);
+ cChannel *GetChannel(cList<cChannel> *Channels);
};
cScanData::cScanData(int Source, int Transponder)
@@ -38,10 +38,9 @@ bool cScanData::operator< (const cListObject &ListObject)
return source < sd->source || source == sd->source && transponder < sd->transponder;
}
-//XXX this might be done differently later...
-cChannel *cScanData::GetChannel(void)
+cChannel *cScanData::GetChannel(cList<cChannel> *Channels)
{
- for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
+ for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) {
if (!Channel->GroupSep() && Channel->Source() == source && ISTRANSPONDER(Channel->Transponder(), transponder))
return Channel;
}
@@ -52,13 +51,13 @@ cChannel *cScanData::GetChannel(void)
class cScanList : public cList<cScanData> {
public:
- cScanList(void);
+ cScanList(cList<cChannel> *Channels);
void AddTransponder(const cChannel *Channel);
};
-cScanList::cScanList(void)
+cScanList::cScanList(cList<cChannel> *Channels)
{
- for (cChannel *ch = Channels.First(); ch; ch = Channels.Next(ch))
+ for (cChannel *ch = Channels->First(); ch; ch = Channels->Next(ch))
AddTransponder(ch);
Sort();
}
@@ -66,12 +65,30 @@ cScanList::cScanList(void)
void cScanList::AddTransponder(const cChannel *Channel)
{
for (cScanData *sd = First(); sd; sd = Next(sd)) {
- if (sd->Source() == Channel->Source() && sd->Transponder() == Channel->Transponder())
+ if (sd->Source() == Channel->Source() && ISTRANSPONDER(sd->Transponder(), Channel->Transponder()))
return;
}
Add(new cScanData(Channel->Source(), Channel->Transponder()));
}
+// --- cTransponderList ------------------------------------------------------
+
+class cTransponderList : public cList<cChannel> {
+public:
+ void AddTransponder(cChannel *Channel);
+ };
+
+void cTransponderList::AddTransponder(cChannel *Channel)
+{
+ for (cChannel *ch = First(); ch; ch = Next(ch)) {
+ if (ch->Source() == Channel->Source() && ch->Transponder() == Channel->Transponder()) {
+ delete Channel;
+ return;
+ }
+ }
+ Add(Channel);
+}
+
// --- cEITScanner -----------------------------------------------------------
cEITScanner EITScanner;
@@ -81,13 +98,22 @@ cEITScanner::cEITScanner(void)
lastScan = lastActivity = time(NULL);
currentDevice = NULL;
currentChannel = 0;
- memset(lastChannel, 0, sizeof(lastChannel));
+ numScan = 0;
scanList = NULL;
+ transponderList = NULL;
}
cEITScanner::~cEITScanner()
{
delete scanList;
+ delete transponderList;
+}
+
+void cEITScanner::AddTransponder(cChannel *Channel)
+{
+ if (!transponderList)
+ transponderList = new cTransponderList;
+ transponderList->AddTransponder(Channel);
}
void cEITScanner::Activity(void)
@@ -105,36 +131,39 @@ void cEITScanner::Process(void)
time_t now = time(NULL);
if (now - lastScan > ScanTimeout && now - lastActivity > ActivityTimeout) {
if (Channels.Lock(false, 10)) {
+ cList<cChannel> *ChannelList = &Channels;
+ if (numScan % 2 == 0 && transponderList) // switch between the list of new transponders and the actual channels in case there are transponders w/o any channels
+ ChannelList = transponderList;
if (!scanList)
- scanList = new cScanList();
+ scanList = new cScanList(ChannelList);
for (bool AnyDeviceSwitched = false; !AnyDeviceSwitched; ) {
cScanData *ScanData = NULL;
for (int i = 0; i < cDevice::NumDevices(); i++) {
- cDevice *Device = cDevice::GetDevice(i);
- if (Device) {
- if (Device != cDevice::PrimaryDevice() || (cDevice::NumDevices() == 1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) {
- if (!(Device->Receiving(true) || Device->Replaying())) {
- if (!ScanData)
- ScanData = scanList->First();
- if (ScanData) {
- cChannel *Channel = ScanData->GetChannel();
- //XXX if (Device->ProvidesTransponder(Channel)) {
- if ((!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= 0x0100) && Device->ProvidesTransponder(Channel)) { //XXX temporary for the 'sky' plugin
- if (Device == cDevice::PrimaryDevice() && !currentChannel)
- currentChannel = Device->CurrentChannel();
- currentDevice = Device;//XXX see also dvbdevice.c!!!
- Device->SwitchChannel(Channel, false);
- currentDevice = NULL;
- scanList->Del(ScanData);
- ScanData = NULL;
- AnyDeviceSwitched = true;
+ if (ScanData || (ScanData = scanList->First()) != NULL) {
+ cDevice *Device = cDevice::GetDevice(i);
+ if (Device) {
+ if (Device != cDevice::PrimaryDevice() || (cDevice::NumDevices() == 1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) {
+ if (!(Device->Receiving(true) || Device->Replaying())) {
+ cChannel *Channel = ScanData->GetChannel(ChannelList);
+ if (Channel) {
+ //XXX if (Device->ProvidesTransponder(Channel)) {
+ if ((!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= 0x0100) && Device->ProvidesTransponder(Channel)) { //XXX temporary for the 'sky' plugin
+ if (Device == cDevice::PrimaryDevice() && !currentChannel)
+ currentChannel = Device->CurrentChannel();
+ currentDevice = Device;//XXX see also dvbdevice.c!!!
+ Device->SwitchChannel(Channel, false);
+ currentDevice = NULL;
+ scanList->Del(ScanData);
+ ScanData = NULL;
+ AnyDeviceSwitched = true;
+ }
}
}
- else
- break;
}
}
}
+ else
+ break;
}
if (ScanData && !AnyDeviceSwitched) {
scanList->Del(ScanData);
@@ -143,12 +172,17 @@ void cEITScanner::Process(void)
if (!scanList->Count()) {
delete scanList;
scanList = NULL;
+ numScan++;
+ if (ChannelList == transponderList) {
+ delete transponderList;
+ transponderList = NULL;
+ }
break;
}
}
- Channels.Unlock();
- lastScan = time(NULL);
}
+ lastScan = time(NULL);
+ Channels.Unlock();
}
}
}
diff --git a/eitscan.h b/eitscan.h
index fff2dee..d683794 100644
--- a/eitscan.h
+++ b/eitscan.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: eitscan.h 1.5 2004/01/03 13:08:39 kls Exp $
+ * $Id: eitscan.h 1.6 2004/01/11 14:11:25 kls Exp $
*/
#ifndef __EITSCAN_H
@@ -14,6 +14,7 @@
#include "config.h"
class cScanList;
+class cTransponderList;
class cEITScanner {
private:
@@ -23,13 +24,15 @@ private:
time_t lastScan, lastActivity;
cDevice *currentDevice;
int currentChannel;
- int lastChannel[MAXDEVICES];
+ int numScan;
cScanList *scanList;
+ cTransponderList *transponderList;
public:
cEITScanner(void);
~cEITScanner();
bool Active(void) { return currentChannel; }
bool UsesDevice(const cDevice *Device) { return currentDevice == Device; }
+ void AddTransponder(cChannel *Channel);
void Activity(void);
void Process(void);
};
diff --git a/epg.c b/epg.c
index 60d63af..19f1c7f 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 1.3 2004/01/04 14:07:46 kls Exp $
+ * $Id: epg.c 1.4 2004/01/09 15:22:18 kls Exp $
*/
#include "epg.h"
@@ -486,6 +486,12 @@ bool cSchedule::SetFollowingEvent(cEvent *Event)
return true;
}
+void cSchedule::ResetVersions(void)
+{
+ for (cEvent *p = events.First(); p; p = events.Next(p))
+ p->SetVersion(0xFF);
+}
+
void cSchedule::Cleanup(void)
{
Cleanup(time(NULL));
@@ -613,6 +619,16 @@ void cSchedules::Cleanup(bool Force)
}
}
+void cSchedules::ResetVersions(void)
+{
+ cSchedulesLock SchedulesLock(true);
+ cSchedules *s = (cSchedules *)Schedules(SchedulesLock);
+ if (s) {
+ for (cSchedule *Schedule = s->First(); Schedule; Schedule = s->Next(Schedule))
+ Schedule->ResetVersions();
+ }
+}
+
bool cSchedules::ClearAll(void)
{
cSchedulesLock SchedulesLock(true, 1000);
diff --git a/epg.h b/epg.h
index 19332a5..409968a 100644
--- a/epg.h
+++ b/epg.h
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.h 1.3 2004/01/03 17:00:25 kls Exp $
+ * $Id: epg.h 1.4 2004/01/09 15:21:05 kls Exp $
*/
#ifndef __EPG_H
@@ -84,6 +84,7 @@ public:
tChannelID ChannelID(void) const { return channelID; }
bool SetPresentEvent(cEvent *Event);
bool SetFollowingEvent(cEvent *Event);
+ void ResetVersions(void);
void Cleanup(time_t Time);
void Cleanup(void);
cEvent *AddEvent(cEvent *Event);
@@ -122,6 +123,7 @@ public:
///< time the returned cSchedules is accessed. Once the cSchedules is no
///< longer used, the cSchedulesLock must be destroyed.
static void Cleanup(bool Force = false);
+ static void ResetVersions(void);
static bool ClearAll(void);
static bool Dump(FILE *f, const char *Prefix = "");
static bool Read(FILE *f = NULL);
diff --git a/filter.c b/filter.c
index 668b7d3..08bde5a 100644
--- a/filter.c
+++ b/filter.c
@@ -4,12 +4,39 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: filter.c 1.1 2003/12/21 15:26:16 kls Exp $
+ * $Id: filter.c 1.4 2004/01/11 13:31:34 kls Exp $
*/
#include "filter.h"
#include "sections.h"
+// --- cSectionSyncer --------------------------------------------------------
+
+cSectionSyncer::cSectionSyncer(void)
+{
+ Reset();
+}
+
+void cSectionSyncer::Reset(void)
+{
+ lastVersion = 0xFF;
+ synced = false;
+}
+
+bool cSectionSyncer::Sync(uchar Version, int Number, int LastNumber)
+{
+ if (Version == lastVersion)
+ return false;
+ if (!synced) {
+ if (Number != 0)
+ return false; // sync on first section
+ synced = true;
+ }
+ if (Number == LastNumber)
+ lastVersion = Version;
+ return synced;
+}
+
// --- cFilterData -----------------------------------------------------------
cFilterData::cFilterData(void)
@@ -69,6 +96,11 @@ int cFilter::Transponder(void)
return sectionHandler ? sectionHandler->Transponder() : 0;
}
+const cChannel *cFilter::Channel(void)
+{
+ return sectionHandler ? sectionHandler->Channel() : NULL;
+}
+
void cFilter::SetStatus(bool On)
{
if (sectionHandler && on != On) {
@@ -93,10 +125,12 @@ void cFilter::SetStatus(bool On)
bool cFilter::Matches(u_short Pid, u_char Tid)
{
- for (cFilterData *fd = data.First(); fd; fd = data.Next(fd)) {
- if (fd->Matches(Pid, Tid))
- return true;
- }
+ if (on) {
+ for (cFilterData *fd = data.First(); fd; fd = data.Next(fd)) {
+ if (fd->Matches(Pid, Tid))
+ return true;
+ }
+ }
return false;
}
diff --git a/filter.h b/filter.h
index 09703e0..9bd163f 100644
--- a/filter.h
+++ b/filter.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: filter.h 1.1 2003/12/22 11:41:40 kls Exp $
+ * $Id: filter.h 1.3 2004/01/11 13:31:59 kls Exp $
*/
#ifndef __FILTER_H
@@ -13,6 +13,16 @@
#include <sys/types.h>
#include "tools.h"
+class cSectionSyncer {
+private:
+ int lastVersion;
+ bool synced;
+public:
+ cSectionSyncer(void);
+ void Reset(void);
+ bool Sync(uchar Version, int Number, int LastNumber);
+ };
+
class cFilterData : public cListObject {
public:
u_short pid;
@@ -25,6 +35,7 @@ public:
bool Matches(u_short Pid, u_char Tid);
};
+class cChannel;
class cSectionHandler;
class cFilter : public cListObject {
@@ -59,6 +70,8 @@ protected:
///< Returns the source of the data delivered to this filter.
int Transponder(void);
///< Returns the transponder of the data delivered to this filter.
+ const cChannel *Channel(void);
+ ///< Returns the channel of the data delivered to this filter.
bool Matches(u_short Pid, u_char Tid);
///< Indicates whether this filter wants to receive data from the given Pid/Tid.
void Set(u_short Pid, u_char Tid, u_char Mask = 0xFF);
diff --git a/i18n.c b/i18n.c
index 6a35e5a..c72ccd8 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.c 1.137 2003/12/19 13:32:10 kls Exp $
+ * $Id: i18n.c 1.140 2004/01/11 15:38:45 kls Exp $
*
* Translations provided by:
*
@@ -111,6 +111,24 @@ const tI18nPhrase Phrases[] = {
"iso8859-1",
"iso8859-1",
},
+ // The 3-letter names of the language (this MUST be the third phrase!):
+ { "eng",
+ "deu,ger",
+ "slv",
+ "ita",
+ "dut,nla",
+ "por",
+ "fra,fre",
+ "nor",
+ "fin",
+ "pol",
+ "esl,spa",
+ "ell,gre",
+ "sve,swe",
+ "ron,rum",
+ "hun",
+ "cat,cln",
+ },
// Menu titles:
{ "VDR",
"VDR",
@@ -2227,6 +2245,40 @@ const tI18nPhrase Phrases[] = {
"Idöhöz tartozó Transponder",
"Usar el temps del múltiplex",
},
+ { "Setup.EPG$Preferred languages",
+ "Bevorzugte Sprachen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "Suosikkikielet",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "Setup.EPG$Preferred language",
+ "Bevorzugte Sprache",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "Suosikkikieli",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
{ "Setup.DVB$Primary DVB interface",
"Primäres DVB Interface",
"Primarna naprava",
@@ -2261,6 +2313,91 @@ const tI18nPhrase Phrases[] = {
"Video formátum",
"Format del vídeo",
},
+ { "Setup.DVB$Update channels",
+ "Kanäle aktualisieren",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "names only",
+ "nur Namen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "names and PIDs",
+ "Namen und PIDs",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "add new channels",
+ "neue Kanäle hinzufügen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "add new transponders",
+ "neue Transponder hinzufügen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
{ "Setup.LNB$SLOF (MHz)",
"SLOF (MHz)",
"Frekvenca preklopa (MHz)",
@@ -3852,3 +3989,41 @@ const char * const * I18nCharSets(void)
{
return &Phrases[1][0];
}
+
+const char * I18nLanguageAbbreviation(int Index)
+{
+ return Index < I18nNumLanguages ? Phrases[2][Index] : NULL;
+}
+
+int I18nLanguageIndex(const char Code[3])
+{
+ char s[4];
+ memcpy(s, Code, 3);
+ s[3] = 0;
+ for (int i = 0; i < I18nNumLanguages; i++) {
+ if (strcasestr(Phrases[2][i], s))
+ return i;
+ }
+ //dsyslog("unknown language code: '%s'", s);
+ return -1;
+}
+
+bool I18nIsPreferredLanguage(int *PreferredLanguages, int LanguageIndex, int &OldPreference)
+{
+ for (int i = 0; i < I18nNumLanguages; i++) {
+ if (PreferredLanguages[i] < 0)
+ break; // the language is not a preferred one
+ if (PreferredLanguages[i] == LanguageIndex) {
+ if (OldPreference < 0 || i < OldPreference) {
+ OldPreference = i;
+ return true;
+ }
+ break;
+ }
+ }
+ if (OldPreference < 0) {
+ OldPreference = I18nNumLanguages; // higher than the maximum possible value
+ return true; // if we don't find a preferred one, we take the first one
+ }
+ return false;
+}
diff --git a/i18n.h b/i18n.h
index 44cf190..8c88214 100644
--- a/i18n.h
+++ b/i18n.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.h 1.7 2003/10/19 15:02:05 kls Exp $
+ * $Id: i18n.h 1.8 2004/01/06 15:56:53 kls Exp $
*/
#ifndef __I18N_H
@@ -22,6 +22,9 @@ const char *I18nTranslate(const char *s, const char *Plugin = NULL);
const char * const * I18nLanguages(void);
const char * const * I18nCharSets(void);
+const char * I18nLanguageAbbreviation(int Index);
+int I18nLanguageIndex(const char Code[3]);
+bool I18nIsPreferredLanguage(int *PreferredLanguages, int LanguageIndex, int &OldPreference);
#ifdef PLUGIN_NAME_I18N
#define tr(s) I18nTranslate(s, PLUGIN_NAME_I18N)
diff --git a/libsi/si.c b/libsi/si.c
index bcf519a..ac2e26f 100644
--- a/libsi/si.c
+++ b/libsi/si.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.c 1.3 2004/01/04 14:26:53 kls Exp $
+ * $Id: si.c 1.4 2004/01/05 11:04:17 kls Exp $
* *
***************************************************************************/
@@ -219,7 +219,7 @@ void String::decodeText(char *buffer) {
break;
if ( ((' ' <= *from) && (*from <= '~'))
|| (*from == '\n')
- || ((0xA0 <= *from) && (*from <= 0xFF))
+ || (0xA0 <= *from)
)
*to++ = *from;
else if (*from == 0x8A)
diff --git a/libsi/si.h b/libsi/si.h
index 31d17cb..d2ac417 100644
--- a/libsi/si.h
+++ b/libsi/si.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.h 1.3 2003/12/26 14:09:30 kls Exp $
+ * $Id: si.h 1.5 2004/01/09 15:59:53 kls Exp $
* *
***************************************************************************/
@@ -207,7 +207,7 @@ public:
int getVersionNumber() const;
int getSectionNumber() const;
int getLastSectionNumber() const;
- bool moreThanOneSection() const { return getLastSectionNumber()>1; }
+ bool moreThanOneSection() const { return getLastSectionNumber()>0; }
};
class VariableLengthPart : public Object {
@@ -316,7 +316,7 @@ typedef uint64_t SixtyFourBit;
template <typename T> class TypeLoop : public Loop {
public:
- int getCount() const { return getLength()/sizeof(T); }
+ int getCount() { return getLength()/sizeof(T); }
T operator[](const unsigned int index) const
{
switch (sizeof(T)) {
diff --git a/menu.c b/menu.c
index 5e628bb..cf9d8eb 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.276 2004/01/04 11:12:43 kls Exp $
+ * $Id: menu.c 1.279 2004/01/11 15:40:32 kls Exp $
*/
#include "menu.h"
@@ -2029,22 +2029,90 @@ eOSState cMenuSetupOSD::ProcessKey(eKeys Key)
// --- cMenuSetupEPG ---------------------------------------------------------
class cMenuSetupEPG : public cMenuSetupBase {
+private:
+ int originalNumLanguages;
+ int numLanguages;
+ void Setup(void);
public:
cMenuSetupEPG(void);
+ virtual eOSState ProcessKey(eKeys Key);
};
cMenuSetupEPG::cMenuSetupEPG(void)
{
+ for (numLanguages = 0; numLanguages < I18nNumLanguages && data.EPGLanguages[numLanguages] >= 0; numLanguages++)
+ ;
+ originalNumLanguages = numLanguages;
SetSection(tr("EPG"));
+ Setup();
+}
+
+void cMenuSetupEPG::Setup(void)
+{
+ int current = Current();
+
+ Clear();
+
Add(new cMenuEditIntItem( tr("Setup.EPG$EPG scan timeout (h)"), &data.EPGScanTimeout));
Add(new cMenuEditIntItem( tr("Setup.EPG$EPG bugfix level"), &data.EPGBugfixLevel, 0, MAXEPGBUGFIXLEVEL));
Add(new cMenuEditBoolItem(tr("Setup.EPG$Set system time"), &data.SetSystemTime));
- Add(new cMenuEditTranItem(tr("Setup.EPG$Use time from transponder"), &data.TimeTransponder));
+ if (data.SetSystemTime)
+ Add(new cMenuEditTranItem(tr("Setup.EPG$Use time from transponder"), &data.TimeTransponder));
+ Add(new cMenuEditIntItem( tr("Setup.EPG$Preferred languages"), &numLanguages, 0, I18nNumLanguages));
+ for (int i = 0; i < numLanguages; i++)
+ Add(new cMenuEditStraItem(tr("Setup.EPG$Preferred language"), &data.EPGLanguages[i], I18nNumLanguages, I18nLanguages()));
+
+ SetCurrent(Get(current));
+ Display();
+}
+
+eOSState cMenuSetupEPG::ProcessKey(eKeys Key)
+{
+ int oldnumLanguages = numLanguages;
+ int oldSetSystemTime = data.SetSystemTime;
+
+ eOSState state = cMenuSetupBase::ProcessKey(Key);
+ if (Key == kOk) {
+ bool Modified = numLanguages != originalNumLanguages;
+ if (!Modified) {
+ for (int i = 0; i < numLanguages; i++) {
+ if (data.EPGLanguages[i] != ::Setup.EPGLanguages[i]) {
+ Modified = true;
+ break;
+ }
+ }
+ }
+ if (Modified)
+ cSchedules::ResetVersions();
+ }
+ else if (Key != kNone) {
+ if (numLanguages != oldnumLanguages || data.SetSystemTime != oldSetSystemTime) {
+ for (int i = oldnumLanguages; i < numLanguages; i++) {
+ data.EPGLanguages[i] = 0;
+ for (int l = 0; l < I18nNumLanguages; l++) {
+ int k;
+ for (k = 0; k < oldnumLanguages; k++) {
+ if (data.EPGLanguages[k] == l)
+ break;
+ }
+ if (k >= oldnumLanguages) {
+ data.EPGLanguages[i] = l;
+ break;
+ }
+ }
+ }
+ data.EPGLanguages[numLanguages] = -1;
+ Setup();
+ }
+ }
+ return state;
}
// --- cMenuSetupDVB ---------------------------------------------------------
class cMenuSetupDVB : public cMenuSetupBase {
+private:
+ const char *updateChannelsTexts[5];
public:
cMenuSetupDVB(void);
virtual eOSState ProcessKey(eKeys Key);
@@ -2052,9 +2120,16 @@ public:
cMenuSetupDVB::cMenuSetupDVB(void)
{
+ updateChannelsTexts[0] = tr("no");
+ updateChannelsTexts[1] = tr("names only");
+ updateChannelsTexts[2] = tr("names and PIDs");
+ updateChannelsTexts[3] = tr("add new channels");
+ updateChannelsTexts[4] = tr("add new transponders");
+
SetSection(tr("DVB"));
Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDevice::NumDevices()));
Add(new cMenuEditBoolItem(tr("Setup.DVB$Video format"), &data.VideoFormat, "4:3", "16:9"));
+ Add(new cMenuEditStraItem(tr("Setup.DVB$Update channels"), &data.UpdateChannels, 5, updateChannelsTexts));
}
eOSState cMenuSetupDVB::ProcessKey(eKeys Key)
diff --git a/nit.c b/nit.c
new file mode 100644
index 0000000..1ac731c
--- /dev/null
+++ b/nit.c
@@ -0,0 +1,139 @@
+/*
+ * nit.c: NIT section filter
+ *
+ * See the main source file 'vdr.c' for copyright information and
+ * how to reach the author.
+ *
+ * $Id: nit.c 1.1 2004/01/11 15:42:51 kls Exp $
+ */
+
+#include "nit.h"
+#include <linux/dvb/frontend.h>
+#include "channels.h"
+#include "eitscan.h"
+#include "libsi/section.h"
+#include "libsi/descriptor.h"
+#include "tools.h"
+
+cNitFilter::cNitFilter(void)
+{
+ Set(0x10, 0x40); // NIT
+}
+
+void cNitFilter::SetStatus(bool On)
+{
+ cFilter::SetStatus(On);
+ sectionSyncer.Reset();
+}
+
+void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
+{
+ SI::NIT nit(Data, false);
+ if (!nit.CheckCRCAndParse())
+ return;
+ if (!sectionSyncer.Sync(nit.getVersionNumber(), nit.getSectionNumber(), nit.getLastSectionNumber()))
+ return;
+ if (!Channels.Lock(true, 10))
+ return;
+ for (SI::Loop::Iterator it; nit.transportStreamLoop.hasNext(it); ) {
+ SI::NIT::TransportStream ts = nit.transportStreamLoop.getNext(it);
+ SI::Descriptor *d;
+ for (SI::Loop::Iterator it2; (d = ts.transportStreamDescriptors.getNext(it2)); ) {
+ switch (d->getDescriptorTag()) {
+ case SI::SatelliteDeliverySystemDescriptorTag: {
+ SI::SatelliteDeliverySystemDescriptor *sd = (SI::SatelliteDeliverySystemDescriptor *)d;
+ int Source = cSource::FromData(cSource::stSat, BCD2INT(sd->getOrbitalPosition()), sd->getWestEastFlag());
+ int Frequency = BCD2INT(sd->getFrequency()) / 100;
+ static char Polarizations[] = { 'h', 'v', 'l', 'r' };
+ char Polarization = Polarizations[sd->getPolarization()];
+ static int CodeRates[] = { FEC_NONE, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE };
+ int CodeRate = CodeRates[sd->getFecInner()];
+ int SymbolRate = BCD2INT(sd->getSymbolRate()) / 10;
+ bool found = false;
+ for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
+ if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
+ if (Setup.UpdateChannels >= 4)
+ Channel->SetSatTransponderData(Source, Frequency, Polarization, SymbolRate, CodeRate);
+ found = true;
+ }
+ }
+ if (!found && Setup.UpdateChannels >= 4) {
+ cChannel *Channel = new cChannel;
+ Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0, false);
+ if (Channel->SetSatTransponderData(Source, Frequency, Polarization, SymbolRate, CodeRate, false))
+ EITScanner.AddTransponder(Channel);
+ else
+ delete Channel;
+ }
+ }
+ break;
+ case SI::CableDeliverySystemDescriptorTag: {
+ SI::CableDeliverySystemDescriptor *sd = (SI::CableDeliverySystemDescriptor *)d;
+ int Source = cSource::FromData(cSource::stCable);
+ int Frequency = BCD2INT(sd->getFrequency()) / 10;
+ //XXX FEC_outer???
+ static int CodeRates[] = { FEC_NONE, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE };
+ int CodeRate = CodeRates[sd->getFecInner()];
+ static int Modulations[] = { QPSK, QAM_16, QAM_32, QAM_64, QAM_128, QAM_256 };
+ int Modulation = Modulations[sd->getModulation()];
+ int SymbolRate = BCD2INT(sd->getSymbolRate()) / 10;
+ bool found = false;
+ for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
+ if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
+ if (Setup.UpdateChannels >= 4)
+ Channel->SetCableTransponderData(Source, Frequency, Modulation, SymbolRate, CodeRate);
+ found = true;
+ }
+ }
+ if (!found && Setup.UpdateChannels >= 4) {
+ cChannel *Channel = new cChannel;
+ Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0, false);
+ if (Channel->SetCableTransponderData(Source, Frequency, Modulation, SymbolRate, CodeRate, false))
+ EITScanner.AddTransponder(Channel);
+ else
+ delete Channel;
+ }
+ }
+ break;
+ case SI::TerrestrialDeliverySystemDescriptorTag: {
+ SI::TerrestrialDeliverySystemDescriptor *sd = (SI::TerrestrialDeliverySystemDescriptor *)d;
+ int Source = cSource::FromData(cSource::stCable);
+ int Frequency = sd->getFrequency() * 10;
+ static int Bandwidths[] = { BANDWIDTH_6_MHZ, BANDWIDTH_7_MHZ, BANDWIDTH_8_MHZ, BANDWIDTH_AUTO, BANDWIDTH_AUTO, BANDWIDTH_AUTO, BANDWIDTH_AUTO, BANDWIDTH_AUTO };
+ int Bandwidth = Bandwidths[sd->getBandwidth()];
+ static int Constellations[] = { QPSK, QAM_16, QAM_64, QAM_AUTO };
+ int Constellation = Constellations[sd->getConstellation()];
+ static int Hierarchies[] = { HIERARCHY_NONE, HIERARCHY_1, HIERARCHY_2, HIERARCHY_4 };
+ int Hierarchy = Hierarchies[sd->getHierarchy()];
+ static int CodeRates[] = { FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_NONE, FEC_NONE, FEC_NONE };
+ int CodeRateHP = CodeRates[sd->getCodeRateHP()];
+ int CodeRateLP = CodeRates[sd->getCodeRateLP()];
+ static int GuardIntervals[] = { GUARD_INTERVAL_1_4, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_32 };
+ int GuardInterval = GuardIntervals[sd->getGuardInterval()];
+ static int TransmissionModes[] = { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, TRANSMISSION_MODE_AUTO };
+ int TransmissionMode = TransmissionModes[sd->getTransmissionMode()];
+ bool found = false;
+ for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
+ if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
+ if (Setup.UpdateChannels >= 4)
+ Channel->SetTerrTransponderData(Source, Frequency, Bandwidth, Constellation, Hierarchy, CodeRateHP, CodeRateLP, GuardInterval, TransmissionMode);
+ found = true;
+ }
+ }
+ if (!found && Setup.UpdateChannels >= 4) {
+ cChannel *Channel = new cChannel;
+ Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0, false);
+ if (Channel->SetTerrTransponderData(Source, Frequency, Bandwidth, Constellation, Hierarchy, CodeRateHP, CodeRateLP, GuardInterval, TransmissionMode, false))
+ EITScanner.AddTransponder(Channel);
+ else
+ delete Channel;
+ }
+ }
+ break;
+ default: ;
+ }
+ delete d;
+ }
+ }
+ Channels.Unlock();
+}
diff --git a/nit.h b/nit.h
new file mode 100644
index 0000000..e7d987d
--- /dev/null
+++ b/nit.h
@@ -0,0 +1,25 @@
+/*
+ * nit.h: NIT section filter
+ *
+ * See the main source file 'vdr.c' for copyright information and
+ * how to reach the author.
+ *
+ * $Id: nit.h 1.1 2004/01/11 14:31:05 kls Exp $
+ */
+
+#ifndef __NIT_H
+#define __NIT_H
+
+#include "filter.h"
+
+class cNitFilter : public cFilter {
+private:
+ cSectionSyncer sectionSyncer;
+protected:
+ virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
+public:
+ cNitFilter(void);
+ virtual void SetStatus(bool On);
+ };
+
+#endif //__NIT_H
diff --git a/pat.c b/pat.c
index 3fa6848..312e2f1 100644
--- a/pat.c
+++ b/pat.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: pat.c 1.3 2004/01/04 12:27:06 kls Exp $
+ * $Id: pat.c 1.4 2004/01/05 11:42:30 kls Exp $
*/
#include "pat.h"
@@ -368,9 +368,11 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
delete d;
}
}
- Channel->SetPids(Vpid, Ppid, Apids[0], Apids[1], Dpids[0], Dpids[1], Tpid);
- Channel->SetCaIds(CaDescriptors->CaIds());
- Channel->SetCaDescriptors(CaDescriptorHandler.AddCaDescriptors(CaDescriptors));
+ if (Setup.UpdateChannels >= 2) {
+ Channel->SetPids(Vpid, Ppid, Apids[0], Apids[1], Dpids[0], Dpids[1], Tpid);
+ Channel->SetCaIds(CaDescriptors->CaIds());
+ Channel->SetCaDescriptors(CaDescriptorHandler.AddCaDescriptors(CaDescriptors));
+ }
}
lastPmtScan = 0; // this triggers the next scan
Channels.Unlock();
diff --git a/runvdr b/runvdr
index 9c63991..883e16b 100755
--- a/runvdr
+++ b/runvdr
@@ -18,7 +18,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: runvdr 1.11 2003/08/26 16:15:41 kls Exp $
+# $Id: runvdr 1.12 2004/01/09 16:19:26 kls Exp $
DVBDIR="../DVB/driver"
VDRPRG="./vdr"
@@ -33,7 +33,7 @@ if [ $LSMOD -eq 0 ] ; then
fi
while (true) do
- su -c "$VDRCMD" $VDRUSR
+ su $VDRUSR -c "$VDRCMD"
if test $? -eq 0 -o $? -eq 2; then exit; fi
date
echo "restarting VDR"
diff --git a/sdt.c b/sdt.c
index a4e91b8..9d760bf 100644
--- a/sdt.c
+++ b/sdt.c
@@ -4,42 +4,47 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sdt.c 1.1 2004/01/04 11:54:42 kls Exp $
+ * $Id: sdt.c 1.4 2004/01/11 14:28:28 kls Exp $
*/
#include "sdt.h"
#include "channels.h"
+#include "config.h"
#include "libsi/section.h"
#include "libsi/descriptor.h"
-// --- cSDT ------------------------------------------------------------------
+// --- cSdtFilter ------------------------------------------------------------
-class cSDT : public SI::SDT {
-public:
- cSDT(int Source, int Transponder, uchar &lastSdtVersion, cPatFilter *PatFilter, const u_char *Data);
- };
+cSdtFilter::cSdtFilter(cPatFilter *PatFilter)
+{
+ patFilter = PatFilter;
+ Set(0x11, 0x42); // SDT
+}
-cSDT::cSDT(int Source, int Transponder, uchar &lastSdtVersion, cPatFilter *PatFilter, const u_char *Data)
-:SI::SDT(Data, false)
+void cSdtFilter::SetStatus(bool On)
{
- if (!CheckCRCAndParse())
- return;
+ cFilter::SetStatus(On);
+ sectionSyncer.Reset();
+}
- if (getVersionNumber() == lastSdtVersion)
+void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
+{
+ if (!(Source() && Transponder()))
+ return;
+ SI::SDT sdt(Data, false);
+ if (!sdt.CheckCRCAndParse())
+ return;
+ if (!sectionSyncer.Sync(sdt.getVersionNumber(), sdt.getSectionNumber(), sdt.getLastSectionNumber()))
return;
-
if (!Channels.Lock(true, 10))
return;
-
- lastSdtVersion = getVersionNumber();
-
SI::SDT::Service SiSdtService;
- for (SI::Loop::Iterator it; serviceLoop.hasNext(it); ) {
- SiSdtService = serviceLoop.getNext(it);
+ for (SI::Loop::Iterator it; sdt.serviceLoop.hasNext(it); ) {
+ SiSdtService = sdt.serviceLoop.getNext(it);
- cChannel *Channel = Channels.GetByChannelID(tChannelID(Source, getOriginalNetworkId(), getTransportStreamId(), SiSdtService.getServiceId()));
- if (!Channel)
- Channel = Channels.GetByChannelID(tChannelID(Source, 0, Transponder, SiSdtService.getServiceId()));
+ cChannel *channel = Channels.GetByChannelID(tChannelID(Source(), sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId()));
+ if (!channel)
+ channel = Channels.GetByChannelID(tChannelID(Source(), 0, Transponder(), SiSdtService.getServiceId()));
SI::Descriptor *d;
for (SI::Loop::Iterator it2; (d = SiSdtService.serviceDescriptors.getNext(it2)); ) {
@@ -78,18 +83,19 @@ cSDT::cSDT(int Source, int Transponder, uchar &lastSdtVersion, cPatFilter *PatFi
strcpy(ps, NameBuf);
pn = ShortNameBuf;
}
- if (Channel) {
- Channel->SetId(getOriginalNetworkId(), getTransportStreamId(), SiSdtService.getServiceId());
- Channel->SetName(pn);
+ if (channel) {
+ channel->SetId(sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
+ if (Setup.UpdateChannels >= 1)
+ channel->SetName(pn);
// Using SiSdtService.getFreeCaMode() is no good, because some
// tv stations set this flag even for non-encrypted channels :-(
// The special value 0xFFFF was supposed to mean "unknown encryption"
// and would have been overwritten with real CA values later:
- // Channel->SetCa(SiSdtService.getFreeCaMode() ? 0xFFFF : 0);
+ // channel->SetCa(SiSdtService.getFreeCaMode() ? 0xFFFF : 0);
}
- else if (*pn) {
- Channel = Channels.NewChannel(Source, Transponder, pn, getOriginalNetworkId(), getTransportStreamId(), SiSdtService.getServiceId());
- PatFilter->Trigger();
+ else if (*pn && Setup.UpdateChannels >= 3) {
+ channel = Channels.NewChannel(Channel(), pn, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
+ patFilter->Trigger();
}
}
}
@@ -100,9 +106,9 @@ cSDT::cSDT(int Source, int Transponder, uchar &lastSdtVersion, cPatFilter *PatFi
/*
case SI::CaIdentifierDescriptorTag: {
SI::CaIdentifierDescriptor *cid = (SI::CaIdentifierDescriptor *)d;
- if (Channel) {
+ if (channel) {
for (SI::Loop::Iterator it; cid->identifiers.hasNext(it); )
- Channel->SetCa(cid->identifiers.getNext(it));
+ channel->SetCa(cid->identifiers.getNext(it));
}
}
break;
@@ -122,25 +128,3 @@ cSDT::cSDT(int Source, int Transponder, uchar &lastSdtVersion, cPatFilter *PatFi
}
Channels.Unlock();
}
-
-
-// --- cSdtFilter ------------------------------------------------------------
-
-cSdtFilter::cSdtFilter(cPatFilter *PatFilter)
-{
- lastSdtVersion = 0xFF;
- patFilter = PatFilter;
- Set(0x11, 0x42); // SDT
-}
-
-void cSdtFilter::SetStatus(bool On)
-{
- cFilter::SetStatus(On);
- lastSdtVersion = 0xFF;
-}
-
-void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
-{
- if (Source() && Transponder())
- cSDT SDT(Source(), Transponder(), lastSdtVersion, patFilter, Data);
-}
diff --git a/sdt.h b/sdt.h
index 8d75f3c..a427119 100644
--- a/sdt.h
+++ b/sdt.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sdt.h 1.1 2004/01/03 13:49:55 kls Exp $
+ * $Id: sdt.h 1.2 2004/01/05 14:30:14 kls Exp $
*/
#ifndef __SDT_H
@@ -15,7 +15,7 @@
class cSdtFilter : public cFilter {
private:
- uchar lastSdtVersion;
+ cSectionSyncer sectionSyncer;
cPatFilter *patFilter;
protected:
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
diff --git a/sections.c b/sections.c
index 6b4d490..fb934a8 100644
--- a/sections.c
+++ b/sections.c
@@ -4,11 +4,12 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sections.c 1.2 2004/01/03 12:54:01 kls Exp $
+ * $Id: sections.c 1.4 2004/01/11 13:22:13 kls Exp $
*/
#include "sections.h"
#include <unistd.h>
+#include "channels.h"
#include "device.h"
// --- cFilterHandle----------------------------------------------------------
@@ -28,17 +29,24 @@ cFilterHandle::cFilterHandle(const cFilterData &FilterData)
used = 0;
}
+// --- cSectionHandlerPrivate ------------------------------------------------
+
+class cSectionHandlerPrivate {
+public:
+ cChannel channel;
+ };
+
// --- cSectionHandler -------------------------------------------------------
cSectionHandler::cSectionHandler(cDevice *Device)
:cThread("Section handler")
{
+ shp = new cSectionHandlerPrivate;
device = Device;
active = false;
- source = 0;
- transponder = 0;
statusCount = 0;
on = false;
+ lastIncompleteSection = 0;
Start();
}
@@ -49,6 +57,22 @@ cSectionHandler::~cSectionHandler()
cFilter *fi;
while ((fi = filters.First()) != NULL)
Detach(fi);
+ delete shp;
+}
+
+int cSectionHandler::Source(void)
+{
+ return shp->channel.Source();
+}
+
+int cSectionHandler::Transponder(void)
+{
+ return shp->channel.Transponder();
+}
+
+const cChannel *cSectionHandler::Channel(void)
+{
+ return &shp->channel;
}
void cSectionHandler::Add(const cFilterData *FilterData)
@@ -106,11 +130,10 @@ void cSectionHandler::Detach(cFilter *Filter)
Unlock();
}
-void cSectionHandler::SetSource(int Source, int Transponder)
+void cSectionHandler::SetChannel(const cChannel *Channel)
{
Lock();
- source = Source;
- transponder = Transponder;
+ shp->channel = Channel? *Channel : cChannel();
Unlock();
}
@@ -176,8 +199,10 @@ void cSectionHandler::Action(void)
fi->Process(pid, tid, buf, len);
}
}
- else
+ else if (time(NULL) - lastIncompleteSection > 10) { // log them only every 10 seconds
dsyslog("read incomplete section - len = %d, r = %d", len, r);
+ lastIncompleteSection = time(NULL);
+ }
}
}
}
diff --git a/sections.h b/sections.h
index 1f4f462..670f785 100644
--- a/sections.h
+++ b/sections.h
@@ -4,28 +4,31 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sections.h 1.1 2003/12/21 14:37:00 kls Exp $
+ * $Id: sections.h 1.3 2004/01/11 13:18:38 kls Exp $
*/
#ifndef __SECTIONS_H
#define __SECTIONS_H
+#include <time.h>
#include "filter.h"
#include "thread.h"
#include "tools.h"
class cDevice;
+class cChannel;
class cFilterHandle;
+class cSectionHandlerPrivate;
class cSectionHandler : public cThread {
friend class cFilter;
private:
+ cSectionHandlerPrivate *shp;
cDevice *device;
bool active;
- int source;
- int transponder;
int statusCount;
bool on;
+ time_t lastIncompleteSection;
cList<cFilter> filters;
cList<cFilterHandle> filterHandles;
void Add(const cFilterData *FilterData);
@@ -34,11 +37,12 @@ private:
public:
cSectionHandler(cDevice *Device);
virtual ~cSectionHandler();
- int Source(void) { return source; }
- int Transponder(void) { return transponder; }
+ int Source(void);
+ int Transponder(void);
+ const cChannel *Channel(void);
void Attach(cFilter *Filter);
void Detach(cFilter *Filter);
- void SetSource(int Source, int Transponder);
+ void SetChannel(const cChannel *Channel);
void SetStatus(bool On);
};
diff --git a/sources.c b/sources.c
index fc660a5..a9c3148 100644
--- a/sources.c
+++ b/sources.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sources.c 1.1 2002/10/06 09:27:10 kls Exp $
+ * $Id: sources.c 1.2 2004/01/11 10:36:57 kls Exp $
*/
#include "sources.h"
@@ -90,6 +90,17 @@ int cSource::FromString(const char *s)
return code;
}
+int cSource::FromData(eSourceType SourceType, int Position, bool East)
+{
+ int code = SourceType;
+ if (SourceType == stSat) {
+ if (East)
+ code |= st_Neg;
+ code |= (Position & st_Pos);;
+ }
+ return code;
+}
+
// -- cSources ---------------------------------------------------------------
cSources Sources;
diff --git a/sources.h b/sources.h
index 65d1bd6..3e9abc7 100644
--- a/sources.h
+++ b/sources.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sources.h 1.1 2002/10/04 14:25:03 kls Exp $
+ * $Id: sources.h 1.2 2004/01/11 10:35:36 kls Exp $
*/
#ifndef __SOURCES_H
@@ -21,6 +21,7 @@ public:
stTerr = 0xC000,
st_Mask = 0xC000,
st_Neg = 0x0800,
+ st_Pos = 0x07FF,
};
private:
int code;
@@ -33,6 +34,7 @@ public:
bool Parse(const char *s);
static const char *ToString(int Code);
static int FromString(const char *s);
+ static int FromData(eSourceType SourceType, int Position = 0, bool East = false);
};
class cSources : public cConfig<cSource> {
diff --git a/tools.c b/tools.c
index 21ec526..fc8cb29 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.77 2003/04/06 15:31:45 kls Exp $
+ * $Id: tools.c 1.78 2004/01/11 15:42:30 kls Exp $
*/
#include "tools.h"
@@ -20,6 +20,14 @@
int SysLogLevel = 3;
+int BCD2INT(int x)
+{
+ return ((1000000 * BCDCHARTOINT((x >> 24) & 0xFF)) +
+ (10000 * BCDCHARTOINT((x >> 16) & 0xFF)) +
+ (100 * BCDCHARTOINT((x >> 8) & 0xFF)) +
+ BCDCHARTOINT( x & 0xFF));
+}
+
ssize_t safe_read(int filedes, void *buffer, size_t size)
{
for (;;) {
diff --git a/tools.h b/tools.h
index a5a626c..5af8ffa 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.54 2002/12/15 14:59:53 kls Exp $
+ * $Id: tools.h 1.55 2004/01/11 15:42:15 kls Exp $
*/
#ifndef __TOOLS_H
@@ -52,6 +52,9 @@ template<class T> inline int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; }
template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
#endif
+#define BCDCHARTOINT(x) (10 * ((x & 0xF0) >> 4) + (x & 0xF))
+int BCD2INT(int x);
+
ssize_t safe_read(int filedes, void *buffer, size_t size);
ssize_t safe_write(int filedes, const void *buffer, size_t size);
void writechar(int filedes, char c);
diff --git a/vdr.5 b/vdr.5
index 761c400..10597f5 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.21 2004/01/02 15:24:21 kls Exp $
+.\" $Id: vdr.5 1.22 2004/01/05 15:26:33 kls Exp $
.\"
.TH vdr 5 "1 Jun 2003" "1.2.0" "Video Disk Recorder Files"
.SH NAME
@@ -544,7 +544,7 @@ l l.
\fBC\fR@<channel id> <channel name>
\fBE\fR@<event id> <start time> <duration> <table id>
\fBT\fR@<title>
-\fBS\fR@<subtitle>
+\fBS\fR@<short text>
\fBD\fR@<description>
\fBe\fR@
\fBc\fR@
@@ -566,7 +566,7 @@ l l.
<duration> @is the time (in seconds) that this event will take
<table id> @is a hex number that indicates the table this event is contained in (if this is left empty or 0 this event will not be overwritten or modified by data that comes from the DVB stream)
<title> @is the title of the event
-<subtitle> @is the subtitle (typically the name of the episode etc.)
+<short text> @is the short text of the event (typically the name of the episode etc.)
<description> @is the description of the event (any '|' characters will be interpreted as newlines)
.TE