1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixes from Rolf Ahrenberg

This commit is contained in:
Klaus Schmidinger 2012-01-12 08:43:52 +01:00
parent 303e85e3a3
commit 44da06f384

42
nit.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #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; SI::ExtensionDescriptor *sd = (SI::ExtensionDescriptor *)d;
switch (sd->getExtensionDescriptorTag()) { switch (sd->getExtensionDescriptorTag()) {
case SI::T2DeliverySystemDescriptorTag: { case SI::T2DeliverySystemDescriptorTag: {
for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { if (Setup.UpdateChannels >= 5) {
int Source = cSource::FromData(cSource::stTerr); for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { int Source = cSource::FromData(cSource::stTerr);
SI::T2DeliverySystemDescriptor *td = (SI::T2DeliverySystemDescriptor *)d; if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
int Frequency = Channel->Frequency(); SI::T2DeliverySystemDescriptor *td = (SI::T2DeliverySystemDescriptor *)d;
int SymbolRate = Channel->Srate(); int Frequency = Channel->Frequency();
cDvbTransponderParameters dtp(Channel->Parameters()); int SymbolRate = Channel->Srate();
dtp.SetSystem(DVB_SYSTEM_1); //int SystemId = td->getSystemId();
dtp.SetPlpId(td->getPlpId()); cDvbTransponderParameters dtp(Channel->Parameters());
if (td->getExtendedDataFlag()) { dtp.SetSystem(DVB_SYSTEM_2);
static int T2Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 10000000, 1712000, 0, 0 }; dtp.SetPlpId(td->getPlpId());
dtp.SetBandwidth(T2Bandwidths[td->getBandwidth()]); if (td->getExtendedDataFlag()) {
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 }; static int T2Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 10000000, 1712000, 0, 0 };
dtp.SetGuard(T2GuardIntervals[td->getGuardInterval()]); dtp.SetBandwidth(T2Bandwidths[td->getBandwidth()]);
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 }; 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.SetTransmission(T2TransmissionModes[td->getTransmissionMode()]); 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; break;
default: ; default: ;