vdr  2.6.9
nit.c
Go to the documentation of this file.
1 /*
2  * nit.c: NIT section filter
3  *
4  * See the main source file 'vdr.c' for copyright information and
5  * how to reach the author.
6  *
7  * $Id: nit.c 5.4 2024/05/29 11:13:34 kls Exp $
8  */
9 
10 #include "nit.h"
11 #include <linux/dvb/frontend.h>
12 #include "channels.h"
13 #include "dvbdevice.h"
14 #include "eitscan.h"
15 #include "libsi/section.h"
16 #include "libsi/descriptor.h"
17 #include "tools.h"
18 
19 #define DVB_SYSTEM_1 0 // see also dvbdevice.c
20 #define DVB_SYSTEM_2 1
21 
22 #define MAXNETWORKNAME Utf8BufSize(256)
23 
24 // Set to 'true' for debug output:
25 static bool DebugNit = false;
26 
27 #define dbgnit(a...) if (DebugNit) fprintf(stderr, a)
28 
30 {
31  sdtFilter = SdtFilter;
32  Set(0x10, SI::TableIdNIT);
33 }
34 
35 void cNitFilter::SetStatus(bool On)
36 {
39 }
40 
41 void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
42 {
43  SI::NIT nit(Data, false);
44  if (!nit.CheckCRCAndParse())
45  return;
47  return;
48  if (DebugNit) {
49  char NetworkName[MAXNETWORKNAME] = "";
50  SI::Descriptor *d;
51  for (SI::Loop::Iterator it; (d = nit.commonDescriptors.getNext(it)); ) {
52  switch (d->getDescriptorTag()) {
55  nnd->name.getText(NetworkName, MAXNETWORKNAME);
56  }
57  break;
58  default: ;
59  }
60  delete d;
61  }
62  dbgnit("NIT: %02X %2d %2d %2d %s %d %d '%s'\n", Tid, nit.getVersionNumber(), nit.getSectionNumber(), nit.getLastSectionNumber(), *cSource::ToString(Source()), nit.getNetworkId(), Transponder(), NetworkName);
63  }
64  cStateKey StateKey;
65  cChannels *Channels = cChannels::GetChannelsWrite(StateKey, 10);
66  if (!Channels)
67  return;
68  bool ChannelsModified = false;
70  for (SI::Loop::Iterator it; nit.transportStreamLoop.getNext(ts, it); ) {
71  SI::Descriptor *d;
72 
75  int NumFrequencies = fld ? fld->frequencies.getCount() + 1 : 1;
76  int Frequencies[NumFrequencies];
77  if (fld) {
78  int ct = fld->getCodingType();
79  if (ct > 0) {
80  int n = 1;
81  for (SI::Loop::Iterator it3; fld->frequencies.hasNext(it3); ) {
82  int f = fld->frequencies.getNext(it3);
83  switch (ct) {
84  case 1: f = round(BCD2INT(f) / 100.0); break;
85  case 2: f = round(BCD2INT(f) / 10.0); break;
86  case 3: f = f * 10; break;
87  default: ;
88  }
89  Frequencies[n++] = f;
90  dbgnit(" Frequencies[%d] = %d\n", n - 1, f);
91  }
92  }
93  else
94  NumFrequencies = 1;
95  }
96  delete fld;
97 
98  // Necessary for "backwards compatibility mode" according to ETSI EN 300 468:
99  bool ForceDVBS2 = false;
100  for (SI::Loop::Iterator it2; (d = ts.transportStreamDescriptors.getNext(it2)); ) {
102  ForceDVBS2 = true;
103  delete d;
104  break;
105  }
106  delete d;
107  }
108 
109  for (SI::Loop::Iterator it2; (d = ts.transportStreamDescriptors.getNext(it2)); ) {
110  switch (d->getDescriptorTag()) {
115  int Frequency = Frequencies[0] = round(BCD2INT(sd->getFrequency()) / 100.0);
116  static char Polarizations[] = { 'H', 'V', 'L', 'R' };
117  dtp.SetPolarization(Polarizations[sd->getPolarization()]);
118  static int CodeRates[] = { FEC_NONE, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_8_9, FEC_3_5, FEC_4_5, FEC_9_10, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_NONE };
119  dtp.SetCoderateH(CodeRates[sd->getFecInner()]);
120  static int Modulations[] = { QAM_AUTO, QPSK, PSK_8, QAM_16 };
121  dtp.SetModulation(Modulations[sd->getModulationType()]);
122  bool System = sd->getModulationSystem() || ForceDVBS2;
123  dtp.SetSystem(System ? DVB_SYSTEM_2 : DVB_SYSTEM_1);
124  static int RollOffs[] = { ROLLOFF_35, ROLLOFF_25, ROLLOFF_20, ROLLOFF_AUTO };
125  dtp.SetRollOff(System ? RollOffs[sd->getRollOff()] : ROLLOFF_AUTO);
126  int SymbolRate = BCD2INT(sd->getSymbolRate()) / 10;
127  dbgnit(" %s %d %c %d %d DVB-S%d\n", *cSource::ToString(Source), Frequency, dtp.Polarization(), SymbolRate, cChannel::Transponder(Frequency, dtp.Polarization()), System ? 2 : 1);
128  if (Setup.UpdateChannels >= 5) {
129  bool found = false;
130  bool forceTransponderUpdate = false;
131  for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) {
132  if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
133  // Preserve parameters set separately in S2SatelliteDeliverySystemDescriptor:
135  dtp.SetStreamId(dtpc.StreamId());
136  //
137  int transponder = Channel->Transponder();
138  if (!ISTRANSPONDER(cChannel::Transponder(Frequency, dtp.Polarization()), transponder)) {
139  for (int n = 0; n < NumFrequencies; n++) {
140  if (ISTRANSPONDER(cChannel::Transponder(Frequencies[n], dtp.Polarization()), transponder)) {
141  Frequency = Frequencies[n];
142  break;
143  }
144  }
145  }
146  if (!ISTRANSPONDER(cChannel::Transponder(Frequency, dtp.Polarization()), transponder))
147  continue; // a channel with obsolete/wrong/other(?) transponder
148  found = true;
149  dtp.SetLcn(Channel->Lcn()); // lcn is set on another descriptor
150  if (ISTRANSPONDER(transponder, Transponder())) // only modify channels if we're actually receiving this transponder
151  ChannelsModified |= Channel->SetTransponderData(Source, Frequency, SymbolRate, dtp.ToString('S'));
152  else if (Channel->Srate() != SymbolRate || strcmp(Channel->Parameters(), dtp.ToString('S')))
153  forceTransponderUpdate = true; // get us receiving this transponder
154  }
155  }
156  if (!found || forceTransponderUpdate) {
157  for (int n = 0; n < NumFrequencies; n++) {
158  cChannel *Channel = new cChannel;
159  Channel->SetId(NULL, ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0);
160  if (Channel->SetTransponderData(Source, Frequencies[n], SymbolRate, dtp.ToString('S')))
162  else
163  delete Channel;
164  }
165  }
166  }
167  }
168  break;
170  if (Setup.UpdateChannels >= 5) {
171  for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) {
176  dbgnit(" stream id = %d\n", dtp.StreamId());
177  ChannelsModified |= Channel->SetTransponderData(Channel->Source(), Channel->Frequency(), Channel->Srate(), dtp.ToString('S'));
178  break;
179  }
180  }
181  }
182  }
183  break;
188  int Frequency = Frequencies[0] = round(BCD2INT(sd->getFrequency()) / 10.0);
189  //XXX FEC_outer???
190  static int CodeRates[] = { FEC_NONE, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_8_9, FEC_3_5, FEC_4_5, FEC_9_10, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_NONE };
191  dtp.SetCoderateH(CodeRates[sd->getFecInner()]);
192  static int Modulations[] = { QPSK, QAM_16, QAM_32, QAM_64, QAM_128, QAM_256, QAM_AUTO };
193  dtp.SetModulation(Modulations[min(sd->getModulation(), 6)]);
194  int SymbolRate = BCD2INT(sd->getSymbolRate()) / 10;
195  dbgnit(" %s %d %d %d %d\n", *cSource::ToString(Source), Frequency, dtp.CoderateH(), dtp.Modulation(), SymbolRate);
196  if (Setup.UpdateChannels >= 5) {
197  bool found = false;
198  bool forceTransponderUpdate = false;
199  for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) {
200  if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
201  int transponder = Channel->Transponder();
202  if (!ISTRANSPONDER(Frequency / 1000, transponder)) {
203  for (int n = 0; n < NumFrequencies; n++) {
204  if (ISTRANSPONDER(Frequencies[n] / 1000, transponder)) {
205  Frequency = Frequencies[n];
206  break;
207  }
208  }
209  }
210  if (!ISTRANSPONDER(Frequency / 1000, transponder))
211  continue; // a channel with obsolete/wrong/other(?) transponder
212  found = true;
213  dtp.SetLcn(Channel->Lcn()); // lcn is set on another descriptor
214  if (ISTRANSPONDER(transponder, Transponder())) // only modify channels if we're actually receiving this transponder
215  ChannelsModified |= Channel->SetTransponderData(Source, Frequency, SymbolRate, dtp.ToString('C'));
216  else if (Channel->Srate() != SymbolRate || strcmp(Channel->Parameters(), dtp.ToString('C')))
217  forceTransponderUpdate = true; // get us receiving this transponder
218  }
219  }
220  if (!found || forceTransponderUpdate) {
221  for (int n = 0; n < NumFrequencies; n++) {
222  cChannel *Channel = new cChannel;
223  Channel->SetId(NULL, ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0);
224  if (Channel->SetTransponderData(Source, Frequencies[n], SymbolRate, dtp.ToString('C')))
226  else
227  delete Channel;
228  }
229  }
230  }
231  }
232  break;
237  int Frequency = Frequencies[0] = sd->getFrequency() * 10;
238  static int Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 0, 0, 0, 0 };
239  dtp.SetBandwidth(Bandwidths[sd->getBandwidth()]);
240  static int Constellations[] = { QPSK, QAM_16, QAM_64, QAM_AUTO };
241  dtp.SetModulation(Constellations[sd->getConstellation()]);
242  dtp.SetSystem(DVB_SYSTEM_1);
243  static int Hierarchies[] = { HIERARCHY_NONE, HIERARCHY_1, HIERARCHY_2, HIERARCHY_4, HIERARCHY_AUTO, HIERARCHY_AUTO, HIERARCHY_AUTO, HIERARCHY_AUTO };
244  dtp.SetHierarchy(Hierarchies[sd->getHierarchy()]);
245  static int CodeRates[] = { FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_AUTO, FEC_AUTO, FEC_AUTO };
246  dtp.SetCoderateH(CodeRates[sd->getCodeRateHP()]);
247  dtp.SetCoderateL(CodeRates[sd->getCodeRateLP()]);
248  static int GuardIntervals[] = { GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4 };
249  dtp.SetGuard(GuardIntervals[sd->getGuardInterval()]);
250  static int TransmissionModes[] = { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_4K, TRANSMISSION_MODE_AUTO };
251  dtp.SetTransmission(TransmissionModes[sd->getTransmissionMode()]);
252  dbgnit(" %s %d %d %d %d %d %d %d %d\n", *cSource::ToString(Source), Frequency, dtp.Bandwidth(), dtp.Modulation(), dtp.Hierarchy(), dtp.CoderateH(), dtp.CoderateL(), dtp.Guard(), dtp.Transmission());
253  if (Setup.UpdateChannels >= 5) {
254  bool found = false;
255  bool forceTransponderUpdate = false;
256  for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) {
257  if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
258  // Preserve parameters set separately in T2DeliverySystemDescripto:
260  dtp.SetSystem(dtpc.System());
261  dtp.SetStreamId(dtpc.StreamId());
262  dtp.SetT2SystemId(dtpc.T2SystemId());
263  dtp.SetSisoMiso(dtpc.SisoMiso());
264  dtp.SetBandwidth(dtpc.Bandwidth());
265  dtp.SetGuard(dtpc.Guard());
266  dtp.SetTransmission(dtpc.Transmission());
267  //
268  int transponder = Channel->Transponder();
269  if (!ISTRANSPONDER(Frequency / 1000000, transponder)) {
270  for (int n = 0; n < NumFrequencies; n++) {
271  if (ISTRANSPONDER(Frequencies[n] / 1000000, transponder)) {
272  Frequency = Frequencies[n];
273  break;
274  }
275  }
276  }
277  if (!ISTRANSPONDER(Frequency / 1000000, transponder))
278  continue; // a channel with obsolete/wrong/other(?) transponder
279  found = true;
280  dtp.SetLcn(Channel->Lcn()); // lcn is set on another descriptor
281  if (ISTRANSPONDER(transponder, Transponder())) // only modify channels if we're actually receiving this transponder
282  ChannelsModified |= Channel->SetTransponderData(Source, Frequency, 0, dtp.ToString('T'));
283  else if (strcmp(Channel->Parameters(), dtp.ToString('T')))
284  forceTransponderUpdate = true; // get us receiving this transponder
285  }
286  }
287  if (!found || forceTransponderUpdate) {
288  for (int n = 0; n < NumFrequencies; n++) {
289  cChannel *Channel = new cChannel;
290  Channel->SetId(NULL, ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0);
291  if (Channel->SetTransponderData(Source, Frequencies[n], 0, dtp.ToString('T')))
293  else
294  delete Channel;
295  }
296  }
297  }
298  }
299  break;
302  switch (sd->getExtensionDescriptorTag()) {
304  if (Setup.UpdateChannels >= 5) {
305  for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) {
307  if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
309  int Frequency = Channel->Frequency();
310  int SymbolRate = Channel->Srate();
312  dtp.SetSystem(DVB_SYSTEM_2);
313  dtp.SetStreamId(td->getPlpId());
314  dtp.SetT2SystemId(td->getT2SystemId());
315  if (td->getExtendedDataFlag()) {
316  dtp.SetSisoMiso(td->getSisoMiso());
317  static int T2Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 10000000, 1712000, 0, 0 };
318  dtp.SetBandwidth(T2Bandwidths[td->getBandwidth()]);
319  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 };
320  dtp.SetGuard(T2GuardIntervals[td->getGuardInterval()]);
321  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 };
322  dtp.SetTransmission(T2TransmissionModes[td->getTransmissionMode()]);
323  //TODO add parsing of frequencies
324  }
325  dbgnit(" stream id = %d\n", dtp.StreamId());
326  ChannelsModified |= Channel->SetTransponderData(Source, Frequency, SymbolRate, dtp.ToString('T'));
327  }
328  }
329  }
330  }
331  break;
332  default: ;
333  }
334  }
335  break;
340  for (SI::Loop::Iterator it4; lcd->logicalChannelLoop.getNext(LogicalChannel, it4); ) {
341  if (LogicalChannel.getVisibleServiceFlag()) {
342  int lcn = LogicalChannel.getLogicalChannelNumber();
343  int sid = LogicalChannel.getServiceId();
344  for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) {
345  if (!Channel->GroupSep() && Channel->Sid() == sid && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
347  dtp.SetLcn(lcn); // for storing lcn into channels.conf
349  ChannelsModified |= Channel->SetLcn(lcn);
350  break;
351  }
352  }
353  }
354  }
355  }
356  break;
361  for (SI::Loop::Iterator it4; lcd->hdSimulcastLogicalChannelLoop.getNext(HdSimulcastLogicalChannel, it4); ) {
362  if (HdSimulcastLogicalChannel.getVisibleServiceFlag()) {
363  int lcn = HdSimulcastLogicalChannel.getLogicalChannelNumber();
364  int sid = HdSimulcastLogicalChannel.getServiceId();
365  for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) {
366  if (!Channel->GroupSep() && Channel->Sid() == sid && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
368  dtp.SetLcn(lcn); // for storing lcn into channels.conf
370  ChannelsModified |= Channel->SetLcn(lcn);
371  break;
372  }
373  }
374  }
375  }
376  }
377  break;
378  default: ;
379  }
380  delete d;
381  }
382  }
384  dbgnit(" trigger sdtFilter for current tp %d\n", Transponder());
386  }
387  StateKey.Remove(ChannelsModified);
388 }
#define ISTRANSPONDER(f1, f2)
Definition: channels.h:18
bool CheckCRCAndParse()
Definition: si.c:65
Descriptor * getNext(Iterator &it)
Definition: si.c:112
DescriptorTag getDescriptorTag() const
Definition: si.c:100
int getExtensionDescriptorTag() const
Definition: descriptor.c:889
TypeLoop< ThirtyTwoBit > frequencies
Definition: descriptor.h:351
StructureLoop< HdSimulcastLogicalChannel > hdSimulcastLogicalChannelLoop
Definition: descriptor.h:592
StructureLoop< LogicalChannel > logicalChannelLoop
Definition: descriptor.h:574
int getOriginalNetworkId() const
Definition: section.c:106
int getTransportStreamId() const
Definition: section.c:102
DescriptorLoop transportStreamDescriptors
Definition: section.h:100
int getNetworkId() const
Definition: section.c:89
DescriptorLoop commonDescriptors
Definition: section.h:106
StructureLoop< TransportStream > transportStreamLoop
Definition: section.h:107
int getSectionNumber() const
Definition: si.c:88
int getLastSectionNumber() const
Definition: si.c:92
int getVersionNumber() const
Definition: si.c:84
char * getText()
Definition: si.c:222
int getCount()
Definition: si.h:435
T getNext(Iterator &it) const
Definition: si.h:452
bool hasNext(Iterator &it)
Definition: si.h:458
int Nid(void) const
Definition: channels.h:176
int Lcn(void) const
Definition: channels.h:180
int Tid(void) const
Definition: channels.h:177
int Source(void) const
Definition: channels.h:154
bool GroupSep(void) const
Definition: channels.h:183
bool SetLcn(int Lcn)
Definition: channels.c:258
int Frequency(void) const
Returns the actual frequency, as given in 'channels.conf'.
Definition: channels.h:151
bool SetTransponderData(int Source, int Frequency, int Srate, const char *Parameters, bool Quiet=false)
Definition: channels.c:189
const char * Parameters(void) const
Definition: channels.h:185
bool SetId(cChannels *Channels, int Nid, int Tid, int Sid, int Rid=0)
Definition: channels.c:238
int Transponder(void) const
Returns the transponder frequency in MHz, plus the polarization in case of sat.
Definition: channels.c:155
int Srate(void) const
Definition: channels.h:155
int Sid(void) const
Definition: channels.h:178
static cChannels * GetChannelsWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of channels for write access.
Definition: channels.c:862
void SetGuard(int Guard)
Definition: dvbdevice.h:152
int StreamId(void) const
Definition: dvbdevice.h:139
cString ToString(char Type) const
Definition: dvbdevice.c:217
char Polarization(void) const
Definition: dvbdevice.h:128
void SetSystem(int System)
Definition: dvbdevice.h:150
void SetSisoMiso(int SisoMiso)
Definition: dvbdevice.h:157
void SetModulation(int Modulation)
Definition: dvbdevice.h:149
int Guard(void) const
Definition: dvbdevice.h:136
int T2SystemId(void) const
Definition: dvbdevice.h:140
void SetRollOff(int RollOff)
Definition: dvbdevice.h:154
void SetCoderateL(int CoderateL)
Definition: dvbdevice.h:148
void SetCoderateH(int CoderateH)
Definition: dvbdevice.h:147
void SetT2SystemId(int T2SystemId)
Definition: dvbdevice.h:156
void SetBandwidth(int Bandwidth)
Definition: dvbdevice.h:146
void SetLcn(int Lcn)
Definition: dvbdevice.h:159
int CoderateL(void) const
Definition: dvbdevice.h:132
void SetPolarization(char Polarization)
Definition: dvbdevice.h:144
int Transmission(void) const
Definition: dvbdevice.h:135
int SisoMiso(void) const
Definition: dvbdevice.h:141
int Bandwidth(void) const
Definition: dvbdevice.h:130
int System(void) const
Definition: dvbdevice.h:134
void SetTransmission(int Transmission)
Definition: dvbdevice.h:151
void SetHierarchy(int Hierarchy)
Definition: dvbdevice.h:153
int Modulation(void) const
Definition: dvbdevice.h:133
void SetStreamId(int StreamId)
Definition: dvbdevice.h:155
int Hierarchy(void) const
Definition: dvbdevice.h:137
int CoderateH(void) const
Definition: dvbdevice.h:131
void AddTransponder(cChannel *Channel)
Definition: eitscan.c:122
void Set(u_short Pid, u_char Tid, u_char Mask=0xFF)
Sets the given filter data by calling Add() with Sticky = true.
Definition: filter.c:211
int Transponder(void)
Returns the transponder of the data delivered to this filter.
Definition: filter.c:168
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
Definition: filter.c:178
int Source(void)
Returns the source of the data delivered to this filter.
Definition: filter.c:163
const cChannel * Channel(void)
Returns the channel of the data delivered to this filter.
Definition: filter.c:173
const T * Next(const T *Object) const
< Returns the element immediately before Object in this list, or NULL if Object is the first element ...
Definition: tools.h:663
const T * First(void) const
Returns the first element in this list, or NULL if the list is empty.
Definition: tools.h:656
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
Definition: nit.c:35
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
Processes the data delivered to this filter.
Definition: nit.c:41
cSectionSyncer sectionSyncer
Definition: nit.h:18
cNitFilter(cSdtFilter *SdtFilter)
Definition: nit.c:29
cSdtFilter * sdtFilter
Definition: nit.h:19
Definition: sdt.h:16
void Trigger(int Source)
Definition: sdt.c:45
bool Check(uchar Version, int SectionNumber)
Returns true if Version is not the current version, or the given SectionNumber has not been marked as...
Definition: filter.c:31
bool Processed(int SectionNumber, int LastSectionNumber, int SegmentLastSectionNumber=-1)
Marks the given SectionNumber as processed.
Definition: filter.c:54
void Reset(void)
Definition: filter.c:21
int StandardCompliance
Definition: config.h:290
int UpdateChannels
Definition: config.h:327
static cString ToString(int Code)
Definition: sources.c:55
static char ToChar(int Code)
Definition: sources.h:51
static bool IsSat(int Code)
Definition: sources.h:57
@ stCable
Definition: sources.h:20
@ stSat
Definition: sources.h:21
@ stTerr
Definition: sources.h:22
static int FromData(eSourceType SourceType, int Position=0, bool East=false)
Definition: sources.c:104
void Remove(bool IncState=true)
Removes this key from the lock it was previously used with.
Definition: thread.c:867
cSetup Setup
Definition: config.c:372
#define STANDARD_NORDIG
Definition: config.h:79
@ TRANSMISSION_MODE_16K
Definition: dvbdevice.h:43
@ TRANSMISSION_MODE_1K
Definition: dvbdevice.h:42
@ TRANSMISSION_MODE_32K
Definition: dvbdevice.h:44
@ GUARD_INTERVAL_19_128
Definition: dvbdevice.h:48
@ GUARD_INTERVAL_19_256
Definition: dvbdevice.h:49
@ GUARD_INTERVAL_1_128
Definition: dvbdevice.h:47
@ TRANSMISSION_MODE_4K
Definition: dvbdevice.h:30
cEITScanner EITScanner
Definition: eitscan.c:104
@ TableIdNIT
Definition: si.h:27
@ S2SatelliteDeliverySystemDescriptorTag
Definition: si.h:135
@ CableDeliverySystemDescriptorTag
Definition: si.h:81
@ ExtensionDescriptorTag
Definition: si.h:139
@ HdSimulcastLogicalChannelDescriptorTag
Definition: si.h:145
@ T2DeliverySystemDescriptorTag
Definition: si.h:151
@ NetworkNameDescriptorTag
Definition: si.h:77
@ SatelliteDeliverySystemDescriptorTag
Definition: si.h:80
@ FrequencyListDescriptorTag
Definition: si.h:111
@ TerrestrialDeliverySystemDescriptorTag
Definition: si.h:103
@ LogicalChannelDescriptorTag
Definition: si.h:141
unsigned char u_char
Definition: headers.h:24
#define MAXNETWORKNAME
Definition: nit.c:22
#define DVB_SYSTEM_1
Definition: nit.c:19
static bool DebugNit
Definition: nit.c:25
#define dbgnit(a...)
Definition: nit.c:27
#define DVB_SYSTEM_2
Definition: nit.c:20
int BCD2INT(int x)
Definition: tools.c:45
T min(T a, T b)
Definition: tools.h:63