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.
261  {
262  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-C modulation system " +
263  QString("parameter '%1', aborting.").arg(_mod_sys));
264  return false;
265  }
266 
267  return ok;
268 }
269 
271  const QString &_frequency, const QString &_inversion,
272  const QString &_symbol_rate, const QString &_fec_inner,
273  const QString &_modulation, const QString &_polarity,
274  const QString &_mod_sys, const QString &_rolloff)
275 {
276  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
277  _fec_inner, _modulation, _polarity);
278 
280  m_modSys.Parse(_mod_sys);
281 
282  // For #10153, guess at modulation system based on modulation
284  {
288  }
289 
290  // Only DVB-S and DVB_S2 can be used with a DVB-S2 tuner.
293  {
294  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-S2 modulation system " +
295  QString("parameter '%1', aborting.").arg(_mod_sys));
296  return false;
297  }
298 
299  if (!_rolloff.isEmpty())
300  ok &= m_rolloff.Parse(_rolloff);
301 
302  return ok;
303 }
304 
306  const QString &_frequency, const QString &_inversion,
307  const QString &_bandwidth, const QString &_coderate_hp,
308  const QString &_coderate_lp, const QString &_modulation,
309  const QString &_trans_mode, const QString &_guard_interval,
310  const QString &_hierarchy, const QString &_mod_sys)
311 {
312  bool ok = ParseDVB_T(_frequency, _inversion, _bandwidth,
313  _coderate_hp, _coderate_lp, _modulation,
314  _trans_mode, _guard_interval, _hierarchy);
315 
317  m_modSys.Parse(_mod_sys);
318 
319  // Accept 0 for DVB-T
320  if (_mod_sys == "0")
321  {
323  LOG(VB_GENERAL, LOG_WARNING, LOC + "Deprecated DVB-T modulation system " +
324  QString("parameter '%1', using %2.").arg(_mod_sys).arg(m_modSys.toString()));
325  }
326 
327  // Accept 1 for DVB-T2
328  if (_mod_sys == "1")
329  {
331  LOG(VB_GENERAL, LOG_WARNING, LOC + "Deprecated DVB-T2 modulation system " +
332  QString("parameter '%1', using %2.").arg(_mod_sys).arg(m_modSys.toString()));
333  }
334 
335  // We have a DVB-T2 tuner, change undefined modulation system to DVB-T2
337  {
339  LOG(VB_GENERAL, LOG_WARNING, LOC + "Undefined modulation system, " +
340  QString("using %1.").arg(m_modSys.toString()));
341  }
342 
343  // Only DVB-T and DVB-T2 can be used with a DVB-T2 tuner.
346  {
347  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-T2 modulation system " +
348  QString("%1, aborting.").arg(m_modSys.toString()));
349  return false;
350  }
351 
352  return ok;
353 }
354 
357  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
358  const QString& _fec, const QString& _polarity,
359  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
360  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
361  const QString& _modulation, const QString& _bandwidth,
362  const QString& _mod_sys, const QString& _rolloff)
363 {
365  {
366  return ParseDVB_T(
367  _frequency, _inversion, _bandwidth,
368  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
369  _trans_mode, _guard_interval, _hierarchy);
370  }
371 
373  {
374  return ParseDVB_C(
375  _frequency, _inversion, _symbolrate,
376  _fec, _modulation, _polarity,
377  _mod_sys);
378  }
379 
381  {
382  return ParseDVB_S(
383  _frequency, _inversion, _symbolrate,
384  _fec, _modulation, _polarity);
385  }
386 
388  {
389  return ParseDVB_S2(
390  _frequency, _inversion, _symbolrate,
391  _fec, _modulation, _polarity,
392  _mod_sys, _rolloff);
393  }
394 
396  {
397  return ParseDVB_T2(
398  _frequency, _inversion, _bandwidth,
399  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
400  _trans_mode, _guard_interval, _hierarchy,
401  _mod_sys);
402  }
403 
405  {
406  return ParseATSC(_frequency, _modulation);
407  }
408 
409  LOG(VB_GENERAL, LOG_ERR, LOC +
410  QString("ParseTuningParams -- Unknown tuner type = 0x%1")
411  .arg(type,0,16,QChar('0')));
412 
413  return false;
414 }
415 
417 {
418  Clear();
419 
421  query.prepare(
422  "SELECT frequency, inversion, symbolrate, "
423  " fec, polarity, "
424  " hp_code_rate, lp_code_rate, constellation, "
425  " transmission_mode, guard_interval, hierarchy, "
426  " modulation, bandwidth, sistandard, "
427  " mod_sys, rolloff "
428  "FROM dtv_multiplex "
429  "WHERE dtv_multiplex.mplexid = :MPLEXID");
430  query.bindValue(":MPLEXID", mplexid);
431 
432  if (!query.exec())
433  {
434  MythDB::DBError("DVBTuning::FillFromDB", query);
435  return false;
436  }
437 
438  if (!query.next())
439  {
440  LOG(VB_GENERAL, LOG_ERR, LOC +
441  QString("Could not find tuning parameters for mplex %1")
442  .arg(mplexid));
443 
444  return false;
445  }
446 
447  m_mplex = mplexid;
448  m_sistandard = query.value(13).toString();
449 
450  // Parse the query into our DVBTuning class
451  return ParseTuningParams(
452  type,
453  query.value(0).toString(), query.value(1).toString(),
454  query.value(2).toString(), query.value(3).toString(),
455  query.value(4).toString(), query.value(5).toString(),
456  query.value(6).toString(), query.value(7).toString(),
457  query.value(8).toString(), query.value(9).toString(),
458  query.value(10).toString(), query.value(11).toString(),
459  query.value(12).toString(), query.value(14).toString(),
460  query.value(15).toString());
461 }
462 
463 
465  const MPEGDescriptor &desc)
466 {
467  uint tag = desc.DescriptorTag();
468  m_sistandard = "dvb";
469 
470  switch (tag)
471  {
473  {
475 
477  {
478  return ParseDVB_T(
479  QString::number(cd.FrequencyHz()), "a",
483  cd.HierarchyString());
484  }
485 
487  {
488  return ParseDVB_T2(
489  QString::number(cd.FrequencyHz()), "a",
493  cd.HierarchyString(), "DVB-T");
494  }
495 
496  break;
497  }
499  {
500  const SatelliteDeliverySystemDescriptor cd(desc);
501 
503  {
504  if (cd.ModulationSystem())
505  {
506  LOG(VB_CHANSCAN, LOG_NOTICE, LOC +
507  "Ignoring DVB-S2 transponder with DVB-S card");
508  return false;
509  }
510 
511  return ParseDVB_S(
512  QString::number(cd.FrequencykHz()), "a",
513  QString::number(cd.SymbolRateHz()),
514  cd.FECInnerString(),
515  cd.ModulationString(),
516  cd.PolarizationString());
517  }
518 
520  {
521  return ParseDVB_S2(
522  QString::number(cd.FrequencykHz()), "a",
523  QString::number(cd.SymbolRateHz()),
524  cd.FECInnerString(),
525  cd.ModulationString(),
526  cd.PolarizationString(),
528  cd.RollOffString());
529  }
530 
531  break;
532  }
534  {
536  break;
537 
538  const CableDeliverySystemDescriptor cd(desc);
539 
540  return ParseDVB_C(
541  QString::number(cd.FrequencyHz()), "a",
542  QString::number(cd.SymbolRateHz()), cd.FECInnerString(),
543  cd.ModulationString(), QString(),
544  "DVB-C/A");
545  }
546  default:
547  LOG(VB_CHANSCAN, LOG_ERR, LOC +
548  QString("Unknown delivery system descriptor 0x%1").arg(tag,0,16));
549  return false;
550  }
551 
552  LOG(VB_CHANSCAN, LOG_ERR, LOC +
553  QString("Tuner type %1 does not match delivery system")
554  .arg(type.toString()));
555  return false;
556 }
557 
558 
561 
563 {
564  if (!DTVMultiplex::FillFromDB(type, mplexid))
565  return false;
566 
568  query.prepare(
569  "SELECT c.mplexid, c.sourceid, c.chanid, "
570  " c.callsign, c.name, c.channum, "
571  " c.serviceid, c.atsc_major_chan, c.atsc_minor_chan, "
572  " c.useonairguide, c.visible, c.freqid, "
573  " c.icon, c.tvformat, c.xmltvid, "
574  " d.transportid, d.networkid, c.default_authority,"
575  " c.service_type "
576  "FROM channel AS c, dtv_multiplex AS d "
577  "WHERE c.deleted IS NULL AND "
578  " c.mplexid = :MPLEXID AND"
579  " c.mplexid = d.mplexid");
580  query.bindValue(":MPLEXID", mplexid);
581 
582  if (!query.exec())
583  {
584  MythDB::DBError("ScanDTVTransport::FillFromDB", query);
585  return false;
586  }
587 
588  while (query.next())
589  {
590  ChannelInsertInfo chan(
591  query.value(0).toUInt(), query.value(1).toUInt(),
592  query.value(2).toUInt(), query.value(3).toString(),
593  query.value(4).toString(), query.value(5).toString(),
594  query.value(6).toUInt(),
595  query.value(7).toUInt(), query.value(8).toUInt(),
596  query.value(9).toBool(), !query.value(10).toBool(),
597  false,
598  query.value(11).toString(), query.value(12).toString(),
599  query.value(13).toString(), query.value(14).toString(),
600  0, 0, 0,
601  query.value(15).toUInt(), query.value(16).toUInt(),
602  0,
603  QString(),
604  false, false, false, false,
605  false, false, false, false,
606  false, false, false, 0,
607  query.value(17).toString(), /* default_authority */
608  query.value(18).toUInt()); /* service_type */
609 
610  m_channels.push_back(chan);
611  }
612 
613  return true;
614 }
615 
617 {
618  uint transportid = 0;
619 
621  query.prepare(
622  "INSERT INTO channelscan_dtv_multiplex "
623  " ( scanid, "
624  " mplexid, frequency, inversion, "
625  " symbolrate, fec, polarity, "
626  " hp_code_rate, lp_code_rate, modulation, "
627  " transmission_mode, guard_interval, hierarchy, "
628  " mod_sys, rolloff, bandwidth, "
629  " sistandard, tuner_type, signal_strength "
630  " ) "
631  "VALUES "
632  " ( :SCANID, "
633  " :MPLEXID, :FREQUENCY, :INVERSION, "
634  " :SYMBOLRATE, :FEC, :POLARITY, "
635  " :HP_CODE_RATE, :LP_CODE_RATE, :MODULATION, "
636  " :TRANSMISSION_MODE, :GUARD_INTERVAL, :HIERARCHY, "
637  " :MOD_SYS, :ROLLOFF, :BANDWIDTH, "
638  " :SISTANDARD, :TUNER_TYPE, :SIGNAL_STRENGTH "
639  " );");
640 
641  query.bindValue(":SCANID", scanid);
642  query.bindValue(":MPLEXID", m_mplex);
643  query.bindValue(":FREQUENCY", QString::number(m_frequency));
644  query.bindValue(":INVERSION", m_inversion.toString());
645  query.bindValue(":SYMBOLRATE", QString::number(m_symbolRate));
646  query.bindValue(":FEC", m_fec.toString());
647  query.bindValue(":POLARITY", m_polarity.toString());
648  query.bindValue(":HP_CODE_RATE", m_hpCodeRate.toString());
649  query.bindValue(":LP_CODE_RATE", m_lpCodeRate.toString());
650  query.bindValue(":MODULATION", m_modulation.toString());
651  query.bindValue(":TRANSMISSION_MODE", m_transMode.toString());
652  query.bindValue(":GUARD_INTERVAL", m_guardInterval.toString());
653  query.bindValue(":HIERARCHY", m_hierarchy.toString());
654  query.bindValue(":MOD_SYS", m_modSys.toString());
655  query.bindValue(":ROLLOFF", m_rolloff.toString());
656  query.bindValue(":BANDWIDTH", m_bandwidth.toString());
657  query.bindValue(":SISTANDARD", m_sistandard);
658  query.bindValue(":TUNER_TYPE", m_tunerType.toUInt());
659  query.bindValue(":SIGNAL_STRENGTH", m_signalStrength);
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, const QString& signal_strength)
690 {
691  m_tunerType = type;
692  m_signalStrength = signal_strength.toInt();
693 
695  type,
696  _frequency, _inversion, _symbolrate,
697  _fec, _polarity,
698  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
699  _trans_mode, _guard_interval, _hierarchy,
700  _modulation, _bandwidth, _mod_sys,
701  _rolloff);
702 }
DTVModulation::toString
QString toString() const
Definition: dtvconfparserhelpers.h:412
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
channel
QDomElement channel
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:501
DTVHierarchy::IsCompatible
bool IsCompatible(const DTVHierarchy other) const
Definition: dtvconfparserhelpers.h:581
TerrestrialDeliverySystemDescriptor::HierarchyString
QString HierarchyString(void) const
Definition: dvbdescriptors.h:974
MPEGDescriptor::DescriptorTag
uint DescriptorTag(void) const
Definition: mpegdescriptors.h:345
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:662
DTVTransmitMode::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:472
DTVTunerType::kTunerTypeDVBS1
static const int kTunerTypeDVBS1
Definition: dtvconfparserhelpers.h:93
DTVInversion::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:202
DTVTransmitMode::IsCompatible
bool IsCompatible(const DTVTransmitMode other) const
Definition: dtvconfparserhelpers.h:463
DTVMultiplex::FillFromDeliverySystemDesc
bool FillFromDeliverySystemDesc(DTVTunerType type, const MPEGDescriptor &desc)
Definition: dtvmultiplex.cpp:464
DTVHierarchy::toString
QString toString() const
Definition: dtvconfparserhelpers.h:593
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:338
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
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:341
CableDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:790
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, const QString &signal_strength)
Definition: dtvmultiplex.cpp:682
DTVModulation::kModulationQPSK
@ kModulationQPSK
Definition: dtvconfparserhelpers.h:358
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:416
TerrestrialDeliverySystemDescriptor
Definition: dvbdescriptors.h:904
DescriptorID::cable_delivery_system
@ cable_delivery_system
Definition: mpegdescriptors.h:76
DTVModulationSystem::kModulationSystem_UNDEFINED
@ kModulationSystem_UNDEFINED
Definition: dtvconfparserhelpers.h:656
ChannelInsertInfo
Definition: channelinfo.h:133
DTVTunerType
Definition: dtvconfparserhelpers.h:76
DTVGuardInterval::IsCompatible
bool IsCompatible(const DTVGuardInterval other) const
Definition: dtvconfparserhelpers.h:528
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
DescriptorID::terrestrial_delivery_system
@ terrestrial_delivery_system
Definition: mpegdescriptors.h:99
DTVMultiplex::m_inversion
DTVInversion m_inversion
Definition: dtvmultiplex.h:96
DTVPolarity::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:629
DTVBandwidth::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:265
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
DTVMultiplex::m_guardInterval
DTVGuardInterval m_guardInterval
Definition: dtvmultiplex.h:102
MPEGDescriptor
Definition: mpegdescriptors.h:302
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:178
SatelliteDeliverySystemDescriptor::ModulationSystem
uint ModulationSystem(void) const
Definition: dvbdescriptors.h:855
TerrestrialDeliverySystemDescriptor::ConstellationString
QString ConstellationString(void) const
Definition: dvbdescriptors.h:953
DTVModulationSystem::IsCompatible
bool IsCompatible(const DTVModulationSystem other) const
Definition: dtvconfparserhelpers.h:705
DTVMultiplex::m_hpCodeRate
DTVCodeRate m_hpCodeRate
Definition: dtvmultiplex.h:98
ScanDTVTransport::FillFromDB
bool FillFromDB(DTVTunerType type, uint mplexid) override
Definition: dtvmultiplex.cpp:562
SatelliteDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:898
DTVTunerType::toUInt
uint toUInt() const
Definition: dtvconfparserhelpers.h:156
DTVCodeRate::IsCompatible
bool IsCompatible(const DTVCodeRate other) const
Definition: dtvconfparserhelpers.h:329
DTVMultiplex::m_modSys
DTVModulationSystem m_modSys
Definition: dtvmultiplex.h:106
LOC
#define LOC
Definition: dtvmultiplex.cpp:10
DTVMultiplex::m_fec
DTVCodeRate m_fec
Definition: dtvmultiplex.h:105
DTVMultiplex::toString
QString toString() const
Definition: dtvmultiplex.cpp:34
uint
unsigned int uint
Definition: compat.h:141
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:305
SatelliteDeliverySystemDescriptor::FrequencykHz
unsigned long long FrequencykHz(void) const
Definition: dvbdescriptors.h:811
ScanDTVTransport::m_signalStrength
int m_signalStrength
Definition: dtvmultiplex.h:141
DTVHierarchy::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:590
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:632
TerrestrialDeliverySystemDescriptor::CodeRateLPString
QString CodeRateLPString(void) const
Definition: dvbdescriptors.h:1004
DTVGuardInterval::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:537
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:616
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:270
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:475
SatelliteDeliverySystemDescriptor::PolarizationString
QString PolarizationString() const
Definition: dvbdescriptors.h:831
DTVBandwidth::toString
QString toString() const
Definition: dtvconfparserhelpers.h:268
DTVModulation::IsCompatible
bool IsCompatible(const DTVModulation other) const
Definition: dtvconfparserhelpers.h:400
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:355
DTVRollOff::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:765
SatelliteDeliverySystemDescriptor
Definition: dvbdescriptors.h:795
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
DTVModulationSystem::kModulationSystem_DVBT2
@ kModulationSystem_DVBT2
Definition: dtvconfparserhelpers.h:672
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:674
DTVInversion::toString
QString toString() const
Definition: dtvconfparserhelpers.h:205
DTVGuardInterval::toString
QString toString() const
Definition: dtvconfparserhelpers.h:540
DTVTunerType::kTunerTypeDVBT2
static const int kTunerTypeDVBT2
Definition: dtvconfparserhelpers.h:97
DescriptorID::satellite_delivery_system
@ satellite_delivery_system
Definition: mpegdescriptors.h:75
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
DTVInversion::IsCompatible
bool IsCompatible(const DTVInversion other) const
Definition: dtvconfparserhelpers.h:193
DTVModulationSystem::kModulationSystem_DVBS
@ kModulationSystem_DVBS
Definition: dtvconfparserhelpers.h:661
DTVModulation::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:409
ScanDTVTransport::m_tunerType
DTVTunerType m_tunerType
Definition: dtvmultiplex.h:136
DTVModulationSystem::kModulationSystem_DVBT
@ kModulationSystem_DVBT
Definition: dtvconfparserhelpers.h:659
DTVMultiplex::m_transMode
DTVTransmitMode m_transMode
Definition: dtvmultiplex.h:101
SatelliteDeliverySystemDescriptor::ModulationString
QString ModulationString(void) const
Definition: dvbdescriptors.h:870
DTVBandwidth::IsCompatible
bool IsCompatible(const DTVBandwidth other) const
Definition: dtvconfparserhelpers.h:256
ScanDTVTransport::m_channels
ChannelInsertInfoList m_channels
Definition: dtvmultiplex.h:138
DTVModulationSystem::kModulationSystem_DVBC_ANNEX_A
@ kModulationSystem_DVBC_ANNEX_A
Definition: dtvconfparserhelpers.h:657
dvbdescriptors.h
DTVRollOff::IsCompatible
bool IsCompatible(const DTVRollOff other) const
Definition: dtvconfparserhelpers.h:756
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
Definition: dtvmultiplex.h:99