MythTV  master
dtvmultiplex.cpp
Go to the documentation of this file.
1 #include <utility>
2 
3 // MythTV headers
4 #include "libmythbase/mythdb.h"
6 
7 #include "dtvmultiplex.h"
8 #include "mpeg/dvbdescriptors.h"
9 #include "cardutil.h"
10 
11 #define LOC QString("DTVMux: ")
12 
14 {
15  return ((m_frequency == m.m_frequency) &&
16  (m_modulation == m.m_modulation) &&
17  (m_inversion == m.m_inversion) &&
18  (m_bandwidth == m.m_bandwidth) &&
19  (m_hpCodeRate == m.m_hpCodeRate) &&
20  (m_lpCodeRate == m.m_lpCodeRate) &&
21  (m_transMode == m.m_transMode) &&
23  (m_fec == m.m_fec) &&
24  (m_modSys == m.m_modSys) &&
25  (m_rolloff == m.m_rolloff) &&
26  (m_polarity == m.m_polarity) &&
27  (m_hierarchy == m.m_hierarchy) &&
29  );
30 }
31 
33 // Gets
34 
35 QString DTVMultiplex::toString() const
36 {
37  QString ret = QString("%1 %2 %3 %4")
38  .arg(QString::number(m_frequency), m_modulation.toString(),
39  m_inversion.toString(), QString::number(m_symbolRate));
40 
41  ret += QString(" %1 %2 %3 %4 %5 %6 %7")
46  ret += QString(" fec:%1 msys:%2 ro:%3")
47  .arg(m_fec.toString(),-4).arg(m_modSys.toString(),-6).arg(m_rolloff.toString());
48 
49  return ret;
50 }
51 
53  uint freq_range, bool fuzzy) const
54 {
55  if ((m_frequency + freq_range < other.m_frequency ) ||
56  (m_frequency > other.m_frequency + freq_range))
57  {
58  return false;
59  }
60 
62  {
63  if (fuzzy)
64  {
65  return
67  (m_symbolRate == other.m_symbolRate) &&
68  m_fec.IsCompatible(other.m_fec) &&
70  }
71  return
72  (m_inversion == other.m_inversion) &&
73  (m_symbolRate == other.m_symbolRate) &&
74  (m_fec == other.m_fec) &&
75  (m_modulation == other.m_modulation);
76  }
77 
80  {
81  if (fuzzy)
82  {
83  return
93  }
94  return
95  (m_inversion == other.m_inversion) &&
96  (m_bandwidth == other.m_bandwidth) &&
97  (m_hpCodeRate == other.m_hpCodeRate) &&
98  (m_lpCodeRate == other.m_lpCodeRate) &&
99  (m_modulation == other.m_modulation) &&
100  (m_guardInterval == other.m_guardInterval) &&
101  (m_transMode == other.m_transMode) &&
102  (m_hierarchy == other.m_hierarchy) &&
103  (m_modSys == other.m_modSys);
104  }
105 
107  {
108  if (fuzzy)
109  return m_modulation.IsCompatible(other.m_modulation);
110  return (m_modulation == other.m_modulation);
111  }
112 
115  {
116  bool ret =
117  (m_symbolRate == other.m_symbolRate) &&
118  (m_polarity == other.m_polarity) &&
119  (m_modSys == other.m_modSys);
120 
121  if (fuzzy)
122  {
123  return ret &&
125  m_fec.IsCompatible(other.m_fec) &&
127  }
128  return ret &&
129  (m_inversion == other.m_inversion) &&
130  (m_fec == other.m_fec) &&
131  (m_rolloff == other.m_rolloff);
132  }
133 
135  {
136  return (m_iptvTuning == other.m_iptvTuning);
137  }
138 
139  return false;
140 }
141 
143 // Parsers
144 
145 bool DTVMultiplex::ParseATSC(const QString &_frequency,
146  const QString &_modulation)
147 {
148  bool ok = true;
149  m_frequency = _frequency.toULongLong(&ok);
150  if (!ok)
151  {
152  LOG(VB_GENERAL, LOG_ERR, LOC +
153  QString("Failed to parse ATSC frequency %1").arg(_frequency));
154  return false;
155  }
156 
157  ok = m_modulation.Parse(_modulation);
158  if (!ok)
159  {
160  LOG(VB_GENERAL, LOG_ERR, LOC +
161  QString("Failed to parse ATSC modulation %1").arg(_modulation));
162  }
163  return ok;
164 }
165 
167  const QString &_frequency, const QString &_inversion,
168  const QString &_bandwidth, const QString &_coderate_hp,
169  const QString &_coderate_lp, const QString &_modulation,
170  const QString &_trans_mode, const QString &_guard_interval,
171  const QString &_hierarchy)
172 {
173  bool ok = m_inversion.Parse(_inversion);
174  if (!ok)
175  {
176  LOG(VB_GENERAL, LOG_WARNING, LOC +
177  QString("Invalid inversion parameter '%1', falling back to 'auto'.")
178  .arg(_inversion));
179  ok = true;
180  }
181 
182  m_frequency = _frequency.toUInt(&ok);
183  if (!ok)
184  {
185  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid frequency parameter " + _frequency);
186  }
187 
188  if (ok)
189  {
190  ok &= m_modSys.Parse("DVB-T");
191  if (!ok)
192  {
193  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid modulation system parameter " + "DVB-T");
194  }
195  }
196 
197  if (ok)
198  {
199  ok &= m_bandwidth.Parse(_bandwidth);
200  if (!ok)
201  {
202  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid modulation system parameter " + _bandwidth);
203  }
204  }
205 
206  if (ok)
207  {
208  ok &= m_hpCodeRate.Parse(_coderate_hp);
209  if (!ok)
210  {
211  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid coderate_hp parameter " + _coderate_hp);
212  }
213  }
214 
215  if (ok)
216  {
217  ok &= m_lpCodeRate.Parse(_coderate_lp);
218  if (!ok)
219  {
220  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid coderate_lp parameter " + _coderate_lp);
221  }
222  }
223 
224  if (ok)
225  {
226  ok &= m_modulation.Parse(_modulation);
227  if (!ok)
228  {
229  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid modulation parameter " + _modulation);
230  }
231  }
232 
233  if (ok)
234  {
235  ok &= m_transMode.Parse(_trans_mode);
236  if (!ok)
237  {
238  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid transmission mode parameter " + _trans_mode);
239  }
240  }
241 
242  if (ok)
243  {
244  ok &= m_hierarchy.Parse(_hierarchy);
245  if (!ok)
246  {
247  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid hierarchy parameter " + _hierarchy);
248  }
249  }
250 
251  if (ok)
252  {
253  ok &= m_guardInterval.Parse(_guard_interval);
254  if (!ok)
255  {
256  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid guard interval parameter " + _guard_interval);
257  }
258  }
259 
260  return ok;
261 }
262 
264  const QString &_frequency, const QString &_inversion,
265  const QString &_symbol_rate, const QString &_fec_inner,
266  const QString &_modulation, const QString &_polarity)
267 {
268  bool ok = m_inversion.Parse(_inversion);
269  if (!ok)
270  {
271  LOG(VB_GENERAL, LOG_WARNING, LOC +
272  QString("Invalid inversion parameter '%1', falling back to 'auto'.")
273  .arg(_inversion));
274 
275  ok = true;
276  }
277 
278  m_symbolRate = _symbol_rate.toUInt();
279  if (!m_symbolRate)
280  {
281  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid symbol rate " +
282  QString("parameter '%1', aborting.").arg(_symbol_rate));
283 
284  return false;
285  }
286 
287  if (ok)
288  {
289  ok &= m_fec.Parse(_fec_inner);
290  if (!ok)
291  {
292  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid fec parameter " + _fec_inner);
293  }
294  }
295 
296  if (ok)
297  {
298  ok &= m_modulation.Parse(_modulation.toLower());
299  if (!ok)
300  {
301  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid modulation parameter " + _modulation);
302  }
303  }
304 
305  if (ok)
306  {
307  if (!_polarity.isEmpty())
308  {
309  ok = m_polarity.Parse(_polarity.toLower());
310  if (!ok)
311  {
312  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid polarity parameter " + _polarity);
313  }
314  }
315  }
316 
317  if (ok)
318  {
319  m_frequency = _frequency.toUInt(&ok);
320  if (!ok)
321  {
322  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid frequency parameter " + _frequency);
323  }
324  }
325 
326  return ok;
327 }
328 
330  const QString &_frequency, const QString &_inversion,
331  const QString &_symbol_rate, const QString &_fec_inner,
332  const QString &_modulation, const QString &_polarity)
333 {
334  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
335  _fec_inner, _modulation, _polarity);
337  return ok;
338 }
339 
341  const QString &_frequency, const QString &_inversion,
342  const QString &_symbol_rate, const QString &_fec_inner,
343  const QString &_modulation, const QString &_polarity,
344  const QString &_mod_sys)
345 {
346  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
347  _fec_inner, _modulation, _polarity);
348 
349  m_modSys.Parse(_mod_sys);
351  {
352  LOG(VB_GENERAL, LOG_WARNING, LOC + "Undefined modulation system " +
353  QString("parameter '%1', using DVB-C/A.").arg(_mod_sys));
355  }
356 
357  // Only DVB-C variants can be used with a DVB-C tuner.
360  {
361  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-C modulation system " +
362  QString("parameter '%1', aborting.").arg(_mod_sys));
363  return false;
364  }
365 
366  return ok;
367 }
368 
370  const QString &_frequency, const QString &_inversion,
371  const QString &_symbol_rate, const QString &_fec_inner,
372  const QString &_modulation, const QString &_polarity,
373  const QString &_mod_sys, const QString &_rolloff)
374 {
375  LOG(VB_GENERAL, LOG_DEBUG, LOC + "ParseDVB_S2" +
376  " frequency:" + _frequency +
377  " inversion:" + _inversion +
378  " symbol_rate:" + _symbol_rate +
379  " fec_inner:" + _fec_inner +
380  " modulation:" + _modulation +
381  " polarity:" + _polarity +
382  " mod_sys:" + _mod_sys +
383  " rolloff:" + _rolloff);
384 
385  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
386  _fec_inner, _modulation, _polarity);
387 
389  m_modSys.Parse(_mod_sys);
390 
391  // For #10153, guess at modulation system based on modulation
393  {
397  }
398 
399  // Only DVB-S and DVB_S2 can be used with a DVB-S2 tuner.
402  {
403  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-S2 modulation system " +
404  QString("parameter '%1', aborting.").arg(_mod_sys));
405  return false;
406  }
407 
408  if (!_rolloff.isEmpty())
409  ok &= m_rolloff.Parse(_rolloff);
410 
411  return ok;
412 }
413 
415  const QString &_frequency, const QString &_inversion,
416  const QString &_bandwidth, const QString &_coderate_hp,
417  const QString &_coderate_lp, const QString &_modulation,
418  const QString &_trans_mode, const QString &_guard_interval,
419  const QString &_hierarchy, const QString &_mod_sys)
420 {
421  bool ok = ParseDVB_T(_frequency, _inversion, _bandwidth,
422  _coderate_hp, _coderate_lp, _modulation,
423  _trans_mode, _guard_interval, _hierarchy);
424 
426  m_modSys.Parse(_mod_sys);
427 
428  // We have a DVB-T2 tuner, change undefined modulation system to DVB-T2
430  {
432  LOG(VB_GENERAL, LOG_WARNING, LOC + "Undefined modulation system, " +
433  QString("using %1.").arg(m_modSys.toString()));
434  }
435 
436  // Only DVB-T and DVB-T2 can be used with a DVB-T2 tuner.
439  {
440  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-T2 modulation system " +
441  QString("%1, aborting.").arg(m_modSys.toString()));
442  return false;
443  }
444 
445  return ok;
446 }
447 
450  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
451  const QString& _fec, const QString& _polarity,
452  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
453  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
454  const QString& _modulation, const QString& _bandwidth,
455  const QString& _mod_sys, const QString& _rolloff)
456 {
459  {
460  return ParseDVB_T2(
461  _frequency, _inversion, _bandwidth,
462  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
463  _trans_mode, _guard_interval, _hierarchy,
464  _mod_sys);
465  }
466 
468  {
469  return ParseDVB_C(
470  _frequency, _inversion, _symbolrate,
471  _fec, _modulation, _polarity,
472  _mod_sys);
473  }
474 
476  {
477  return ParseDVB_S(
478  _frequency, _inversion, _symbolrate,
479  _fec, _modulation, _polarity);
480  }
481 
483  {
484  return ParseDVB_S2(
485  _frequency, _inversion, _symbolrate,
486  _fec, _modulation, _polarity,
487  _mod_sys, _rolloff);
488  }
489 
490 
492  {
493  return ParseATSC(_frequency, _modulation);
494  }
495 
496  LOG(VB_GENERAL, LOG_ERR, LOC +
497  QString("ParseTuningParams -- Unknown tuner type = 0x%1")
498  .arg(type,0,16,QChar('0')));
499 
500  return false;
501 }
502 
504 {
505  Clear();
506 
507  MSqlQuery query(MSqlQuery::InitCon());
508  query.prepare(
509  "SELECT frequency, inversion, symbolrate, "
510  " fec, polarity, "
511  " hp_code_rate, lp_code_rate, constellation, "
512  " transmission_mode, guard_interval, hierarchy, "
513  " modulation, bandwidth, sistandard, "
514  " mod_sys, rolloff "
515  "FROM dtv_multiplex "
516  "WHERE dtv_multiplex.mplexid = :MPLEXID");
517  query.bindValue(":MPLEXID", mplexid);
518 
519  if (!query.exec())
520  {
521  MythDB::DBError("DVBTuning::FillFromDB", query);
522  return false;
523  }
524 
525  if (!query.next())
526  {
527  LOG(VB_GENERAL, LOG_ERR, LOC +
528  QString("Could not find tuning parameters for mplex %1")
529  .arg(mplexid));
530 
531  return false;
532  }
533 
534  m_mplex = mplexid;
535  m_sistandard = query.value(13).toString();
536 
537  // Parse the query into our DVBTuning class
538  return ParseTuningParams(
539  type,
540  query.value(0).toString(), query.value(1).toString(),
541  query.value(2).toString(), query.value(3).toString(),
542  query.value(4).toString(), query.value(5).toString(),
543  query.value(6).toString(), query.value(7).toString(),
544  query.value(8).toString(), query.value(9).toString(),
545  query.value(10).toString(), query.value(11).toString(),
546  query.value(12).toString(), query.value(14).toString(),
547  query.value(15).toString());
548 }
549 
550 
552  const MPEGDescriptor &desc)
553 {
554  uint tag = desc.DescriptorTag();
555  m_sistandard = "dvb";
556 
557  switch (tag)
558  {
560  {
562 
564  {
565  return ParseDVB_T(
566  QString::number(cd.FrequencyHz()), "a",
570  cd.HierarchyString());
571  }
572 
574  {
575  return ParseDVB_T2(
576  QString::number(cd.FrequencyHz()), "a",
580  cd.HierarchyString(), "DVB-T");
581  }
582 
583  break;
584  }
586  {
587  const SatelliteDeliverySystemDescriptor cd(desc);
588 
590  {
591  if (cd.ModulationSystem())
592  {
593  LOG(VB_CHANSCAN, LOG_NOTICE, LOC +
594  "Ignoring DVB-S2 transponder with DVB-S card");
595  return false;
596  }
597 
598  return ParseDVB_S(
599  QString::number(cd.FrequencykHz()), "a",
600  QString::number(cd.SymbolRateHz()),
601  cd.FECInnerString(),
602  cd.ModulationString(),
603  cd.PolarizationString());
604  }
605 
607  {
608  return ParseDVB_S2(
609  QString::number(cd.FrequencykHz()), "a",
610  QString::number(cd.SymbolRateHz()),
611  cd.FECInnerString(),
612  cd.ModulationString(),
613  cd.PolarizationString(),
615  cd.RollOffString());
616  }
617 
618  break;
619  }
621  {
623  break;
624 
625  const CableDeliverySystemDescriptor cd(desc);
626 
627  return ParseDVB_C(
628  QString::number(cd.FrequencyHz()), "a",
629  QString::number(cd.SymbolRateHz()), cd.FECInnerString(),
630  cd.ModulationString(), QString(),
631  "DVB-C/A");
632  }
633  default:
634  LOG(VB_CHANSCAN, LOG_ERR, LOC +
635  QString("Unknown delivery system descriptor 0x%1").arg(tag,0,16));
636  return false;
637  }
638 
639  LOG(VB_CHANSCAN, LOG_ERR, LOC +
640  QString("Tuner type %1 does not match delivery system")
641  .arg(type.toString()));
642  return false;
643 }
644 
645 
648 
650 {
651  if (!DTVMultiplex::FillFromDB(type, mplexid))
652  return false;
653 
654  MSqlQuery query(MSqlQuery::InitCon());
655  query.prepare(
656  "SELECT c.mplexid, c.sourceid, c.chanid, "
657  " c.callsign, c.name, c.channum, "
658  " c.serviceid, c.atsc_major_chan, c.atsc_minor_chan, "
659  " c.useonairguide, c.visible, c.freqid, "
660  " c.icon, c.tvformat, c.xmltvid, "
661  " d.transportid, d.networkid, c.default_authority,"
662  " c.service_type "
663  "FROM channel AS c, dtv_multiplex AS d "
664  "WHERE c.deleted IS NULL AND "
665  " c.mplexid = :MPLEXID AND"
666  " c.mplexid = d.mplexid");
667  query.bindValue(":MPLEXID", mplexid);
668 
669  if (!query.exec())
670  {
671  MythDB::DBError("ScanDTVTransport::FillFromDB", query);
672  return false;
673  }
674 
675  while (query.next())
676  {
677  ChannelInsertInfo chan(
678  query.value(0).toUInt(), query.value(1).toUInt(),
679  query.value(2).toUInt(), query.value(3).toString(),
680  query.value(4).toString(), query.value(5).toString(),
681  query.value(6).toUInt(),
682  query.value(7).toUInt(), query.value(8).toUInt(),
683  query.value(9).toBool(), !query.value(10).toBool(),
684  false,
685  query.value(11).toString(), query.value(12).toString(),
686  query.value(13).toString(), query.value(14).toString(),
687  0, 0, 0,
688  query.value(15).toUInt(), query.value(16).toUInt(),
689  0,
690  QString(),
691  false, false, false, false,
692  false, false, false, false,
693  false, false, false, 0,
694  query.value(17).toString(), /* default_authority */
695  query.value(18).toUInt()); /* service_type */
696 
697  m_channels.push_back(chan);
698  }
699 
700  return true;
701 }
702 
704 {
705  uint transportid = 0;
706 
707  MSqlQuery query(MSqlQuery::InitCon());
708  query.prepare(
709  "INSERT INTO channelscan_dtv_multiplex "
710  " ( scanid, "
711  " mplexid, frequency, inversion, "
712  " symbolrate, fec, polarity, "
713  " hp_code_rate, lp_code_rate, modulation, "
714  " transmission_mode, guard_interval, hierarchy, "
715  " mod_sys, rolloff, bandwidth, "
716  " sistandard, tuner_type, signal_strength "
717  " ) "
718  "VALUES "
719  " ( :SCANID, "
720  " :MPLEXID, :FREQUENCY, :INVERSION, "
721  " :SYMBOLRATE, :FEC, :POLARITY, "
722  " :HP_CODE_RATE, :LP_CODE_RATE, :MODULATION, "
723  " :TRANSMISSION_MODE, :GUARD_INTERVAL, :HIERARCHY, "
724  " :MOD_SYS, :ROLLOFF, :BANDWIDTH, "
725  " :SISTANDARD, :TUNER_TYPE, :SIGNAL_STRENGTH "
726  " );");
727 
728  query.bindValue(":SCANID", scanid);
729  query.bindValue(":MPLEXID", m_mplex);
730  query.bindValue(":FREQUENCY", QString::number(m_frequency));
731  query.bindValue(":INVERSION", m_inversion.toString());
732  query.bindValue(":SYMBOLRATE", QString::number(m_symbolRate));
733  query.bindValue(":FEC", m_fec.toString());
734  query.bindValue(":POLARITY", m_polarity.toString());
735  query.bindValue(":HP_CODE_RATE", m_hpCodeRate.toString());
736  query.bindValue(":LP_CODE_RATE", m_lpCodeRate.toString());
737  query.bindValue(":MODULATION", m_modulation.toString());
738  query.bindValue(":TRANSMISSION_MODE", m_transMode.toString());
739  query.bindValue(":GUARD_INTERVAL", m_guardInterval.toString());
740  query.bindValue(":HIERARCHY", m_hierarchy.toString());
741  query.bindValue(":MOD_SYS", m_modSys.toString());
742  query.bindValue(":ROLLOFF", m_rolloff.toString());
743  query.bindValue(":BANDWIDTH", m_bandwidth.toString());
744  query.bindValue(":SISTANDARD", m_sistandard);
745  query.bindValue(":TUNER_TYPE", m_tunerType.toUInt());
746  query.bindValue(":SIGNAL_STRENGTH", m_signalStrength);
747 
748  if (!query.exec())
749  {
750  MythDB::DBError("ScanDTVTransport::SaveScan 1", query);
751  return transportid;
752  }
753 
754  query.prepare("SELECT MAX(transportid) FROM channelscan_dtv_multiplex");
755  if (!query.exec())
756  MythDB::DBError("ScanDTVTransport::SaveScan 2", query);
757  else if (query.next())
758  transportid = query.value(0).toUInt();
759 
760  if (!transportid)
761  return transportid;
762 
763  for (const auto & channel : m_channels)
764  channel.SaveScan(scanid, transportid);
765 
766  return transportid;
767 }
768 
771  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
772  const QString& _fec, const QString& _polarity,
773  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
774  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
775  const QString& _modulation, const QString& _bandwidth, const QString& _mod_sys,
776  const QString& _rolloff, const QString& signal_strength)
777 {
778  m_tunerType = type;
779  m_signalStrength = signal_strength.toInt();
780 
782  type,
783  _frequency, _inversion, _symbolrate,
784  _fec, _polarity,
785  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
786  _trans_mode, _guard_interval, _hierarchy,
787  _modulation, _bandwidth, _mod_sys,
788  _rolloff);
789 }
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:813
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:127
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:1009
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:1055
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:551
DTVHierarchy::toString
QString toString() const
Definition: dtvconfparserhelpers.h:593
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:204
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:751
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:619
DTVMultiplex::operator==
bool operator==(const DTVMultiplex &m) const
Definition: dtvmultiplex.cpp:13
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
DTVMultiplex::m_bandwidth
DTVBandwidth m_bandwidth
Definition: dtvmultiplex.h:97
CableDeliverySystemDescriptor::FrequencyHz
unsigned long long FrequencyHz(void) const
Definition: dvbdescriptors.h:766
DTVCodeRate::toString
QString toString() const
Definition: dtvconfparserhelpers.h:341
DescriptorID::satellite_delivery_system
@ satellite_delivery_system
Definition: mpegdescriptors.h:75
CableDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:825
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:769
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:263
dtvmultiplex.h
DTVMultiplex::FillFromDB
virtual bool FillFromDB(DTVTunerType type, uint mplexid)
Definition: dtvmultiplex.cpp:503
TerrestrialDeliverySystemDescriptor
Definition: dvbdescriptors.h:939
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:340
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:166
TerrestrialDeliverySystemDescriptor::BandwidthString
QString BandwidthString(void) const
Definition: dvbdescriptors.h:967
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:551
SatelliteDeliverySystemDescriptor::RollOffString
QString RollOffString(void) const
Definition: dvbdescriptors.h:884
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:226
SatelliteDeliverySystemDescriptor::ModulationSystem
uint ModulationSystem(void) const
Definition: dvbdescriptors.h:890
TerrestrialDeliverySystemDescriptor::ConstellationString
QString ConstellationString(void) const
Definition: dvbdescriptors.h:988
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:649
SatelliteDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:933
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:11
DTVMultiplex::m_fec
DTVCodeRate m_fec
Definition: dtvmultiplex.h:105
DTVMultiplex::toString
QString toString() const
Definition: dtvmultiplex.cpp:35
uint
unsigned int uint
Definition: compat.h:81
DescriptorID::terrestrial_delivery_system
@ terrestrial_delivery_system
Definition: mpegdescriptors.h:99
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:414
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:1039
DTVGuardInterval::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:537
cardutil.h
SatelliteDeliverySystemDescriptor::ModulationSystemString
QString ModulationSystemString(void) const
Definition: dvbdescriptors.h:891
CableDeliverySystemDescriptor::ModulationString
QString ModulationString(void) const
Definition: dvbdescriptors.h:795
SatelliteDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:916
MSqlQuery::bindValue
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:889
ScanDTVTransport::SaveScan
uint SaveScan(uint scanid) const
Definition: dtvmultiplex.cpp:703
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:369
TerrestrialDeliverySystemDescriptor::FrequencyHz
uint64_t FrequencyHz(void) const
Definition: dvbdescriptors.h:955
DTVMultiplex::ParseATSC
bool ParseATSC(const QString &frequency, const QString &modulation)
Definition: dtvmultiplex.cpp:145
TerrestrialDeliverySystemDescriptor::TransmissionModeString
QString TransmissionModeString(void) const
Definition: dvbdescriptors.h:1068
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:866
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:448
DTVRollOff::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:765
SatelliteDeliverySystemDescriptor
Definition: dvbdescriptors.h:830
TerrestrialDeliverySystemDescriptor::CodeRateHPString
QString CodeRateHPString(void) const
Definition: dvbdescriptors.h:1030
CableDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:808
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:52
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
SatelliteDeliverySystemDescriptor::FrequencykHz
uint64_t FrequencykHz(void) const
Definition: dvbdescriptors.h:846
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:329
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:905
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
DescriptorID::cable_delivery_system
@ cable_delivery_system
Definition: mpegdescriptors.h:76
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:838
DTVModulationSystem::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:716
DTVMultiplex::m_lpCodeRate
DTVCodeRate m_lpCodeRate
Definition: dtvmultiplex.h:99