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  m_frequency = _frequency.toUInt(&ok);
182  if (!ok)
183  {
184  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid frequency parameter " + _frequency);
185  }
186 
187  if (ok)
188  {
189  ok &= m_modSys.Parse("DVB-T");
190  if (!ok)
191  {
192  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid modulation system parameter " + "DVB-T");
193  }
194  }
195 
196  if (ok)
197  {
198  ok &= m_bandwidth.Parse(_bandwidth);
199  if (!ok)
200  {
201  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid modulation system parameter " + _bandwidth);
202  }
203  }
204 
205  if (ok)
206  {
207  ok &= m_hpCodeRate.Parse(_coderate_hp);
208  if (!ok)
209  {
210  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid coderate_hp parameter " + _coderate_hp);
211  }
212  }
213 
214  if (ok)
215  {
216  ok &= m_lpCodeRate.Parse(_coderate_lp);
217  if (!ok)
218  {
219  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid coderate_lp parameter " + _coderate_lp);
220  }
221  }
222 
223  if (ok)
224  {
225  ok &= m_modulation.Parse(_modulation);
226  if (!ok)
227  {
228  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid modulation parameter " + _modulation);
229  }
230  }
231 
232  if (ok)
233  {
234  ok &= m_transMode.Parse(_trans_mode);
235  if (!ok)
236  {
237  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid transmission mode parameter " + _trans_mode);
238  }
239  }
240 
241  if (ok)
242  {
243  ok &= m_hierarchy.Parse(_hierarchy);
244  if (!ok)
245  {
246  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid hierarchy parameter " + _hierarchy);
247  }
248  }
249 
250  if (ok)
251  {
252  ok &= m_guardInterval.Parse(_guard_interval);
253  if (!ok)
254  {
255  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid guard interval parameter " + _guard_interval);
256  }
257  }
258 
259  return ok;
260 }
261 
263  const QString &_frequency, const QString &_inversion,
264  const QString &_symbol_rate, const QString &_fec_inner,
265  const QString &_modulation, const QString &_polarity)
266 {
267  bool ok = m_inversion.Parse(_inversion);
268  if (!ok)
269  {
270  LOG(VB_GENERAL, LOG_WARNING, LOC +
271  QString("Invalid inversion parameter '%1', falling back to 'auto'.")
272  .arg(_inversion));
273 
274  ok = true;
275  }
276 
277  m_symbolRate = _symbol_rate.toUInt();
278  if (!m_symbolRate)
279  {
280  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid symbol rate " +
281  QString("parameter '%1', aborting.").arg(_symbol_rate));
282 
283  return false;
284  }
285 
286  if (ok)
287  {
288  ok &= m_fec.Parse(_fec_inner);
289  if (!ok)
290  {
291  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid fec parameter " + _fec_inner);
292  }
293  }
294 
295  if (ok)
296  {
297  ok &= m_modulation.Parse(_modulation.toLower());
298  if (!ok)
299  {
300  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid modulation parameter " + _modulation);
301  }
302  }
303 
304  if (ok)
305  {
306  if (!_polarity.isEmpty())
307  {
308  ok = m_polarity.Parse(_polarity.toLower());
309  if (!ok)
310  {
311  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid polarity parameter " + _polarity);
312  }
313  }
314  }
315 
316  if (ok)
317  {
318  m_frequency = _frequency.toUInt(&ok);
319  if (!ok)
320  {
321  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid frequency parameter " + _frequency);
322  }
323  }
324 
325  return ok;
326 }
327 
329  const QString &_frequency, const QString &_inversion,
330  const QString &_symbol_rate, const QString &_fec_inner,
331  const QString &_modulation, const QString &_polarity)
332 {
333  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
334  _fec_inner, _modulation, _polarity);
336  return ok;
337 }
338 
340  const QString &_frequency, const QString &_inversion,
341  const QString &_symbol_rate, const QString &_fec_inner,
342  const QString &_modulation, const QString &_polarity,
343  const QString &_mod_sys)
344 {
345  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
346  _fec_inner, _modulation, _polarity);
347 
348  m_modSys.Parse(_mod_sys);
350  {
351  LOG(VB_GENERAL, LOG_WARNING, LOC + "Undefined modulation system " +
352  QString("parameter '%1', using DVB-C/A.").arg(_mod_sys));
354  }
355 
356  // Only DVB-C variants can be used with a DVB-C tuner.
359  {
360  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-C modulation system " +
361  QString("parameter '%1', aborting.").arg(_mod_sys));
362  return false;
363  }
364 
365  return ok;
366 }
367 
369  const QString &_frequency, const QString &_inversion,
370  const QString &_symbol_rate, const QString &_fec_inner,
371  const QString &_modulation, const QString &_polarity,
372  const QString &_mod_sys, const QString &_rolloff)
373 {
374  LOG(VB_GENERAL, LOG_DEBUG, LOC + "ParseDVB_S2" +
375  " frequency:" + _frequency +
376  " inversion:" + _inversion +
377  " symbol_rate:" + _symbol_rate +
378  " fec_inner:" + _fec_inner +
379  " modulation:" + _modulation +
380  " polarity:" + _polarity +
381  " mod_sys:" + _mod_sys +
382  " rolloff:" + _rolloff);
383 
384  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
385  _fec_inner, _modulation, _polarity);
386 
388  m_modSys.Parse(_mod_sys);
389 
390  // For #10153, guess at modulation system based on modulation
392  {
396  }
397 
398  // Only DVB-S and DVB_S2 can be used with a DVB-S2 tuner.
401  {
402  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-S2 modulation system " +
403  QString("parameter '%1', aborting.").arg(_mod_sys));
404  return false;
405  }
406 
407  if (!_rolloff.isEmpty())
408  ok &= m_rolloff.Parse(_rolloff);
409 
410  return ok;
411 }
412 
414  const QString &_frequency, const QString &_inversion,
415  const QString &_bandwidth, const QString &_coderate_hp,
416  const QString &_coderate_lp, const QString &_modulation,
417  const QString &_trans_mode, const QString &_guard_interval,
418  const QString &_hierarchy, const QString &_mod_sys)
419 {
420  bool ok = ParseDVB_T(_frequency, _inversion, _bandwidth,
421  _coderate_hp, _coderate_lp, _modulation,
422  _trans_mode, _guard_interval, _hierarchy);
423 
425  m_modSys.Parse(_mod_sys);
426 
427  // Accept 0 for DVB-T
428  if (_mod_sys == "0")
429  {
431  LOG(VB_GENERAL, LOG_WARNING, LOC + "Deprecated DVB-T modulation system " +
432  QString("parameter '%1', using %2.").arg(_mod_sys, m_modSys.toString()));
433  }
434 
435  // Accept 1 for DVB-T2
436  if (_mod_sys == "1")
437  {
439  LOG(VB_GENERAL, LOG_WARNING, LOC + "Deprecated DVB-T2 modulation system " +
440  QString("parameter '%1', using %2.").arg(_mod_sys, m_modSys.toString()));
441  }
442 
443  // We have a DVB-T2 tuner, change undefined modulation system to DVB-T2
445  {
447  LOG(VB_GENERAL, LOG_WARNING, LOC + "Undefined modulation system, " +
448  QString("using %1.").arg(m_modSys.toString()));
449  }
450 
451  // Only DVB-T and DVB-T2 can be used with a DVB-T2 tuner.
454  {
455  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-T2 modulation system " +
456  QString("%1, aborting.").arg(m_modSys.toString()));
457  return false;
458  }
459 
460  return ok;
461 }
462 
465  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
466  const QString& _fec, const QString& _polarity,
467  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
468  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
469  const QString& _modulation, const QString& _bandwidth,
470  const QString& _mod_sys, const QString& _rolloff)
471 {
473  {
474  return ParseDVB_T(
475  _frequency, _inversion, _bandwidth,
476  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
477  _trans_mode, _guard_interval, _hierarchy);
478  }
479 
481  {
482  return ParseDVB_C(
483  _frequency, _inversion, _symbolrate,
484  _fec, _modulation, _polarity,
485  _mod_sys);
486  }
487 
489  {
490  return ParseDVB_S(
491  _frequency, _inversion, _symbolrate,
492  _fec, _modulation, _polarity);
493  }
494 
496  {
497  return ParseDVB_S2(
498  _frequency, _inversion, _symbolrate,
499  _fec, _modulation, _polarity,
500  _mod_sys, _rolloff);
501  }
502 
504  {
505  return ParseDVB_T2(
506  _frequency, _inversion, _bandwidth,
507  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
508  _trans_mode, _guard_interval, _hierarchy,
509  _mod_sys);
510  }
511 
513  {
514  return ParseATSC(_frequency, _modulation);
515  }
516 
517  LOG(VB_GENERAL, LOG_ERR, LOC +
518  QString("ParseTuningParams -- Unknown tuner type = 0x%1")
519  .arg(type,0,16,QChar('0')));
520 
521  return false;
522 }
523 
525 {
526  Clear();
527 
528  MSqlQuery query(MSqlQuery::InitCon());
529  query.prepare(
530  "SELECT frequency, inversion, symbolrate, "
531  " fec, polarity, "
532  " hp_code_rate, lp_code_rate, constellation, "
533  " transmission_mode, guard_interval, hierarchy, "
534  " modulation, bandwidth, sistandard, "
535  " mod_sys, rolloff "
536  "FROM dtv_multiplex "
537  "WHERE dtv_multiplex.mplexid = :MPLEXID");
538  query.bindValue(":MPLEXID", mplexid);
539 
540  if (!query.exec())
541  {
542  MythDB::DBError("DVBTuning::FillFromDB", query);
543  return false;
544  }
545 
546  if (!query.next())
547  {
548  LOG(VB_GENERAL, LOG_ERR, LOC +
549  QString("Could not find tuning parameters for mplex %1")
550  .arg(mplexid));
551 
552  return false;
553  }
554 
555  m_mplex = mplexid;
556  m_sistandard = query.value(13).toString();
557 
558  // Parse the query into our DVBTuning class
559  return ParseTuningParams(
560  type,
561  query.value(0).toString(), query.value(1).toString(),
562  query.value(2).toString(), query.value(3).toString(),
563  query.value(4).toString(), query.value(5).toString(),
564  query.value(6).toString(), query.value(7).toString(),
565  query.value(8).toString(), query.value(9).toString(),
566  query.value(10).toString(), query.value(11).toString(),
567  query.value(12).toString(), query.value(14).toString(),
568  query.value(15).toString());
569 }
570 
571 
573  const MPEGDescriptor &desc)
574 {
575  uint tag = desc.DescriptorTag();
576  m_sistandard = "dvb";
577 
578  switch (tag)
579  {
581  {
583 
585  {
586  return ParseDVB_T(
587  QString::number(cd.FrequencyHz()), "a",
591  cd.HierarchyString());
592  }
593 
595  {
596  return ParseDVB_T2(
597  QString::number(cd.FrequencyHz()), "a",
601  cd.HierarchyString(), "DVB-T");
602  }
603 
604  break;
605  }
607  {
608  const SatelliteDeliverySystemDescriptor cd(desc);
609 
611  {
612  if (cd.ModulationSystem())
613  {
614  LOG(VB_CHANSCAN, LOG_NOTICE, LOC +
615  "Ignoring DVB-S2 transponder with DVB-S card");
616  return false;
617  }
618 
619  return ParseDVB_S(
620  QString::number(cd.FrequencykHz()), "a",
621  QString::number(cd.SymbolRateHz()),
622  cd.FECInnerString(),
623  cd.ModulationString(),
624  cd.PolarizationString());
625  }
626 
628  {
629  return ParseDVB_S2(
630  QString::number(cd.FrequencykHz()), "a",
631  QString::number(cd.SymbolRateHz()),
632  cd.FECInnerString(),
633  cd.ModulationString(),
634  cd.PolarizationString(),
636  cd.RollOffString());
637  }
638 
639  break;
640  }
642  {
644  break;
645 
646  const CableDeliverySystemDescriptor cd(desc);
647 
648  return ParseDVB_C(
649  QString::number(cd.FrequencyHz()), "a",
650  QString::number(cd.SymbolRateHz()), cd.FECInnerString(),
651  cd.ModulationString(), QString(),
652  "DVB-C/A");
653  }
654  default:
655  LOG(VB_CHANSCAN, LOG_ERR, LOC +
656  QString("Unknown delivery system descriptor 0x%1").arg(tag,0,16));
657  return false;
658  }
659 
660  LOG(VB_CHANSCAN, LOG_ERR, LOC +
661  QString("Tuner type %1 does not match delivery system")
662  .arg(type.toString()));
663  return false;
664 }
665 
666 
669 
671 {
672  if (!DTVMultiplex::FillFromDB(type, mplexid))
673  return false;
674 
675  MSqlQuery query(MSqlQuery::InitCon());
676  query.prepare(
677  "SELECT c.mplexid, c.sourceid, c.chanid, "
678  " c.callsign, c.name, c.channum, "
679  " c.serviceid, c.atsc_major_chan, c.atsc_minor_chan, "
680  " c.useonairguide, c.visible, c.freqid, "
681  " c.icon, c.tvformat, c.xmltvid, "
682  " d.transportid, d.networkid, c.default_authority,"
683  " c.service_type "
684  "FROM channel AS c, dtv_multiplex AS d "
685  "WHERE c.deleted IS NULL AND "
686  " c.mplexid = :MPLEXID AND"
687  " c.mplexid = d.mplexid");
688  query.bindValue(":MPLEXID", mplexid);
689 
690  if (!query.exec())
691  {
692  MythDB::DBError("ScanDTVTransport::FillFromDB", query);
693  return false;
694  }
695 
696  while (query.next())
697  {
698  ChannelInsertInfo chan(
699  query.value(0).toUInt(), query.value(1).toUInt(),
700  query.value(2).toUInt(), query.value(3).toString(),
701  query.value(4).toString(), query.value(5).toString(),
702  query.value(6).toUInt(),
703  query.value(7).toUInt(), query.value(8).toUInt(),
704  query.value(9).toBool(), !query.value(10).toBool(),
705  false,
706  query.value(11).toString(), query.value(12).toString(),
707  query.value(13).toString(), query.value(14).toString(),
708  0, 0, 0,
709  query.value(15).toUInt(), query.value(16).toUInt(),
710  0,
711  QString(),
712  false, false, false, false,
713  false, false, false, false,
714  false, false, false, 0,
715  query.value(17).toString(), /* default_authority */
716  query.value(18).toUInt()); /* service_type */
717 
718  m_channels.push_back(chan);
719  }
720 
721  return true;
722 }
723 
725 {
726  uint transportid = 0;
727 
728  MSqlQuery query(MSqlQuery::InitCon());
729  query.prepare(
730  "INSERT INTO channelscan_dtv_multiplex "
731  " ( scanid, "
732  " mplexid, frequency, inversion, "
733  " symbolrate, fec, polarity, "
734  " hp_code_rate, lp_code_rate, modulation, "
735  " transmission_mode, guard_interval, hierarchy, "
736  " mod_sys, rolloff, bandwidth, "
737  " sistandard, tuner_type, signal_strength "
738  " ) "
739  "VALUES "
740  " ( :SCANID, "
741  " :MPLEXID, :FREQUENCY, :INVERSION, "
742  " :SYMBOLRATE, :FEC, :POLARITY, "
743  " :HP_CODE_RATE, :LP_CODE_RATE, :MODULATION, "
744  " :TRANSMISSION_MODE, :GUARD_INTERVAL, :HIERARCHY, "
745  " :MOD_SYS, :ROLLOFF, :BANDWIDTH, "
746  " :SISTANDARD, :TUNER_TYPE, :SIGNAL_STRENGTH "
747  " );");
748 
749  query.bindValue(":SCANID", scanid);
750  query.bindValue(":MPLEXID", m_mplex);
751  query.bindValue(":FREQUENCY", QString::number(m_frequency));
752  query.bindValue(":INVERSION", m_inversion.toString());
753  query.bindValue(":SYMBOLRATE", QString::number(m_symbolRate));
754  query.bindValue(":FEC", m_fec.toString());
755  query.bindValue(":POLARITY", m_polarity.toString());
756  query.bindValue(":HP_CODE_RATE", m_hpCodeRate.toString());
757  query.bindValue(":LP_CODE_RATE", m_lpCodeRate.toString());
758  query.bindValue(":MODULATION", m_modulation.toString());
759  query.bindValue(":TRANSMISSION_MODE", m_transMode.toString());
760  query.bindValue(":GUARD_INTERVAL", m_guardInterval.toString());
761  query.bindValue(":HIERARCHY", m_hierarchy.toString());
762  query.bindValue(":MOD_SYS", m_modSys.toString());
763  query.bindValue(":ROLLOFF", m_rolloff.toString());
764  query.bindValue(":BANDWIDTH", m_bandwidth.toString());
765  query.bindValue(":SISTANDARD", m_sistandard);
766  query.bindValue(":TUNER_TYPE", m_tunerType.toUInt());
767  query.bindValue(":SIGNAL_STRENGTH", m_signalStrength);
768 
769  if (!query.exec())
770  {
771  MythDB::DBError("ScanDTVTransport::SaveScan 1", query);
772  return transportid;
773  }
774 
775  query.prepare("SELECT MAX(transportid) FROM channelscan_dtv_multiplex");
776  if (!query.exec())
777  MythDB::DBError("ScanDTVTransport::SaveScan 2", query);
778  else if (query.next())
779  transportid = query.value(0).toUInt();
780 
781  if (!transportid)
782  return transportid;
783 
784  for (const auto & channel : m_channels)
785  channel.SaveScan(scanid, transportid);
786 
787  return transportid;
788 }
789 
792  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
793  const QString& _fec, const QString& _polarity,
794  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
795  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
796  const QString& _modulation, const QString& _bandwidth, const QString& _mod_sys,
797  const QString& _rolloff, const QString& signal_strength)
798 {
799  m_tunerType = type;
800  m_signalStrength = signal_strength.toInt();
801 
803  type,
804  _frequency, _inversion, _symbolrate,
805  _fec, _polarity,
806  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
807  _trans_mode, _guard_interval, _hierarchy,
808  _modulation, _bandwidth, _mod_sys,
809  _rolloff);
810 }
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:806
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
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:572
DTVHierarchy::toString
QString toString() const
Definition: dtvconfparserhelpers.h:593
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:202
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:607
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:790
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:262
dtvmultiplex.h
DTVMultiplex::FillFromDB
virtual bool FillFromDB(DTVTunerType type, uint mplexid)
Definition: dtvmultiplex.cpp:524
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:339
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:539
SatelliteDeliverySystemDescriptor::RollOffString
QString RollOffString(void) const
Definition: dvbdescriptors.h:872
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:227
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:670
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:144
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:413
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:882
ScanDTVTransport::SaveScan
uint SaveScan(uint scanid) const
Definition: dtvmultiplex.cpp:724
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:368
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:463
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:328
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:831
DTVModulationSystem::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:716
DTVMultiplex::m_lpCodeRate
DTVCodeRate m_lpCodeRate
Definition: dtvmultiplex.h:99