summaryrefslogtreecommitdiff
path: root/nit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-01-12 08:43:52 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-01-12 08:43:52 +0100
commit44da06f3848d84961f9ae829adc32b088f167ab6 (patch)
treec2525b2ddb6711fecb65c2439cf4ce71f789b3dd /nit.c
parent303e85e3a34e55de91f8bdc35c5bb6f4e505e112 (diff)
downloadvdr-44da06f3848d84961f9ae829adc32b088f167ab6.tar.gz
vdr-44da06f3848d84961f9ae829adc32b088f167ab6.tar.bz2
Fixes from Rolf Ahrenberg
Diffstat (limited to 'nit.c')
-rw-r--r--nit.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/nit.c b/nit.c
index b8c4d642..c18aa826 100644
--- a/nit.c
+++ b/nit.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: nit.c 2.8 2012/01/11 12:16:33 kls Exp $
+ * $Id: nit.c 2.9 2012/01/12 08:43:52 kls Exp $
*/
#include "nit.h"
@@ -307,26 +307,30 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
SI::ExtensionDescriptor *sd = (SI::ExtensionDescriptor *)d;
switch (sd->getExtensionDescriptorTag()) {
case SI::T2DeliverySystemDescriptorTag: {
- for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
- int Source = cSource::FromData(cSource::stTerr);
- if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
- SI::T2DeliverySystemDescriptor *td = (SI::T2DeliverySystemDescriptor *)d;
- int Frequency = Channel->Frequency();
- int SymbolRate = Channel->Srate();
- cDvbTransponderParameters dtp(Channel->Parameters());
- dtp.SetSystem(DVB_SYSTEM_1);
- dtp.SetPlpId(td->getPlpId());
- if (td->getExtendedDataFlag()) {
- static int T2Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 10000000, 1712000, 0, 0 };
- dtp.SetBandwidth(T2Bandwidths[td->getBandwidth()]);
- static int T2GuardIntervals[] = { GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, GUARD_INTERVAL_1_128, GUARD_INTERVAL_19_128, GUARD_INTERVAL_19_256, 0 };
- dtp.SetGuard(T2GuardIntervals[td->getGuardInterval()]);
- static int T2TransmissionModes[] = { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_4K, TRANSMISSION_MODE_1K, TRANSMISSION_MODE_16K, TRANSMISSION_MODE_32K, TRANSMISSION_MODE_AUTO, TRANSMISSION_MODE_AUTO };
- dtp.SetTransmission(T2TransmissionModes[td->getTransmissionMode()]);
+ if (Setup.UpdateChannels >= 5) {
+ for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
+ int Source = cSource::FromData(cSource::stTerr);
+ if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
+ SI::T2DeliverySystemDescriptor *td = (SI::T2DeliverySystemDescriptor *)d;
+ int Frequency = Channel->Frequency();
+ int SymbolRate = Channel->Srate();
+ //int SystemId = td->getSystemId();
+ cDvbTransponderParameters dtp(Channel->Parameters());
+ dtp.SetSystem(DVB_SYSTEM_2);
+ dtp.SetPlpId(td->getPlpId());
+ if (td->getExtendedDataFlag()) {
+ static int T2Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 10000000, 1712000, 0, 0 };
+ dtp.SetBandwidth(T2Bandwidths[td->getBandwidth()]);
+ static int T2GuardIntervals[] = { GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, GUARD_INTERVAL_1_128, GUARD_INTERVAL_19_128, GUARD_INTERVAL_19_256, 0 };
+ dtp.SetGuard(T2GuardIntervals[td->getGuardInterval()]);
+ static int T2TransmissionModes[] = { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_4K, TRANSMISSION_MODE_1K, TRANSMISSION_MODE_16K, TRANSMISSION_MODE_32K, TRANSMISSION_MODE_AUTO, TRANSMISSION_MODE_AUTO };
+ dtp.SetTransmission(T2TransmissionModes[td->getTransmissionMode()]);
+ //TODO add parsing of frequencies
+ }
+ Channel->SetTransponderData(Source, Frequency, SymbolRate, dtp.ToString('T'));
}
- Channel->SetTransponderData(Source, Frequency, SymbolRate, dtp.ToString('T'));
}
- }
+ }
}
break;
default: ;