Go to the documentation of this file.
33 #include <QTextStream>
43 #define PARSE_SKIP(VAR) do { \
44 if (it == tokens.end()) return false; \
47 #define PARSE_CONF(VAR) do { \
48 if (it == tokens.end()) return false; \
49 if (!(VAR).ParseConf(*it)) return 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"))
141 QStringList::const_iterator it = tokens.begin();
167 QStringList::const_iterator it = tokens.begin();
186 QStringList::const_iterator it = tokens.begin();
208 QStringList::const_iterator it = tokens.begin();
229 QStringList::const_iterator it = tokens.begin();
231 chan.
m_lcn = channelNo;
239 if (it == tokens.end())
242 QString params = (*it++);
243 while (!params.isEmpty())
245 QString ori = params;
246 int s = (int) (params.toLatin1().constData()[0]);
247 params = params.mid(1);
291 for (
uint i = 0; i < 6; i++)
307 channel.channels.push_back(chan);
309 LOG(VB_GENERAL, LOG_INFO,
"Imported channel: " + chan.
toString() +
318 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)