11 #include <linux/dvb/frontend.h>
19 #define DVB_SYSTEM_1 0
20 #define DVB_SYSTEM_2 1
22 #define MAXNETWORKNAME Utf8BufSize(256)
27 #define dbgnit(a...) if (DebugNit) fprintf(stderr, a)
68 bool ChannelsModified =
false;
76 int Frequencies[NumFrequencies];
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;
90 dbgnit(
" Frequencies[%d] = %d\n", n - 1, f);
99 bool ForceDVBS2 =
false;
116 static char Polarizations[] = {
'H',
'V',
'L',
'R' };
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 };
120 static int Modulations[] = { QAM_AUTO, QPSK, PSK_8, QAM_16 };
124 static int RollOffs[] = { ROLLOFF_35, ROLLOFF_25, ROLLOFF_20, ROLLOFF_AUTO };
130 bool forceTransponderUpdate =
false;
139 for (
int n = 0; n < NumFrequencies; n++) {
141 Frequency = Frequencies[n];
153 forceTransponderUpdate =
true;
156 if (!found || forceTransponderUpdate) {
157 for (
int n = 0; n < NumFrequencies; n++) {
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 };
192 static int Modulations[] = { QPSK, QAM_16, QAM_32, QAM_64, QAM_128, QAM_256, QAM_AUTO };
198 bool forceTransponderUpdate =
false;
203 for (
int n = 0; n < NumFrequencies; n++) {
205 Frequency = Frequencies[n];
217 forceTransponderUpdate =
true;
220 if (!found || forceTransponderUpdate) {
221 for (
int n = 0; n < NumFrequencies; n++) {
237 int Frequency = Frequencies[0] = sd->
getFrequency() * 10;
238 static int Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 0, 0, 0, 0 };
240 static int Constellations[] = { QPSK, QAM_16, QAM_64, QAM_AUTO };
243 static int Hierarchies[] = { HIERARCHY_NONE, HIERARCHY_1, HIERARCHY_2, HIERARCHY_4, HIERARCHY_AUTO, HIERARCHY_AUTO, HIERARCHY_AUTO, HIERARCHY_AUTO };
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 };
248 static int GuardIntervals[] = { GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4 };
250 static int TransmissionModes[] = { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K,
TRANSMISSION_MODE_4K, TRANSMISSION_MODE_AUTO };
255 bool forceTransponderUpdate =
false;
270 for (
int n = 0; n < NumFrequencies; n++) {
272 Frequency = Frequencies[n];
284 forceTransponderUpdate =
true;
287 if (!found || forceTransponderUpdate) {
288 for (
int n = 0; n < NumFrequencies; n++) {
317 static int T2Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 10000000, 1712000, 0, 0 };
387 StateKey.
Remove(ChannelsModified);
#define ISTRANSPONDER(f1, f2)
int getModulation() const
int getSymbolRate() const
Descriptor * getNext(Iterator &it)
DescriptorTag getDescriptorTag() const
int getExtensionDescriptorTag() const
TypeLoop< ThirtyTwoBit > frequencies
int getCodingType() const
int getVisibleServiceFlag() const
int getLogicalChannelNumber() const
StructureLoop< HdSimulcastLogicalChannel > hdSimulcastLogicalChannelLoop
int getLogicalChannelNumber() const
int getVisibleServiceFlag() const
StructureLoop< LogicalChannel > logicalChannelLoop
int getOriginalNetworkId() const
int getTransportStreamId() const
DescriptorLoop transportStreamDescriptors
DescriptorLoop commonDescriptors
StructureLoop< TransportStream > transportStreamLoop
int getSectionNumber() const
int getLastSectionNumber() const
int getVersionNumber() const
int getInputStreamIdentifier() const
int getSymbolRate() const
int getWestEastFlag() const
int getPolarization() const
int getOrbitalPosition() const
int getModulationSystem() const
int getModulationType() const
int getT2SystemId() const
int getTransmissionMode() const
int getGuardInterval() const
int getExtendedDataFlag() const
int getGuardInterval() const
int getCodeRateLP() const
int getCodeRateHP() const
int getTransmissionMode() const
int getConstellation() const
T getNext(Iterator &it) const
bool hasNext(Iterator &it)
bool GroupSep(void) const
int Frequency(void) const
Returns the actual frequency, as given in 'channels.conf'.
bool SetTransponderData(int Source, int Frequency, int Srate, const char *Parameters, bool Quiet=false)
const char * Parameters(void) const
bool SetId(cChannels *Channels, int Nid, int Tid, int Sid, int Rid=0)
int Transponder(void) const
Returns the transponder frequency in MHz, plus the polarization in case of sat.
static cChannels * GetChannelsWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of channels for write access.
cString ToString(char Type) const
char Polarization(void) const
void SetSystem(int System)
void SetSisoMiso(int SisoMiso)
void SetModulation(int Modulation)
int T2SystemId(void) const
void SetRollOff(int RollOff)
void SetCoderateL(int CoderateL)
void SetCoderateH(int CoderateH)
void SetT2SystemId(int T2SystemId)
void SetBandwidth(int Bandwidth)
int CoderateL(void) const
void SetPolarization(char Polarization)
int Transmission(void) const
int Bandwidth(void) const
void SetTransmission(int Transmission)
void SetHierarchy(int Hierarchy)
int Modulation(void) const
void SetStreamId(int StreamId)
int Hierarchy(void) const
int CoderateH(void) const
void AddTransponder(cChannel *Channel)
void Set(u_short Pid, u_char Tid, u_char Mask=0xFF)
Sets the given filter data by calling Add() with Sticky = true.
int Transponder(void)
Returns the transponder of the data delivered to this filter.
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
int Source(void)
Returns the source of the data delivered to this filter.
const cChannel * Channel(void)
Returns the channel of the data delivered to this filter.
const T * Next(const T *Object) const
< Returns the element immediately before Object in this list, or NULL if Object is the first element ...
const T * First(void) const
Returns the first element in this list, or NULL if the list is empty.
cSectionSyncer sectionSyncer
cNitFilter(cSdtFilter *SdtFilter)
virtual void SetStatus(bool On) override
Turns this filter on or off, depending on the value of On.
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length) override
Processes the data delivered to this filter.
bool Check(uchar Version, int SectionNumber)
Returns true if Version is not the current version, or the given SectionNumber has not been marked as...
bool Processed(int SectionNumber, int LastSectionNumber, int SegmentLastSectionNumber=-1)
Marks the given SectionNumber as processed.
static cString ToString(int Code)
static char ToChar(int Code)
static bool IsSat(int Code)
static int FromData(eSourceType SourceType, int Position=0, bool East=false)
void Remove(bool IncState=true)
Removes this key from the lock it was previously used with.
@ S2SatelliteDeliverySystemDescriptorTag
@ CableDeliverySystemDescriptorTag
@ HdSimulcastLogicalChannelDescriptorTag
@ T2DeliverySystemDescriptorTag
@ NetworkNameDescriptorTag
@ SatelliteDeliverySystemDescriptorTag
@ FrequencyListDescriptorTag
@ TerrestrialDeliverySystemDescriptorTag
@ LogicalChannelDescriptorTag