Go to the documentation of this file.
33 #include <QTextStream>
44 #define PARSE_SKIP(VAR) do { \
45 if (it == tokens.end()) return false; \
48 #define PARSE_CONF(VAR) do { \
49 if (it == tokens.end() || !(VAR).ParseConf(*it++)) \
50 return false; } while(false)
52 #define PARSE_STR(VAR) do { \
53 if (it != tokens.end()) (VAR) = *it++; else return false; } while(false)
55 #define PARSE_UINT(VAR) do { \
56 if (it != tokens.end()) \
57 (VAR) = (*it++).toUInt(); else return false; } while(false)
59 #define PARSE_UINT_1000(VAR) do { \
60 if (it != tokens.end()) \
61 (VAR) = (*it++).toUInt() * 1000ULL; else return false; } while(false)
75 if (!
file.open(QIODevice::ReadOnly))
79 QTextStream stream(&
file);
81 while (!stream.atEnd())
83 line = stream.readLine();
84 line = line.trimmed();
85 if (line.startsWith(
"#"))
88 QStringList list = line.split(
":", Qt::SkipEmptyParts);
92 QString str = list[0];
95 if ((str.length() >= 1) && (str.at(0) ==
'@'))
97 channelNo = str.mid(1).toInt();
98 line = stream.readLine();
99 list = line.split(
":", Qt::SkipEmptyParts);
107 if ((str ==
"T") || (str ==
"C") || (str ==
"S"))
133 QStringList::const_iterator it = tokens.begin();
159 QStringList::const_iterator it = tokens.begin();
178 QStringList::const_iterator it = tokens.begin();
200 QStringList::const_iterator it = tokens.begin();
221 QStringList::const_iterator it = tokens.begin();
223 chan.
m_lcn = channelNo;
231 if (it == tokens.end())
234 QString params = (*it++);
235 while (!params.isEmpty())
237 QString ori = params;
238 int s = (int) (params.toLatin1().constData()[0]);
239 params = params.mid(1);
283 for (
uint i = 0; i < 6; i++)
299 channel.channels.push_back(chan);
301 LOG(VB_GENERAL, LOG_INFO,
"Imported channel: " + chan.
toString() +
310 LOG(VB_GENERAL, LOG_INFO,
"Imported channel: " + chan.
toString() +
bool ParseVDR(const QString &_value)
bool ParseVDR(const QString &_value)
bool ParseVDR(const QString &_value)
bool ParseConfATSC(const QStringList &tokens)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
bool ParseVDR(const QString &_value)
bool ParseConfQPSK(const QStringList &tokens)
DTVGuardInterval m_guardInterval
bool ParseVDR(const QString &_value)
bool ParseVDR(const QString &_value)
bool ParseVDR(const QString &_value)
DTVModulationSystem m_modSys
bool ParseVDR(const QString &_value)
#define PARSE_UINT_1000(VAR)
void AddChannel(const DTVMultiplex &mux, DTVChannelInfo &chan)
bool ParseVDR(const QString &_value)
bool ParseVDR(const QString &_value)
DTVChannelList m_channels
DTVModulation m_modulation
bool ParseConfQAM(const QStringList &tokens)
DTVTransmitMode m_transMode
bool ParseVDR(const QStringList &tokens, int channelNo=-1)
bool ParseConfOFDM(const QStringList &tokens)