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 ")
37  .arg(QString::number(m_frequency), m_modulation.toString(),
39 
40  ret += QString("%1 %2 %3 %4 %5 %6 %7")
45  ret += QString(" fec:%1 msys:%2 ro:%3")
46  .arg(m_fec.toString(),-4).arg(m_modSys.toString(),-6).arg(m_rolloff.toString());
47 
48  return ret;
49 }
50 
52  uint freq_range, bool fuzzy) const
53 {
54  if ((m_frequency + freq_range < other.m_frequency ) ||
55  (m_frequency > other.m_frequency + freq_range))
56  {
57  return false;
58  }
59 
61  {
62  if (fuzzy)
63  {
64  return
66  (m_symbolRate == other.m_symbolRate) &&
67  m_fec.IsCompatible(other.m_fec) &&
69  }
70  return
71  (m_inversion == other.m_inversion) &&
72  (m_symbolRate == other.m_symbolRate) &&
73  (m_fec == other.m_fec) &&
74  (m_modulation == other.m_modulation);
75  }
76 
79  {
80  if (fuzzy)
81  {
82  return
92  }
93  return
94  (m_inversion == other.m_inversion) &&
95  (m_bandwidth == other.m_bandwidth) &&
96  (m_hpCodeRate == other.m_hpCodeRate) &&
97  (m_lpCodeRate == other.m_lpCodeRate) &&
98  (m_modulation == other.m_modulation) &&
99  (m_guardInterval == other.m_guardInterval) &&
100  (m_transMode == other.m_transMode) &&
101  (m_hierarchy == other.m_hierarchy) &&
102  (m_modSys == other.m_modSys);
103  }
104 
106  {
107  if (fuzzy)
108  return m_modulation.IsCompatible(other.m_modulation);
109  return (m_modulation == other.m_modulation);
110  }
111 
114  {
115  bool ret =
116  (m_symbolRate == other.m_symbolRate) &&
117  (m_polarity == other.m_polarity) &&
118  (m_modSys == other.m_modSys);
119 
120  if (fuzzy)
121  {
122  return ret &&
124  m_fec.IsCompatible(other.m_fec) &&
126  }
127  return ret &&
128  (m_inversion == other.m_inversion) &&
129  (m_fec == other.m_fec) &&
130  (m_rolloff == other.m_rolloff);
131  }
132 
134  {
135  return (m_iptvTuning == other.m_iptvTuning);
136  }
137 
138  return false;
139 }
140 
142 // Parsers
143 
144 bool DTVMultiplex::ParseATSC(const QString &_frequency,
145  const QString &_modulation)
146 {
147  bool ok = true;
148  m_frequency = _frequency.toULongLong(&ok);
149  if (!ok)
150  {
151  LOG(VB_GENERAL, LOG_ERR, LOC +
152  QString("Failed to parse ATSC frequency %1").arg(_frequency));
153  return false;
154  }
155 
156  ok = m_modulation.Parse(_modulation);
157  if (!ok)
158  {
159  LOG(VB_GENERAL, LOG_ERR, LOC +
160  QString("Failed to parse ATSC modulation %1").arg(_modulation));
161  }
162  return ok;
163 }
164 
166  const QString &_frequency, const QString &_inversion,
167  const QString &_bandwidth, const QString &_coderate_hp,
168  const QString &_coderate_lp, const QString &_modulation,
169  const QString &_trans_mode, const QString &_guard_interval,
170  const QString &_hierarchy)
171 {
172  bool ok = m_inversion.Parse(_inversion);
173  if (!ok)
174  {
175  LOG(VB_GENERAL, LOG_WARNING, LOC +
176  QString("Invalid inversion parameter '%1', falling back to 'auto'.")
177  .arg(_inversion));
178  ok = true;
179  }
180 
181  ok &= m_modSys.Parse("DVB-T");
182  ok &= m_bandwidth.Parse(_bandwidth);
183  ok &= m_hpCodeRate.Parse(_coderate_hp);
184  ok &= m_lpCodeRate.Parse(_coderate_lp);
185  ok &= m_modulation.Parse(_modulation);
186  ok &= m_transMode.Parse(_trans_mode);
187  ok &= m_hierarchy.Parse(_hierarchy);
188  ok &= m_guardInterval.Parse(_guard_interval);
189  if (ok)
190  m_frequency = _frequency.toInt(&ok);
191 
192  return ok;
193 }
194 
196  const QString &_frequency, const QString &_inversion,
197  const QString &_symbol_rate, const QString &_fec_inner,
198  const QString &_modulation, const QString &_polarity)
199 {
200  bool ok = m_inversion.Parse(_inversion);
201  if (!ok)
202  {
203  LOG(VB_GENERAL, LOG_WARNING, LOC +
204  QString("Invalid inversion parameter '%1', falling back to 'auto'.")
205  .arg(_inversion));
206 
207  ok = true;
208  }
209 
210  m_symbolRate = _symbol_rate.toInt();
211  if (!m_symbolRate)
212  {
213  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid symbol rate " +
214  QString("parameter '%1', aborting.").arg(_symbol_rate));
215 
216  return false;
217  }
218 
219  ok &= m_fec.Parse(_fec_inner);
220  ok &= m_modulation.Parse(_modulation);
221 
222  if (!_polarity.isEmpty())
223  m_polarity.Parse(_polarity.toLower());
224 
225  if (ok)
226  m_frequency = _frequency.toInt(&ok);
227 
228  return ok;
229 }
230 
232  const QString &_frequency, const QString &_inversion,
233  const QString &_symbol_rate, const QString &_fec_inner,
234  const QString &_modulation, const QString &_polarity)
235 {
236  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
237  _fec_inner, _modulation, _polarity);
239  return ok;
240 }
241 
243  const QString &_frequency, const QString &_inversion,
244  const QString &_symbol_rate, const QString &_fec_inner,
245  const QString &_modulation, const QString &_polarity,
246  const QString &_mod_sys)
247 {
248  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
249  _fec_inner, _modulation, _polarity);
250 
251  m_modSys.Parse(_mod_sys);
253  {
254  LOG(VB_GENERAL, LOG_WARNING, LOC + "Undefined modulation system " +
255  QString("parameter '%1', using DVB-C/A.").arg(_mod_sys));
257  }
258 
259  // 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, 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, 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 
421  MSqlQuery query(MSqlQuery::InitCon());
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 
568  MSqlQuery query(MSqlQuery::InitCon());
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 
621  MSqlQuery query(MSqlQuery::InitCon());
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, bandwidth, "
630  " sistandard, tuner_type, signal_strength "
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, :BANDWIDTH, "
639  " :SISTANDARD, :TUNER_TYPE, :SIGNAL_STRENGTH "
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", m_tunerType.toUInt());
660  query.bindValue(":SIGNAL_STRENGTH", m_signalStrength);
661 
662  if (!query.exec())
663  {
664  MythDB::DBError("ScanDTVTransport::SaveScan 1", query);
665  return transportid;
666  }
667 
668  query.prepare("SELECT MAX(transportid) FROM channelscan_dtv_multiplex");
669  if (!query.exec())
670  MythDB::DBError("ScanDTVTransport::SaveScan 2", query);
671  else if (query.next())
672  transportid = query.value(0).toUInt();
673 
674  if (!transportid)
675  return transportid;
676 
677  for (const auto & channel : m_channels)
678  channel.SaveScan(scanid, transportid);
679 
680  return transportid;
681 }
682 
685  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
686  const QString& _fec, const QString& _polarity,
687  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
688  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
689  const QString& _modulation, const QString& _bandwidth, const QString& _mod_sys,
690  const QString& _rolloff, const QString& signal_strength)
691 {
692  m_tunerType = type;
693  m_signalStrength = signal_strength.toInt();
694 
696  type,
697  _frequency, _inversion, _symbolrate,
698  _fec, _polarity,
699  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
700  _trans_mode, _guard_interval, _hierarchy,
701  _modulation, _bandwidth, _mod_sys,
702  _rolloff);
703 }
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:802
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:124
DTVMultiplex
Definition: dtvmultiplex.h:24
DTVHierarchy::IsCompatible
bool IsCompatible(const DTVHierarchy other) const
Definition: dtvconfparserhelpers.h:581
TerrestrialDeliverySystemDescriptor::HierarchyString
QString HierarchyString(void) const
Definition: dvbdescriptors.h:997
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:1043
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:465
DTVHierarchy::toString
QString toString() const
Definition: dtvconfparserhelpers.h:593
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:201
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:739
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:754
DTVCodeRate::toString
QString toString() const
Definition: dtvconfparserhelpers.h:341
CableDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:813
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:683
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:195
dtvmultiplex.h
DTVMultiplex::FillFromDB
virtual bool FillFromDB(DTVTunerType type, uint mplexid)
Definition: dtvmultiplex.cpp:417
TerrestrialDeliverySystemDescriptor
Definition: dvbdescriptors.h:927
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:242
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:165
TerrestrialDeliverySystemDescriptor::BandwidthString
QString BandwidthString(void) const
Definition: dvbdescriptors.h:955
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:872
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:200
SatelliteDeliverySystemDescriptor::ModulationSystem
uint ModulationSystem(void) const
Definition: dvbdescriptors.h:878
TerrestrialDeliverySystemDescriptor::ConstellationString
QString ConstellationString(void) const
Definition: dvbdescriptors.h:976
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:563
SatelliteDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:921
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:140
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:834
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:1027
DTVGuardInterval::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:537
cardutil.h
SatelliteDeliverySystemDescriptor::ModulationSystemString
QString ModulationSystemString(void) const
Definition: dvbdescriptors.h:879
CableDeliverySystemDescriptor::ModulationString
QString ModulationString(void) const
Definition: dvbdescriptors.h:783
SatelliteDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:904
MSqlQuery::bindValue
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:878
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:943
DTVMultiplex::ParseATSC
bool ParseATSC(const QString &frequency, const QString &modulation)
Definition: dtvmultiplex.cpp:144
TerrestrialDeliverySystemDescriptor::TransmissionModeString
QString TransmissionModeString(void) const
Definition: dvbdescriptors.h:1056
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:854
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:356
DTVRollOff::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:765
SatelliteDeliverySystemDescriptor
Definition: dvbdescriptors.h:818
TerrestrialDeliverySystemDescriptor::CodeRateHPString
QString CodeRateHPString(void) const
Definition: dvbdescriptors.h:1018
CableDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:796
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:51
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
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:231
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:893
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:827
DTVModulationSystem::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:716
DTVMultiplex::m_lpCodeRate
DTVCodeRate m_lpCodeRate
Definition: dtvmultiplex.h:99