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  // Accept 0 for DVB-T
429  if (_mod_sys == "0")
430  {
432  LOG(VB_GENERAL, LOG_WARNING, LOC + "Deprecated DVB-T modulation system " +
433  QString("parameter '%1', using %2.").arg(_mod_sys, m_modSys.toString()));
434  }
435 
436  // Accept 1 for DVB-T2
437  if (_mod_sys == "1")
438  {
440  LOG(VB_GENERAL, LOG_WARNING, LOC + "Deprecated DVB-T2 modulation system " +
441  QString("parameter '%1', using %2.").arg(_mod_sys, m_modSys.toString()));
442  }
443 
444  // We have a DVB-T2 tuner, change undefined modulation system to DVB-T2
446  {
448  LOG(VB_GENERAL, LOG_WARNING, LOC + "Undefined modulation system, " +
449  QString("using %1.").arg(m_modSys.toString()));
450  }
451 
452  // Only DVB-T and DVB-T2 can be used with a DVB-T2 tuner.
455  {
456  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-T2 modulation system " +
457  QString("%1, aborting.").arg(m_modSys.toString()));
458  return false;
459  }
460 
461  return ok;
462 }
463 
466  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
467  const QString& _fec, const QString& _polarity,
468  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
469  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
470  const QString& _modulation, const QString& _bandwidth,
471  const QString& _mod_sys, const QString& _rolloff)
472 {
474  {
475  return ParseDVB_T(
476  _frequency, _inversion, _bandwidth,
477  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
478  _trans_mode, _guard_interval, _hierarchy);
479  }
480 
482  {
483  return ParseDVB_C(
484  _frequency, _inversion, _symbolrate,
485  _fec, _modulation, _polarity,
486  _mod_sys);
487  }
488 
490  {
491  return ParseDVB_S(
492  _frequency, _inversion, _symbolrate,
493  _fec, _modulation, _polarity);
494  }
495 
497  {
498  return ParseDVB_S2(
499  _frequency, _inversion, _symbolrate,
500  _fec, _modulation, _polarity,
501  _mod_sys, _rolloff);
502  }
503 
505  {
506  return ParseDVB_T2(
507  _frequency, _inversion, _bandwidth,
508  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
509  _trans_mode, _guard_interval, _hierarchy,
510  _mod_sys);
511  }
512 
514  {
515  return ParseATSC(_frequency, _modulation);
516  }
517 
518  LOG(VB_GENERAL, LOG_ERR, LOC +
519  QString("ParseTuningParams -- Unknown tuner type = 0x%1")
520  .arg(type,0,16,QChar('0')));
521 
522  return false;
523 }
524 
526 {
527  Clear();
528 
529  MSqlQuery query(MSqlQuery::InitCon());
530  query.prepare(
531  "SELECT frequency, inversion, symbolrate, "
532  " fec, polarity, "
533  " hp_code_rate, lp_code_rate, constellation, "
534  " transmission_mode, guard_interval, hierarchy, "
535  " modulation, bandwidth, sistandard, "
536  " mod_sys, rolloff "
537  "FROM dtv_multiplex "
538  "WHERE dtv_multiplex.mplexid = :MPLEXID");
539  query.bindValue(":MPLEXID", mplexid);
540 
541  if (!query.exec())
542  {
543  MythDB::DBError("DVBTuning::FillFromDB", query);
544  return false;
545  }
546 
547  if (!query.next())
548  {
549  LOG(VB_GENERAL, LOG_ERR, LOC +
550  QString("Could not find tuning parameters for mplex %1")
551  .arg(mplexid));
552 
553  return false;
554  }
555 
556  m_mplex = mplexid;
557  m_sistandard = query.value(13).toString();
558 
559  // Parse the query into our DVBTuning class
560  return ParseTuningParams(
561  type,
562  query.value(0).toString(), query.value(1).toString(),
563  query.value(2).toString(), query.value(3).toString(),
564  query.value(4).toString(), query.value(5).toString(),
565  query.value(6).toString(), query.value(7).toString(),
566  query.value(8).toString(), query.value(9).toString(),
567  query.value(10).toString(), query.value(11).toString(),
568  query.value(12).toString(), query.value(14).toString(),
569  query.value(15).toString());
570 }
571 
572 
574  const MPEGDescriptor &desc)
575 {
576  uint tag = desc.DescriptorTag();
577  m_sistandard = "dvb";
578 
579  switch (tag)
580  {
582  {
584 
586  {
587  return ParseDVB_T(
588  QString::number(cd.FrequencyHz()), "a",
592  cd.HierarchyString());
593  }
594 
596  {
597  return ParseDVB_T2(
598  QString::number(cd.FrequencyHz()), "a",
602  cd.HierarchyString(), "DVB-T");
603  }
604 
605  break;
606  }
608  {
609  const SatelliteDeliverySystemDescriptor cd(desc);
610 
612  {
613  if (cd.ModulationSystem())
614  {
615  LOG(VB_CHANSCAN, LOG_NOTICE, LOC +
616  "Ignoring DVB-S2 transponder with DVB-S card");
617  return false;
618  }
619 
620  return ParseDVB_S(
621  QString::number(cd.FrequencykHz()), "a",
622  QString::number(cd.SymbolRateHz()),
623  cd.FECInnerString(),
624  cd.ModulationString(),
625  cd.PolarizationString());
626  }
627 
629  {
630  return ParseDVB_S2(
631  QString::number(cd.FrequencykHz()), "a",
632  QString::number(cd.SymbolRateHz()),
633  cd.FECInnerString(),
634  cd.ModulationString(),
635  cd.PolarizationString(),
637  cd.RollOffString());
638  }
639 
640  break;
641  }
643  {
645  break;
646 
647  const CableDeliverySystemDescriptor cd(desc);
648 
649  return ParseDVB_C(
650  QString::number(cd.FrequencyHz()), "a",
651  QString::number(cd.SymbolRateHz()), cd.FECInnerString(),
652  cd.ModulationString(), QString(),
653  "DVB-C/A");
654  }
655  default:
656  LOG(VB_CHANSCAN, LOG_ERR, LOC +
657  QString("Unknown delivery system descriptor 0x%1").arg(tag,0,16));
658  return false;
659  }
660 
661  LOG(VB_CHANSCAN, LOG_ERR, LOC +
662  QString("Tuner type %1 does not match delivery system")
663  .arg(type.toString()));
664  return false;
665 }
666 
667 
670 
672 {
673  if (!DTVMultiplex::FillFromDB(type, mplexid))
674  return false;
675 
676  MSqlQuery query(MSqlQuery::InitCon());
677  query.prepare(
678  "SELECT c.mplexid, c.sourceid, c.chanid, "
679  " c.callsign, c.name, c.channum, "
680  " c.serviceid, c.atsc_major_chan, c.atsc_minor_chan, "
681  " c.useonairguide, c.visible, c.freqid, "
682  " c.icon, c.tvformat, c.xmltvid, "
683  " d.transportid, d.networkid, c.default_authority,"
684  " c.service_type "
685  "FROM channel AS c, dtv_multiplex AS d "
686  "WHERE c.deleted IS NULL AND "
687  " c.mplexid = :MPLEXID AND"
688  " c.mplexid = d.mplexid");
689  query.bindValue(":MPLEXID", mplexid);
690 
691  if (!query.exec())
692  {
693  MythDB::DBError("ScanDTVTransport::FillFromDB", query);
694  return false;
695  }
696 
697  while (query.next())
698  {
699  ChannelInsertInfo chan(
700  query.value(0).toUInt(), query.value(1).toUInt(),
701  query.value(2).toUInt(), query.value(3).toString(),
702  query.value(4).toString(), query.value(5).toString(),
703  query.value(6).toUInt(),
704  query.value(7).toUInt(), query.value(8).toUInt(),
705  query.value(9).toBool(), !query.value(10).toBool(),
706  false,
707  query.value(11).toString(), query.value(12).toString(),
708  query.value(13).toString(), query.value(14).toString(),
709  0, 0, 0,
710  query.value(15).toUInt(), query.value(16).toUInt(),
711  0,
712  QString(),
713  false, false, false, false,
714  false, false, false, false,
715  false, false, false, 0,
716  query.value(17).toString(), /* default_authority */
717  query.value(18).toUInt()); /* service_type */
718 
719  m_channels.push_back(chan);
720  }
721 
722  return true;
723 }
724 
726 {
727  uint transportid = 0;
728 
729  MSqlQuery query(MSqlQuery::InitCon());
730  query.prepare(
731  "INSERT INTO channelscan_dtv_multiplex "
732  " ( scanid, "
733  " mplexid, frequency, inversion, "
734  " symbolrate, fec, polarity, "
735  " hp_code_rate, lp_code_rate, modulation, "
736  " transmission_mode, guard_interval, hierarchy, "
737  " mod_sys, rolloff, bandwidth, "
738  " sistandard, tuner_type, signal_strength "
739  " ) "
740  "VALUES "
741  " ( :SCANID, "
742  " :MPLEXID, :FREQUENCY, :INVERSION, "
743  " :SYMBOLRATE, :FEC, :POLARITY, "
744  " :HP_CODE_RATE, :LP_CODE_RATE, :MODULATION, "
745  " :TRANSMISSION_MODE, :GUARD_INTERVAL, :HIERARCHY, "
746  " :MOD_SYS, :ROLLOFF, :BANDWIDTH, "
747  " :SISTANDARD, :TUNER_TYPE, :SIGNAL_STRENGTH "
748  " );");
749 
750  query.bindValue(":SCANID", scanid);
751  query.bindValue(":MPLEXID", m_mplex);
752  query.bindValue(":FREQUENCY", QString::number(m_frequency));
753  query.bindValue(":INVERSION", m_inversion.toString());
754  query.bindValue(":SYMBOLRATE", QString::number(m_symbolRate));
755  query.bindValue(":FEC", m_fec.toString());
756  query.bindValue(":POLARITY", m_polarity.toString());
757  query.bindValue(":HP_CODE_RATE", m_hpCodeRate.toString());
758  query.bindValue(":LP_CODE_RATE", m_lpCodeRate.toString());
759  query.bindValue(":MODULATION", m_modulation.toString());
760  query.bindValue(":TRANSMISSION_MODE", m_transMode.toString());
761  query.bindValue(":GUARD_INTERVAL", m_guardInterval.toString());
762  query.bindValue(":HIERARCHY", m_hierarchy.toString());
763  query.bindValue(":MOD_SYS", m_modSys.toString());
764  query.bindValue(":ROLLOFF", m_rolloff.toString());
765  query.bindValue(":BANDWIDTH", m_bandwidth.toString());
766  query.bindValue(":SISTANDARD", m_sistandard);
767  query.bindValue(":TUNER_TYPE", m_tunerType.toUInt());
768  query.bindValue(":SIGNAL_STRENGTH", m_signalStrength);
769 
770  if (!query.exec())
771  {
772  MythDB::DBError("ScanDTVTransport::SaveScan 1", query);
773  return transportid;
774  }
775 
776  query.prepare("SELECT MAX(transportid) FROM channelscan_dtv_multiplex");
777  if (!query.exec())
778  MythDB::DBError("ScanDTVTransport::SaveScan 2", query);
779  else if (query.next())
780  transportid = query.value(0).toUInt();
781 
782  if (!transportid)
783  return transportid;
784 
785  for (const auto & channel : m_channels)
786  channel.SaveScan(scanid, transportid);
787 
788  return transportid;
789 }
790 
793  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
794  const QString& _fec, const QString& _polarity,
795  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
796  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
797  const QString& _modulation, const QString& _bandwidth, const QString& _mod_sys,
798  const QString& _rolloff, const QString& signal_strength)
799 {
800  m_tunerType = type;
801  m_signalStrength = signal_strength.toInt();
802 
804  type,
805  _frequency, _inversion, _symbolrate,
806  _fec, _polarity,
807  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
808  _trans_mode, _guard_interval, _hierarchy,
809  _modulation, _bandwidth, _mod_sys,
810  _rolloff);
811 }
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:807
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:128
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:573
DTVHierarchy::toString
QString toString() const
Definition: dtvconfparserhelpers.h:593
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:205
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:608
DTVMultiplex::operator==
bool operator==(const DTVMultiplex &m) const
Definition: dtvmultiplex.cpp:13
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:791
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:525
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:340
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:166
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:540
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:671
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: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:79
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
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:883
ScanDTVTransport::SaveScan
uint SaveScan(uint scanid) const
Definition: dtvmultiplex.cpp:725
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:943
DTVMultiplex::ParseATSC
bool ParseATSC(const QString &frequency, const QString &modulation)
Definition: dtvmultiplex.cpp:145
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:464
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: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
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: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: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:832
DTVModulationSystem::Parse
bool Parse(const QString &_value)
Definition: dtvconfparserhelpers.h:716
DTVMultiplex::m_lpCodeRate
DTVCodeRate m_lpCodeRate
Definition: dtvmultiplex.h:99