11 #include <linux/dvb/frontend.h>
19 #define DVB_SYSTEM_1 0 // see also dvbdevice.c
20 #define DVB_SYSTEM_2 1
22 #define MAXNETWORKNAME Utf8BufSize(256)
27 #define dbgnit(a...) if (DebugNit) fprintf(stderr, a)
70 bool ChannelsModified =
false;
78 int Frequencies[NumFrequencies];
86 case 1: f =
BCD2INT(f) / 100;
break;
87 case 2: f =
BCD2INT(f) / 10;
break;
88 case 3: f = f * 10;
break;
92 dbgnit(
" Frequencies[%d] = %d\n", n - 1, f);
107 static char Polarizations[] = {
'H',
'V',
'L',
'R' };
109 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 };
111 static int Modulations[] = { QAM_AUTO, QPSK, PSK_8, QAM_16 };
114 static int RollOffs[] = { ROLLOFF_35, ROLLOFF_25, ROLLOFF_20, ROLLOFF_AUTO };
120 bool forceTransponderUpdate =
false;
131 for (
int n = 0; n < NumFrequencies; n++) {
133 Frequency = Frequencies[n];
141 forceTransponderUpdate =
true;
144 if (!found || forceTransponderUpdate) {
145 for (
int n = 0; n < NumFrequencies; n++) {
166 dbgnit(
" stream id = %d\n", dtp.StreamId());
180 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 };
182 static int Modulations[] = { QPSK, QAM_16, QAM_32, QAM_64, QAM_128, QAM_256, QAM_AUTO };
188 bool forceTransponderUpdate =
false;
195 for (
int n = 0; n < NumFrequencies; n++) {
197 Frequency = Frequencies[n];
205 forceTransponderUpdate =
true;
208 if (!found || forceTransponderUpdate) {
209 for (
int n = 0; n < NumFrequencies; n++) {
227 int Frequency = Frequencies[0] = sd->
getFrequency() * 10;
228 static int Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 0, 0, 0, 0 };
230 static int Constellations[] = { QPSK, QAM_16, QAM_64, QAM_AUTO };
233 static int Hierarchies[] = { HIERARCHY_NONE, HIERARCHY_1, HIERARCHY_2, HIERARCHY_4, HIERARCHY_AUTO, HIERARCHY_AUTO, HIERARCHY_AUTO, HIERARCHY_AUTO };
235 static int CodeRates[] = { FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_AUTO, FEC_AUTO, FEC_AUTO };
238 static int GuardIntervals[] = { GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4 };
240 static int TransmissionModes[] = { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K,
TRANSMISSION_MODE_4K, TRANSMISSION_MODE_AUTO };
245 bool forceTransponderUpdate =
false;
262 for (
int n = 0; n < NumFrequencies; n++) {
264 Frequency = Frequencies[n];
272 forceTransponderUpdate =
true;
275 if (!found || forceTransponderUpdate) {
276 for (
int n = 0; n < NumFrequencies; n++) {
307 static int T2Bandwidths[] = { 8000000, 7000000, 6000000, 5000000, 10000000, 1712000, 0, 0 };
315 dbgnit(
" stream id = %d\n", dtp.StreamId());
373 StateKey.
Remove(ChannelsModified);
static cString ToString(int Code)
int getModulation() const
void SetTransmission(int Transmission)
int getOrbitalPosition() const
static char ToChar(int Code)
void SetPolarization(char Polarization)
int getGuardInterval() const
StructureLoop< LogicalChannel > logicalChannelLoop
int getTransportStreamId() const
int getWestEastFlag() const
int getExtendedDataFlag() const
int getModulationType() const
void Remove(bool IncState=true)
Removes this key from the lock it was previously used with.
const cChannel * Channel(void)
Returns the channel of the data delivered to this filter.
int getSymbolRate() const
bool SetId(cChannels *Channels, int Nid, int Tid, int Sid, int Rid=0)
bool GroupSep(void) const
int getTransmissionMode() const
int getVisibleServiceFlag() const
DescriptorTag getDescriptorTag() const
int getExtensionDescriptorTag() const
cSectionSyncer sectionSyncer
void SetSisoMiso(int SisoMiso)
int Transponder(void) const
Returns the transponder frequency in MHz, plus the polarization in case of sat.
int Bandwidth(void) const
int getLogicalChannelNumber() const
cString ToString(char Type) const
StructureLoop< HdSimulcastLogicalChannel > hdSimulcastLogicalChannelLoop
void SetCoderateH(int CoderateH)
const char * Parameters(void) const
void SetRollOff(int RollOff)
DescriptorLoop transportStreamDescriptors
bool SetTransponderData(int Source, int Frequency, int Srate, const char *Parameters, bool Quiet=false)
DescriptorLoop commonDescriptors
static cChannels * GetChannelsWrite(cStateKey &StateKey, int TimeoutMs=0)
Gets the list of channels for write access.
int getSectionNumber() const
int Modulation(void) const
bool Sync(uchar Version, int Number, int LastNumber)
void SetT2SystemId(int T2SystemId)
char Polarization(void) const
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
Processes the data delivered to this filter.
int getCodingType() const
#define ISTRANSPONDER(f1, f2)
int getModulationSystem() const
void SetSystem(int System)
int Source(void)
Returns the source of the data delivered to this filter.
int getOriginalNetworkId() const
StructureLoop< TransportStream > transportStreamLoop
int getCodeRateLP() const
static bool IsSat(int Code)
const T * Next(const T *Object) const
< Returns the element immediately before Object in this list, or NULL if Object is the first element ...
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
int Frequency(void) const
Returns the actual frequency, as given in 'channels.conf'.
bool hasNext(Iterator &it)
int getVisibleServiceFlag() const
T getNext(Iterator &it) const
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
int getCodeRateHP() const
int Transmission(void) const
int getVersionNumber() const
int getConstellation() const
int getInputStreamIdentifier() const
int getLastSectionNumber() const
void SetStreamId(int StreamId)
void SetHierarchy(int Hierarchy)
int CoderateH(void) const
int getTransmissionMode() const
int Transponder(void)
Returns the transponder of the data delivered to this filter.
void Set(u_short Pid, u_char Tid, u_char Mask=0xFF)
Sets the given filter data by calling Add() with Sticky = true.
void SetCoderateL(int CoderateL)
int getSymbolRate() const
void AddTransponder(cChannel *Channel)
const T * First(void) const
Returns the first element in this list, or NULL if the list is empty.
cNitFilter(cSdtFilter *SdtFilter)
static int FromData(eSourceType SourceType, int Position=0, bool East=false)
int getT2SystemId() const
int getLogicalChannelNumber() const
int getGuardInterval() const
int getPolarization() const
TypeLoop< ThirtyTwoBit > frequencies
int CoderateL(void) const
Descriptor * getNext(Iterator &it)
int T2SystemId(void) const
int Hierarchy(void) const
void SetBandwidth(int Bandwidth)
void SetModulation(int Modulation)