MythTV  master
dtvmultiplex.cpp
Go to the documentation of this file.
1 // MythTV headers
2 #include "dtvmultiplex.h"
3 
4 #include "mpeg/dvbdescriptors.h"
5 #include "mythdb.h"
6 #include "mythlogging.h"
7 #include "cardutil.h"
8 #include <utility>
9 
10 #define LOC QString("DTVMux: ")
11 
13 {
14  return ((m_frequency == m.m_frequency) &&
15  (m_modulation == m.m_modulation) &&
16  (m_inversion == m.m_inversion) &&
17  (m_bandwidth == m.m_bandwidth) &&
18  (m_hpCodeRate == m.m_hpCodeRate) &&
19  (m_lpCodeRate == m.m_lpCodeRate) &&
20  (m_transMode == m.m_transMode) &&
22  (m_fec == m.m_fec) &&
23  (m_modSys == m.m_modSys) &&
24  (m_rolloff == m.m_rolloff) &&
25  (m_polarity == m.m_polarity) &&
26  (m_hierarchy == m.m_hierarchy) &&
28  );
29 }
30 
32 // Gets
33 
34 QString DTVMultiplex::toString() const
35 {
36  QString ret = QString("%1 %2 %3 ")
38 
39  ret += QString("%1 %2 %3 %4 %5 %6 %7")
43  .arg(m_polarity.toString());
44  ret += QString(" fec:%1 msys:%2 ro:%3")
45  .arg(m_fec.toString(),-4).arg(m_modSys.toString(),-6).arg(m_rolloff.toString());
46 
47  return ret;
48 }
49 
51  uint freq_range, bool fuzzy) const
52 {
53  if ((m_frequency + freq_range < other.m_frequency ) ||
54  (m_frequency > other.m_frequency + freq_range))
55  {
56  return false;
57  }
58 
60  {
61  if (fuzzy)
62  {
63  return
65  (m_symbolRate == other.m_symbolRate) &&
66  m_fec.IsCompatible(other.m_fec) &&
68  }
69  return
70  (m_inversion == other.m_inversion) &&
71  (m_symbolRate == other.m_symbolRate) &&
72  (m_fec == other.m_fec) &&
73  (m_modulation == other.m_modulation);
74  }
75 
78  {
79  if (fuzzy)
80  {
81  return
91  }
92  return
93  (m_inversion == other.m_inversion) &&
94  (m_bandwidth == other.m_bandwidth) &&
95  (m_hpCodeRate == other.m_hpCodeRate) &&
96  (m_lpCodeRate == other.m_lpCodeRate) &&
97  (m_modulation == other.m_modulation) &&
98  (m_guardInterval == other.m_guardInterval) &&
99  (m_transMode == other.m_transMode) &&
100  (m_hierarchy == other.m_hierarchy) &&
101  (m_modSys == other.m_modSys);
102  }
103 
105  {
106  if (fuzzy)
107  return m_modulation.IsCompatible(other.m_modulation);
108  return (m_modulation == other.m_modulation);
109  }
110 
113  {
114  bool ret =
115  (m_symbolRate == other.m_symbolRate) &&
116  (m_polarity == other.m_polarity) &&
117  (m_modSys == other.m_modSys);
118 
119  if (fuzzy)
120  {
121  return ret &&
123  m_fec.IsCompatible(other.m_fec) &&
125  }
126  return ret &&
127  (m_inversion == other.m_inversion) &&
128  (m_fec == other.m_fec) &&
129  (m_rolloff == other.m_rolloff);
130  }
131 
133  {
134  return (m_iptvTuning == other.m_iptvTuning);
135  }
136 
137  return false;
138 }
139 
141 // Parsers
142 
143 bool DTVMultiplex::ParseATSC(const QString &_frequency,
144  const QString &_modulation)
145 {
146  bool ok = true;
147  m_frequency = _frequency.toULongLong(&ok);
148  if (!ok)
149  {
150  LOG(VB_GENERAL, LOG_ERR, LOC +
151  QString("Failed to parse ATSC frequency %1").arg(_frequency));
152  return false;
153  }
154 
155  ok = m_modulation.Parse(_modulation);
156  if (!ok)
157  {
158  LOG(VB_GENERAL, LOG_ERR, LOC +
159  QString("Failed to parse ATSC modulation %1").arg(_modulation));
160  }
161  return ok;
162 }
163 
165  const QString &_frequency, const QString &_inversion,
166  const QString &_bandwidth, const QString &_coderate_hp,
167  const QString &_coderate_lp, const QString &_modulation,
168  const QString &_trans_mode, const QString &_guard_interval,
169  const QString &_hierarchy)
170 {
171  bool ok = m_inversion.Parse(_inversion);
172  if (!ok)
173  {
174  LOG(VB_GENERAL, LOG_WARNING, LOC +
175  QString("Invalid inversion parameter '%1', falling back to 'auto'.")
176  .arg(_inversion));
177  ok = true;
178  }
179 
180  ok &= m_modSys.Parse("DVB-T");
181  ok &= m_bandwidth.Parse(_bandwidth);
182  ok &= m_hpCodeRate.Parse(_coderate_hp);
183  ok &= m_lpCodeRate.Parse(_coderate_lp);
184  ok &= m_modulation.Parse(_modulation);
185  ok &= m_transMode.Parse(_trans_mode);
186  ok &= m_hierarchy.Parse(_hierarchy);
187  ok &= m_guardInterval.Parse(_guard_interval);
188  if (ok)
189  m_frequency = _frequency.toInt(&ok);
190 
191  return ok;
192 }
193 
195  const QString &_frequency, const QString &_inversion,
196  const QString &_symbol_rate, const QString &_fec_inner,
197  const QString &_modulation, const QString &_polarity)
198 {
199  bool ok = m_inversion.Parse(_inversion);
200  if (!ok)
201  {
202  LOG(VB_GENERAL, LOG_WARNING, LOC +
203  QString("Invalid inversion parameter '%1', falling back to 'auto'.")
204  .arg(_inversion));
205 
206  ok = true;
207  }
208 
209  m_symbolRate = _symbol_rate.toInt();
210  if (!m_symbolRate)
211  {
212  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid symbol rate " +
213  QString("parameter '%1', aborting.").arg(_symbol_rate));
214 
215  return false;
216  }
217 
218  ok &= m_fec.Parse(_fec_inner);
219  ok &= m_modulation.Parse(_modulation);
220 
221  if (!_polarity.isEmpty())
222  m_polarity.Parse(_polarity.toLower());
223 
224  if (ok)
225  m_frequency = _frequency.toInt(&ok);
226 
227  return ok;
228 }
229 
231  const QString &_frequency, const QString &_inversion,
232  const QString &_symbol_rate, const QString &_fec_inner,
233  const QString &_modulation, const QString &_polarity)
234 {
235  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
236  _fec_inner, _modulation, _polarity);
238  return ok;
239 }
240 
242  const QString &_frequency, const QString &_inversion,
243  const QString &_symbol_rate, const QString &_fec_inner,
244  const QString &_modulation, const QString &_polarity,
245  const QString &_mod_sys)
246 {
247  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
248  _fec_inner, _modulation, _polarity);
249 
250  m_modSys.Parse(_mod_sys);
252  {
253  LOG(VB_GENERAL, LOG_WARNING, LOC + "Undefined modulation system " +
254  QString("parameter '%1', using DVB-C/A.").arg(_mod_sys));
256  }
257 
258  // Only DVB-C variants can be used with a DVB-C tuner.
262  {
263  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-C modulation system " +
264  QString("parameter '%1', aborting.").arg(_mod_sys));
265  return false;
266  }
267 
268  return ok;
269 }
270 
272  const QString &_frequency, const QString &_inversion,
273  const QString &_symbol_rate, const QString &_fec_inner,
274  const QString &_modulation, const QString &_polarity,
275  const QString &_mod_sys, const QString &_rolloff)
276 {
277  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
278  _fec_inner, _modulation, _polarity);
279 
281  m_modSys.Parse(_mod_sys);
282 
283  // For #10153, guess at modulation system based on modulation
285  {
289  }
290 
291  // Only DVB-S and DVB_S2 can be used with a DVB-S2 tuner.
294  {
295  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-S2 modulation system " +
296  QString("parameter '%1', aborting.").arg(_mod_sys));
297  return false;
298  }
299 
300  if (!_rolloff.isEmpty())
301  ok &= m_rolloff.Parse(_rolloff);
302 
303  return ok;
304 }
305 
307  const QString &_frequency, const QString &_inversion,
308  const QString &_bandwidth, const QString &_coderate_hp,
309  const QString &_coderate_lp, const QString &_modulation,
310  const QString &_trans_mode, const QString &_guard_interval,
311  const QString &_hierarchy, const QString &_mod_sys)
312 {
313  bool ok = ParseDVB_T(_frequency, _inversion, _bandwidth,
314  _coderate_hp, _coderate_lp, _modulation,
315  _trans_mode, _guard_interval, _hierarchy);
316 
318  m_modSys.Parse(_mod_sys);
319 
320  // Accept 0 for DVB-T
321  if (_mod_sys == "0")
322  {
324  LOG(VB_GENERAL, LOG_WARNING, LOC + "Deprecated DVB-T modulation system " +
325  QString("parameter '%1', using %2.").arg(_mod_sys).arg(m_modSys.toString()));
326  }
327 
328  // Accept 1 for DVB-T2
329  if (_mod_sys == "1")
330  {
332  LOG(VB_GENERAL, LOG_WARNING, LOC + "Deprecated DVB-T2 modulation system " +
333  QString("parameter '%1', using %2.").arg(_mod_sys).arg(m_modSys.toString()));
334  }
335 
336  // We have a DVB-T2 tuner, change undefined modulation system to DVB-T2
338  {
340  LOG(VB_GENERAL, LOG_WARNING, LOC + "Undefined modulation system, " +
341  QString("using %1.").arg(m_modSys.toString()));
342  }
343 
344  // Only DVB-T and DVB-T2 can be used with a DVB-T2 tuner.
347  {
348  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-T2 modulation system " +
349  QString("%1, aborting.").arg(m_modSys.toString()));
350  return false;
351  }
352 
353  return ok;
354 }
355 
358  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
359  const QString& _fec, const QString& _polarity,
360  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
361  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
362  const QString& _modulation, const QString& _bandwidth,
363  const QString& _mod_sys, const QString& _rolloff)
364 {
366  {
367  return ParseDVB_T(
368  _frequency, _inversion, _bandwidth,
369  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
370  _trans_mode, _guard_interval, _hierarchy);
371  }
372 
374  {
375  return ParseDVB_C(
376  _frequency, _inversion, _symbolrate,
377  _fec, _modulation, _polarity,
378  _mod_sys);
379  }
380 
382  {
383  return ParseDVB_S(
384  _frequency, _inversion, _symbolrate,
385  _fec, _modulation, _polarity);
386  }
387 
389  {
390  return ParseDVB_S2(
391  _frequency, _inversion, _symbolrate,
392  _fec, _modulation, _polarity,
393  _mod_sys, _rolloff);
394  }
395 
397  {
398  return ParseDVB_T2(
399  _frequency, _inversion, _bandwidth,
400  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
401  _trans_mode, _guard_interval, _hierarchy,
402  _mod_sys);
403  }
404 
406  {
407  return ParseATSC(_frequency, _modulation);
408  }
409 
410  LOG(VB_GENERAL, LOG_ERR, LOC +
411  QString("ParseTuningParams -- Unknown tuner type = 0x%1")
412  .arg(type,0,16,QChar('0')));
413 
414  return false;
415 }
416 
418 {
419  Clear();
420 
422  query.prepare(
423  "SELECT frequency, inversion, symbolrate, "
424  " fec, polarity, "
425  " hp_code_rate, lp_code_rate, constellation, "
426  " transmission_mode, guard_interval, hierarchy, "
427  " modulation, bandwidth, sistandard, "
428  " mod_sys, rolloff "
429  "FROM dtv_multiplex "
430  "WHERE dtv_multiplex.mplexid = :MPLEXID");
431  query.bindValue(":MPLEXID", mplexid);
432 
433  if (!query.exec())
434  {
435  MythDB::DBError("DVBTuning::FillFromDB", query);
436  return false;
437  }
438 
439  if (!query.next())
440  {
441  LOG(VB_GENERAL, LOG_ERR, LOC +
442  QString("Could not find tuning parameters for mplex %1")
443  .arg(mplexid));
444 
445  return false;
446  }
447 
448  m_mplex = mplexid;
449  m_sistandard = query.value(13).toString();
450 
451  // Parse the query into our DVBTuning class
452  return ParseTuningParams(
453  type,
454  query.value(0).toString(), query.value(1).toString(),
455  query.value(2).toString(), query.value(3).toString(),
456  query.value(4).toString(), query.value(5).toString(),
457  query.value(6).toString(), query.value(7).toString(),
458  query.value(8).toString(), query.value(9).toString(),
459  query.value(10).toString(), query.value(11).toString(),
460  query.value(12).toString(), query.value(14).toString(),
461  query.value(15).toString());
462 }
463 
464 
466  const MPEGDescriptor &desc)
467 {
468  uint tag = desc.DescriptorTag();
469  m_sistandard = "dvb";
470 
471  switch (tag)
472  {
474  {
476 
478  {
479  return ParseDVB_T(
480  QString::number(cd.FrequencyHz()), "a",
484  cd.HierarchyString());
485  }
486 
488  {
489  return ParseDVB_T2(
490  QString::number(cd.FrequencyHz()), "a",
494  cd.HierarchyString(), "DVB-T");
495  }
496 
497  break;
498  }
500  {
501  const SatelliteDeliverySystemDescriptor cd(desc);
502 
504  {
505  if (cd.ModulationSystem())
506  {
507  LOG(VB_CHANSCAN, LOG_NOTICE, LOC +
508  "Ignoring DVB-S2 transponder with DVB-S card");
509  return false;
510  }
511 
512  return ParseDVB_S(
513  QString::number(cd.FrequencykHz()), "a",
514  QString::number(cd.SymbolRateHz()),
515  cd.FECInnerString(),
516  cd.ModulationString(),
517  cd.PolarizationString());
518  }
519 
521  {
522  return ParseDVB_S2(
523  QString::number(cd.FrequencykHz()), "a",
524  QString::number(cd.SymbolRateHz()),
525  cd.FECInnerString(),
526  cd.ModulationString(),
527  cd.PolarizationString(),
529  cd.RollOffString());
530  }
531 
532  break;
533  }
535  {
537  break;
538 
539  const CableDeliverySystemDescriptor cd(desc);
540 
541  return ParseDVB_C(
542  QString::number(cd.FrequencyHz()), "a",
543  QString::number(cd.SymbolRateHz()), cd.FECInnerString(),
544  cd.ModulationString(), QString(),
545  "DVB-C/A");
546  }
547  default:
548  LOG(VB_CHANSCAN, LOG_ERR, LOC +
549  QString("Unknown delivery system descriptor 0x%1").arg(tag,0,16));
550  return false;
551  }
552 
553  LOG(VB_CHANSCAN, LOG_ERR, LOC +
554  QString("Tuner type %1 does not match delivery system")
555  .arg(type.toString()));
556  return false;
557 }
558 
559 
562 
564 {
565  if (!DTVMultiplex::FillFromDB(type, mplexid))
566  return false;
567 
569  query.prepare(
570  "SELECT c.mplexid, c.sourceid, c.chanid, "
571  " c.callsign, c.name, c.channum, "
572  " c.serviceid, c.atsc_major_chan, c.atsc_minor_chan, "
573  " c.useonairguide, c.visible, c.freqid, "
574  " c.icon, c.tvformat, c.xmltvid, "
575  " d.transportid, d.networkid, c.default_authority,"
576  " c.service_type "
577  "FROM channel AS c, dtv_multiplex AS d "
578  "WHERE c.deleted IS NULL AND "
579  " c.mplexid = :MPLEXID AND"
580  " c.mplexid = d.mplexid");
581  query.bindValue(":MPLEXID", mplexid);
582 
583  if (!query.exec())
584  {
585  MythDB::DBError("ScanDTVTransport::FillFromDB", query);
586  return false;
587  }
588 
589  while (query.next())
590  {
591  ChannelInsertInfo chan(
592  query.value(0).toUInt(), query.value(1).toUInt(),
593  query.value(2).toUInt(), query.value(3).toString(),
594  query.value(4).toString(), query.value(5).toString(),
595  query.value(6).toUInt(),
596  query.value(7).toUInt(), query.value(8).toUInt(),
597  query.value(9).toBool(), !query.value(10).toBool(),
598  false,
599  query.value(11).toString(), query.value(12).toString(),
600  query.value(13).toString(), query.value(14).toString(),
601  0, 0, 0,
602  query.value(15).toUInt(), query.value(16).toUInt(),
603  0,
604  QString(),
605  false, false, false, false,
606  false, false, false, false,
607  false, false, false, 0,
608  query.value(17).toString(), /* default_authority */
609  query.value(18).toUInt()); /* service_type */
610 
611  m_channels.push_back(chan);
612  }
613 
614  return true;
615 }
616 
618 {
619  uint transportid = 0;
620 
622  query.prepare(
623  "INSERT INTO channelscan_dtv_multiplex "
624  " ( scanid, "
625  " mplexid, frequency, inversion, "
626  " symbolrate, fec, polarity, "
627  " hp_code_rate, lp_code_rate, modulation, "
628  " transmission_mode, guard_interval, hierarchy, "
629  " mod_sys, rolloff, "
630  " bandwidth, sistandard, tuner_type "
631  " ) "
632  "VALUES "
633  " ( :SCANID, "
634  " :MPLEXID, :FREQUENCY, :INVERSION, "
635  " :SYMBOLRATE, :FEC, :POLARITY, "
636  " :HP_CODE_RATE, :LP_CODE_RATE, :MODULATION, "
637  " :TRANSMISSION_MODE, :GUARD_INTERVAL, :HIERARCHY, "
638  " :MOD_SYS, :ROLLOFF, "
639  " :BANDWIDTH, :SISTANDARD, :TUNER_TYPE "
640  " );");
641 
642  query.bindValue(":SCANID", scanid);
643  query.bindValue(":MPLEXID", m_mplex);
644  query.bindValue(":FREQUENCY", QString::number(m_frequency));
645  query.bindValue(":INVERSION", m_inversion.toString());
646  query.bindValue(":SYMBOLRATE", QString::number(m_symbolRate));
647  query.bindValue(":FEC", m_fec.toString());
648  query.bindValue(":POLARITY", m_polarity.toString());
649  query.bindValue(":HP_CODE_RATE", m_hpCodeRate.toString());
650  query.bindValue(":LP_CODE_RATE", m_lpCodeRate.toString());
651  query.bindValue(":MODULATION", m_modulation.toString());
652  query.bindValue(":TRANSMISSION_MODE", m_transMode.toString());
653  query.bindValue(":GUARD_INTERVAL", m_guardInterval.toString());
654  query.bindValue(":HIERARCHY", m_hierarchy.toString());
655  query.bindValue(":MOD_SYS", m_modSys.toString());
656  query.bindValue(":ROLLOFF", m_rolloff.toString());
657  query.bindValue(":BANDWIDTH", m_bandwidth.toString());
658  query.bindValue(":SISTANDARD", m_sistandard);
659  query.bindValue(":TUNER_TYPE", (uint)m_tuner_type);
660 
661  if (!query.exec())
662  {
663  MythDB::DBError("ScanDTVTransport::SaveScan 1", query);
664  return transportid;
665  }
666 
667  query.prepare("SELECT MAX(transportid) FROM channelscan_dtv_multiplex");
668  if (!query.exec())
669  MythDB::DBError("ScanDTVTransport::SaveScan 2", query);
670  else if (query.next())
671  transportid = query.value(0).toUInt();
672 
673  if (!transportid)
674  return transportid;
675 
676  for (const auto & channel : m_channels)
677  channel.SaveScan(scanid, transportid);
678 
679  return transportid;
680 }
681 
684  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
685  const QString& _fec, const QString& _polarity,
686  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
687  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
688  const QString& _modulation, const QString& _bandwidth, const QString& _mod_sys,
689  const QString& _rolloff)
690 {
691  m_tuner_type = type;
692 
694  type,
695  _frequency, _inversion, _symbolrate,
696  _fec, _polarity,
697  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
698  _trans_mode, _guard_interval, _hierarchy,
699  _modulation, _bandwidth, _mod_sys,
700  _rolloff);
701 }
DTVModulation::toString
QString toString() const
Definition: dtvconfparserhelpers.h:410
DTVMultiplex::m_frequency
uint64_t m_frequency
Definition: dtvmultiplex.h:94
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:783
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
DTVMultiplex
Definition: dtvmultiplex.h:24
DTVTransmitMode::IsCompatible
bool IsCompatible(const DTVTransmitMode &other) const
Definition: dtvconfparserhelpers.h:461
channel
QDomElement channel
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:498
TerrestrialDeliverySystemDescriptor::HierarchyString
QString HierarchyString(void) const
Definition: dvbdescriptors.h:974
MPEGDescriptor::DescriptorTag
uint DescriptorTag(void) const
Definition: mpegdescriptors.h:325
DTVTunerType::kTunerTypeDVBC
static const int kTunerTypeDVBC
Definition: dtvconfparserhelpers.h:95
TerrestrialDeliverySystemDescriptor::GuardIntervalString
QString GuardIntervalString(void) const
Definition: dvbdescriptors.h:1020
DTVTunerType::kTunerTypeIPTV
static const int kTunerTypeIPTV
Definition: dtvconfparserhelpers.h:102
DTVMultiplex::m_rolloff
DTVRollOff m_rolloff
Definition: dtvmultiplex.h:107
mythdb.h
DTVModulationSystem::kModulationSystem_DVBS2
@ kModulationSystem_DVBS2
Definition: dtvconfparserhelpers.h:660
DTVTransmitMode::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:470
DTVTunerType::kTunerTypeDVBS1
static const int kTunerTypeDVBS1
Definition: dtvconfparserhelpers.h:93
DTVInversion::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:200
DTVMultiplex::FillFromDeliverySystemDesc
bool FillFromDeliverySystemDesc(DTVTunerType type, const MPEGDescriptor &desc)
Definition: dtvmultiplex.cpp:465
DTVHierarchy::toString
QString toString() const
Definition: dtvconfparserhelpers.h:591
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:198
arg
arg(title).arg(filename).arg(doDelete))
DTVCodeRate::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:336
DTVMultiplex::m_hierarchy
DTVHierarchy m_hierarchy
Definition: dtvmultiplex.h:103
CableDeliverySystemDescriptor
Definition: dvbdescriptors.h:716
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:603
DTVMultiplex::operator==
bool operator==(const DTVMultiplex &m) const
Definition: dtvmultiplex.cpp:12
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
DTVInversion::IsCompatible
bool IsCompatible(const DTVInversion &other) const
Definition: dtvconfparserhelpers.h:191
DTVMultiplex::m_bandwidth
DTVBandwidth m_bandwidth
Definition: dtvmultiplex.h:97
CableDeliverySystemDescriptor::FrequencyHz
unsigned long long FrequencyHz(void) const
Definition: dvbdescriptors.h:731
DTVCodeRate::toString
QString toString() const
Definition: dtvconfparserhelpers.h:339
CableDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:790
DTVModulation::kModulationQPSK
@ kModulationQPSK
Definition: dtvconfparserhelpers.h:356
DTVMultiplex::ParseDVB_S_and_C
bool ParseDVB_S_and_C(const QString &frequency, const QString &inversion, const QString &symbol_rate, const QString &fec_inner, const QString &modulation, const QString &polarity)
Definition: dtvmultiplex.cpp:194
dtvmultiplex.h
DTVMultiplex::FillFromDB
virtual bool FillFromDB(DTVTunerType type, uint mplexid)
Definition: dtvmultiplex.cpp:417
TerrestrialDeliverySystemDescriptor
Definition: dvbdescriptors.h:904
DTVModulationSystem::kModulationSystem_UNDEFINED
@ kModulationSystem_UNDEFINED
Definition: dtvconfparserhelpers.h:654
ChannelInsertInfo
Definition: channelinfo.h:135
DTVTunerType
Definition: dtvconfparserhelpers.h:76
DTVHierarchy::IsCompatible
bool IsCompatible(const DTVHierarchy &other) const
Definition: dtvconfparserhelpers.h:579
DTVMultiplex::ParseDVB_C
bool ParseDVB_C(const QString &frequency, const QString &inversion, const QString &symbol_rate, const QString &fec_inner, const QString &modulation, const QString &polarity, const QString &mod_sys)
Definition: dtvmultiplex.cpp:241
DTVMultiplex::m_inversion
DTVInversion m_inversion
Definition: dtvmultiplex.h:96
DTVPolarity::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:627
DTVCodeRate::IsCompatible
bool IsCompatible(const DTVCodeRate &other) const
Definition: dtvconfparserhelpers.h:327
DTVGuardInterval::IsCompatible
bool IsCompatible(const DTVGuardInterval &other) const
Definition: dtvconfparserhelpers.h:526
DTVBandwidth::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:263
DTVMultiplex::m_iptvTuning
IPTVTuningData m_iptvTuning
Definition: dtvmultiplex.h:112
DTVMultiplex::ParseDVB_T
bool ParseDVB_T(const QString &frequency, const QString &inversion, const QString &bandwidth, const QString &coderate_hp, const QString &coderate_lp, const QString &modulation, const QString &trans_mode, const QString &guard_interval, const QString &hierarchy)
Definition: dtvmultiplex.cpp:164
TerrestrialDeliverySystemDescriptor::BandwidthString
QString BandwidthString(void) const
Definition: dvbdescriptors.h:932
mythlogging.h
DTVRollOff::toString
QString toString() const
Definition: dtvconfparserhelpers.h:768
DTVMultiplex::m_mplex
uint m_mplex
Definition: dtvmultiplex.h:110
DTVBandwidth::IsCompatible
bool IsCompatible(const DTVBandwidth &other) const
Definition: dtvconfparserhelpers.h:254
DTVModulationSystem::kModulationSystem_DVBC_ANNEX_B
@ kModulationSystem_DVBC_ANNEX_B
Definition: dtvconfparserhelpers.h:656
DTVMultiplex::m_guardInterval
DTVGuardInterval m_guardInterval
Definition: dtvmultiplex.h:102
MPEGDescriptor
Definition: mpegdescriptors.h:295
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:535
SatelliteDeliverySystemDescriptor::RollOffString
QString RollOffString(void) const
Definition: dvbdescriptors.h:849
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:179
SatelliteDeliverySystemDescriptor::ModulationSystem
uint ModulationSystem(void) const
Definition: dvbdescriptors.h:855
DescriptorID::terrestrial_delivery_system
@ terrestrial_delivery_system
Definition: mpegdescriptors.h:99
DTVModulation::IsCompatible
bool IsCompatible(const DTVModulation &other) const
Definition: dtvconfparserhelpers.h:398
TerrestrialDeliverySystemDescriptor::ConstellationString
QString ConstellationString(void) const
Definition: dvbdescriptors.h:953
DTVMultiplex::m_hpCodeRate
DTVCodeRate m_hpCodeRate
High Priority FEC rate.
Definition: dtvmultiplex.h:98
ScanDTVTransport::FillFromDB
bool FillFromDB(DTVTunerType type, uint mplexid) override
Definition: dtvmultiplex.cpp:563
SatelliteDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:898
DTVMultiplex::m_modSys
DTVModulationSystem m_modSys
Modulation system.
Definition: dtvmultiplex.h:106
LOC
#define LOC
Definition: dtvmultiplex.cpp:10
DTVMultiplex::m_fec
DTVCodeRate m_fec
Inner Forward Error Correction rate.
Definition: dtvmultiplex.h:105
DTVMultiplex::toString
QString toString() const
Definition: dtvmultiplex.cpp:34
uint
unsigned int uint
Definition: compat.h:140
DTVModulationSystem::IsCompatible
bool IsCompatible(const DTVModulationSystem &other) const
Definition: dtvconfparserhelpers.h:705
ScanDTVTransport::m_tuner_type
DTVTunerType m_tuner_type
Definition: dtvmultiplex.h:136
DTVRollOff::IsCompatible
bool IsCompatible(const DTVRollOff &other) const
Definition: dtvconfparserhelpers.h:756
ScanDTVTransport::ParseTuningParams
bool ParseTuningParams(DTVTunerType type, const QString &frequency, const QString &inversion, const QString &symbolrate, const QString &fec, const QString &polarity, const QString &hp_code_rate, const QString &lp_code_rate, const QString &ofdm_modulation, const QString &trans_mode, const QString &guard_interval, const QString &hierarchy, const QString &modulation, const QString &bandwidth, const QString &mod_sys, const QString &rolloff)
Definition: dtvmultiplex.cpp:682
DTVMultiplex::ParseDVB_T2
bool ParseDVB_T2(const QString &frequency, const QString &inversion, const QString &bandwidth, const QString &coderate_hp, const QString &coderate_lp, const QString &modulation, const QString &trans_mode, const QString &guard_interval, const QString &hierarchy, const QString &mod_sys)
Definition: dtvmultiplex.cpp:306
SatelliteDeliverySystemDescriptor::FrequencykHz
unsigned long long FrequencykHz(void) const
Definition: dvbdescriptors.h:811
DTVHierarchy::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:588
DTVTunerType::kTunerTypeDVBS2
static const int kTunerTypeDVBS2
Definition: dtvconfparserhelpers.h:94
DTVMultiplex::m_symbolRate
uint64_t m_symbolRate
Definition: dtvmultiplex.h:95
DTVModulationSystem::toString
QString toString() const
Definition: dtvconfparserhelpers.h:719
DTVPolarity::toString
QString toString() const
Definition: dtvconfparserhelpers.h:630
TerrestrialDeliverySystemDescriptor::CodeRateLPString
QString CodeRateLPString(void) const
Definition: dvbdescriptors.h:1004
DTVGuardInterval::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:535
cardutil.h
SatelliteDeliverySystemDescriptor::ModulationSystemString
QString ModulationSystemString(void) const
Definition: dvbdescriptors.h:856
CableDeliverySystemDescriptor::ModulationString
QString ModulationString(void) const
Definition: dvbdescriptors.h:760
SatelliteDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:881
MSqlQuery::bindValue
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:864
ScanDTVTransport::SaveScan
uint SaveScan(uint scanid) const
Definition: dtvmultiplex.cpp:617
DTVMultiplex::ParseDVB_S2
bool ParseDVB_S2(const QString &frequency, const QString &inversion, const QString &symbol_rate, const QString &fec_inner, const QString &modulation, const QString &polarity, const QString &mod_sys, const QString &rolloff)
Definition: dtvmultiplex.cpp:271
TerrestrialDeliverySystemDescriptor::FrequencyHz
uint64_t FrequencyHz(void) const
Definition: dvbdescriptors.h:920
DTVMultiplex::ParseATSC
bool ParseATSC(const QString &frequency, const QString &modulation)
Definition: dtvmultiplex.cpp:143
TerrestrialDeliverySystemDescriptor::TransmissionModeString
QString TransmissionModeString(void) const
Definition: dvbdescriptors.h:1033
DTVMultiplex::m_sistandard
QString m_sistandard
Definition: dtvmultiplex.h:111
DTVTransmitMode::toString
QString toString() const
Definition: dtvconfparserhelpers.h:473
SatelliteDeliverySystemDescriptor::PolarizationString
QString PolarizationString() const
Definition: dvbdescriptors.h:831
DTVBandwidth::toString
QString toString() const
Definition: dtvconfparserhelpers.h:266
DTVMultiplex::ParseTuningParams
bool ParseTuningParams(DTVTunerType type, const QString &frequency, const QString &inversion, const QString &symbolrate, const QString &fec, const QString &polarity, const QString &hp_code_rate, const QString &lp_code_rate, const QString &ofdm_modulation, const QString &trans_mode, const QString &guard_interval, const QString &hierarchy, const QString &modulation, const QString &bandwidth, const QString &mod_sys, const QString &rolloff)
Definition: dtvmultiplex.cpp:356
DTVRollOff::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:765
SatelliteDeliverySystemDescriptor
Definition: dvbdescriptors.h:795
DescriptorID::satellite_delivery_system
@ satellite_delivery_system
Definition: mpegdescriptors.h:75
TerrestrialDeliverySystemDescriptor::CodeRateHPString
QString CodeRateHPString(void) const
Definition: dvbdescriptors.h:995
CableDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:773
DTVMultiplex::m_modulation
DTVModulation m_modulation
Definition: dtvmultiplex.h:100
DTVTunerType::kTunerTypeATSC
static const int kTunerTypeATSC
Definition: dtvconfparserhelpers.h:98
DTVMultiplex::m_polarity
DTVPolarity m_polarity
Definition: dtvmultiplex.h:104
DescriptorID::cable_delivery_system
@ cable_delivery_system
Definition: mpegdescriptors.h:76
DTVModulationSystem::kModulationSystem_DVBT2
@ kModulationSystem_DVBT2
Definition: dtvconfparserhelpers.h:670
DTVTunerType::kTunerTypeDVBT
static const int kTunerTypeDVBT
Definition: dtvconfparserhelpers.h:96
DTVMultiplex::IsEqual
bool IsEqual(DTVTunerType type, const DTVMultiplex &other, uint freq_range=0, bool fuzzy=false) const
Definition: dtvmultiplex.cpp:50
DTVModulationSystem::kModulationSystem_DVBC_ANNEX_C
@ kModulationSystem_DVBC_ANNEX_C
Definition: dtvconfparserhelpers.h:672
DTVInversion::toString
QString toString() const
Definition: dtvconfparserhelpers.h:203
DTVGuardInterval::toString
QString toString() const
Definition: dtvconfparserhelpers.h:538
DTVTunerType::kTunerTypeDVBT2
static const int kTunerTypeDVBT2
Definition: dtvconfparserhelpers.h:97
query
MSqlQuery query(MSqlQuery::InitCon())
DTVMultiplex::ParseDVB_S
bool ParseDVB_S(const QString &frequency, const QString &inversion, const QString &symbol_rate, const QString &fec_inner, const QString &modulation, const QString &polarity)
Definition: dtvmultiplex.cpp:230
DTVModulationSystem::kModulationSystem_DVBS
@ kModulationSystem_DVBS
Definition: dtvconfparserhelpers.h:659
DTVModulation::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:407
DTVModulationSystem::kModulationSystem_DVBT
@ kModulationSystem_DVBT
Definition: dtvconfparserhelpers.h:657
DTVMultiplex::m_transMode
DTVTransmitMode m_transMode
Definition: dtvmultiplex.h:101
SatelliteDeliverySystemDescriptor::ModulationString
QString ModulationString(void) const
Definition: dvbdescriptors.h:870
ScanDTVTransport::m_channels
ChannelInsertInfoList m_channels
Definition: dtvmultiplex.h:138
DTVModulationSystem::kModulationSystem_DVBC_ANNEX_A
@ kModulationSystem_DVBC_ANNEX_A
Definition: dtvconfparserhelpers.h:655
dvbdescriptors.h
DTVMultiplex::Clear
void Clear(void)
Definition: dtvmultiplex.h:34
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:808
DTVModulationSystem::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:716
DTVMultiplex::m_lpCodeRate
DTVCodeRate m_lpCodeRate
Low Priority FEC rate.
Definition: dtvmultiplex.h:99