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 <utility>
8 
9 #define LOC QString("DTVMux: ")
10 
12 {
13  return ((m_frequency == m.m_frequency) &&
14  (m_modulation == m.m_modulation) &&
15  (m_inversion == m.m_inversion) &&
16  (m_bandwidth == m.m_bandwidth) &&
19  (m_trans_mode == m.m_trans_mode) &&
21  (m_fec == m.m_fec) &&
22  (m_mod_sys == m.m_mod_sys) &&
23  (m_rolloff == m.m_rolloff) &&
24  (m_polarity == m.m_polarity) &&
25  (m_hierarchy == m.m_hierarchy) &&
27  );
28 }
29 
31 // Gets
32 
33 QString DTVMultiplex::toString() const
34 {
35  QString ret = QString("%1 %2 %3 ")
37 
38  ret += QString("%1 %2 %3 %4 %5 %6 %7")
42  .arg(m_polarity.toString());
43  ret += QString(" fec: %1 msys: %2 rolloff: %3")
44  .arg(m_fec.toString()).arg(m_mod_sys.toString()).arg(m_rolloff.toString());
45 
46  return ret;
47 }
48 
50  uint freq_range, bool fuzzy) const
51 {
52  if ((m_frequency + freq_range < other.m_frequency ) ||
53  (m_frequency > other.m_frequency + freq_range))
54  {
55  return false;
56  }
57 
59  {
60  if (fuzzy)
61  return
63  (m_symbolrate == other.m_symbolrate) &&
64  m_fec.IsCompatible(other.m_fec) &&
66  return
67  (m_inversion == other.m_inversion) &&
68  (m_symbolrate == other.m_symbolrate) &&
69  (m_fec == other.m_fec) &&
70  (m_modulation == other.m_modulation);
71  }
72 
75  {
76  if (fuzzy)
77  return
87  return
88  (m_inversion == other.m_inversion) &&
89  (m_bandwidth == other.m_bandwidth) &&
90  (m_hp_code_rate == other.m_hp_code_rate) &&
91  (m_lp_code_rate == other.m_lp_code_rate) &&
92  (m_modulation == other.m_modulation) &&
94  (m_trans_mode == other.m_trans_mode) &&
95  (m_hierarchy == other.m_hierarchy) &&
96  (m_mod_sys == other.m_mod_sys);
97  }
98 
100  {
101  if (fuzzy)
102  return m_modulation.IsCompatible(other.m_modulation);
103  return (m_modulation == other.m_modulation);
104  }
105 
108  {
109  bool ret =
110  (m_symbolrate == other.m_symbolrate) &&
111  (m_polarity == other.m_polarity) &&
112  (m_mod_sys == other.m_mod_sys);
113 
114  if (fuzzy)
115  return ret &&
117  m_fec.IsCompatible(other.m_fec) &&
119  return ret &&
120  (m_inversion == other.m_inversion) &&
121  (m_fec == other.m_fec) &&
122  (m_rolloff == other.m_rolloff);
123  }
124 
126  {
127  return (m_iptv_tuning == other.m_iptv_tuning);
128  }
129 
130  return false;
131 }
132 
134 // Parsers
135 
136 bool DTVMultiplex::ParseATSC(const QString &_frequency,
137  const QString &_modulation)
138 {
139  bool ok = true;
140  m_frequency = _frequency.toULongLong(&ok);
141  if (!ok)
142  {
143  LOG(VB_GENERAL, LOG_ERR, LOC +
144  QString("Failed to parse ATSC frequency %1").arg(_frequency));
145  return false;
146  }
147 
148  ok = m_modulation.Parse(_modulation);
149  if (!ok)
150  {
151  LOG(VB_GENERAL, LOG_ERR, LOC +
152  QString("Failed to parse ATSC modulation %1").arg(_modulation));
153  }
154  return ok;
155 }
156 
158  const QString &_frequency, const QString &_inversion,
159  const QString &_bandwidth, const QString &_coderate_hp,
160  const QString &_coderate_lp, const QString &_modulation,
161  const QString &_trans_mode, const QString &_guard_interval,
162  const QString &_hierarchy)
163 {
164  bool ok = m_inversion.Parse(_inversion);
165  if (!ok)
166  {
167  LOG(VB_GENERAL, LOG_WARNING, LOC +
168  QString("Invalid inversion parameter '%1', falling back to 'auto'.")
169  .arg(_inversion));
170  ok = true;
171  }
172 
173  ok &= m_mod_sys.Parse("DVB-T");
174  ok &= m_bandwidth.Parse(_bandwidth);
175  ok &= m_hp_code_rate.Parse(_coderate_hp);
176  ok &= m_lp_code_rate.Parse(_coderate_lp);
177  ok &= m_modulation.Parse(_modulation);
178  ok &= m_trans_mode.Parse(_trans_mode);
179  ok &= m_hierarchy.Parse(_hierarchy);
180  ok &= m_guard_interval.Parse(_guard_interval);
181  if (ok)
182  m_frequency = _frequency.toInt(&ok);
183 
184  return ok;
185 }
186 
188  const QString &_frequency, const QString &_inversion,
189  const QString &_symbol_rate, const QString &_fec_inner,
190  const QString &_modulation, const QString &_polarity)
191 {
192  bool ok = m_inversion.Parse(_inversion);
193  if (!ok)
194  {
195  LOG(VB_GENERAL, LOG_WARNING, LOC +
196  QString("Invalid inversion parameter '%1', falling back to 'auto'.")
197  .arg(_inversion));
198 
199  ok = true;
200  }
201 
202  m_symbolrate = _symbol_rate.toInt();
203  if (!m_symbolrate)
204  {
205  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid symbol rate " +
206  QString("parameter '%1', aborting.").arg(_symbol_rate));
207 
208  return false;
209  }
210 
211  ok &= m_fec.Parse(_fec_inner);
212  ok &= m_modulation.Parse(_modulation);
213 
214  if (!_polarity.isEmpty())
215  m_polarity.Parse(_polarity.toLower());
216 
217  if (ok)
218  m_frequency = _frequency.toInt(&ok);
219 
220  return ok;
221 }
222 
224  const QString &_frequency, const QString &_inversion,
225  const QString &_symbol_rate, const QString &_fec_inner,
226  const QString &_modulation, const QString &_polarity)
227 {
228  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
229  _fec_inner, _modulation, _polarity);
231  return ok;
232 }
233 
235  const QString &_frequency, const QString &_inversion,
236  const QString &_symbol_rate, const QString &_fec_inner,
237  const QString &_modulation, const QString &_polarity,
238  const QString &_mod_sys)
239 {
240  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
241  _fec_inner, _modulation, _polarity);
242 
243  m_mod_sys.Parse(_mod_sys);
245  {
247  }
248 
249  LOG(VB_GENERAL, LOG_DEBUG, LOC +
250  QString("%1 ").arg(__FUNCTION__) +
251  QString("_mod_sys:%1 ok:%2 ").arg(_mod_sys).arg(ok) +
252  QString("m_mod_sys:%1 %2 ").arg(m_mod_sys).arg(m_mod_sys.toString()));
253 
257  {
258  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-C modulation system " +
259  QString("parameter '%1', aborting.").arg(_mod_sys));
260  return false;
261  }
262 
263  return ok;
264 }
265 
267  const QString &_frequency, const QString &_inversion,
268  const QString &_symbol_rate, const QString &_fec_inner,
269  const QString &_modulation, const QString &_polarity,
270  const QString &_mod_sys, const QString &_rolloff)
271 {
272  bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate,
273  _fec_inner, _modulation, _polarity);
274 
275  if (!m_mod_sys.Parse(_mod_sys))
276  {
277  LOG(VB_GENERAL, LOG_ERR, LOC + "Invalid DVB-S2 modulation system " +
278  QString("parameter '%1', aborting.").arg(_mod_sys));
279  return false;
280  }
281 
282  // For #10153, guess at modulation system based on modulation
284  {
288  }
289 
292  {
293  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-S2 modulation system " +
294  QString("parameter '%1', aborting.").arg(_mod_sys));
295  return false;
296  }
297 
298  if (!_rolloff.isEmpty())
299  ok &= m_rolloff.Parse(_rolloff);
300 
301  return ok;
302 }
303 
305  const QString &_frequency, const QString &_inversion,
306  const QString &_bandwidth, const QString &_coderate_hp,
307  const QString &_coderate_lp, const QString &_modulation,
308  const QString &_trans_mode, const QString &_guard_interval,
309  const QString &_hierarchy, const QString &_mod_sys)
310 {
311  bool ok = ParseDVB_T(_frequency, _inversion, _bandwidth,
312  _coderate_hp, _coderate_lp, _modulation,
313  _trans_mode, _guard_interval, _hierarchy);
314 
315  QString l_mod_sys = _mod_sys;
316 
317  // Accept "0" for "DVB-T" and "1" for "DVB-T2"
318  if (_mod_sys == "1")
319  {
320  LOG(VB_GENERAL, LOG_WARNING, LOC + "Invalid DVB-T2 modulation system " +
321  QString("parameter '%1', using DVB-T2.").arg(_mod_sys));
323  l_mod_sys = m_mod_sys.toString();
324  }
325  else if (_mod_sys == "0")
326  {
327  LOG(VB_GENERAL, LOG_WARNING, LOC + "Invalid DVB-T modulation system " +
328  QString("parameter '%1', using DVB-T.").arg(_mod_sys));
330  l_mod_sys = m_mod_sys.toString();
331  }
332 
333  if (!m_mod_sys.Parse(l_mod_sys))
334  {
335  LOG(VB_GENERAL, LOG_WARNING, LOC + "Invalid DVB-T/T2 modulation system " +
336  QString("parameter '%1', aborting.").arg(l_mod_sys));
337  return false;
338  }
339 
341  {
343  }
344 
347  {
348  LOG(VB_GENERAL, LOG_ERR, LOC + "Unsupported DVB-T2 modulation system " +
349  QString("parameter '%1', aborting.").arg(l_mod_sys));
350  return false;
351  }
352 
353  return ok;
354 }
355 
358  const QString& _frequency, const QString& _inversion, const QString& _symbolrate,
359  const QString& _fec, const QString& _polarity,
360  const QString& _hp_code_rate, const QString& _lp_code_rate, const QString& _ofdm_modulation,
361  const QString& _trans_mode, const QString& _guard_interval, const QString& _hierarchy,
362  const QString& _modulation, const QString& _bandwidth,
363  const QString& _mod_sys, const QString& _rolloff)
364 {
366  {
367  return ParseDVB_T(
368  _frequency, _inversion, _bandwidth,
369  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
370  _trans_mode, _guard_interval, _hierarchy);
371  }
372 
374  {
375  return ParseDVB_C(
376  _frequency, _inversion, _symbolrate,
377  _fec, _modulation, _polarity,
378  _mod_sys);
379  }
380 
382  {
383  return ParseDVB_S(
384  _frequency, _inversion, _symbolrate,
385  _fec, _modulation, _polarity);
386  }
387 
389  {
390  return ParseDVB_S2(
391  _frequency, _inversion, _symbolrate,
392  _fec, _modulation, _polarity,
393  _mod_sys, _rolloff);
394  }
395 
397  {
398  return ParseDVB_T2(
399  _frequency, _inversion, _bandwidth,
400  _hp_code_rate, _lp_code_rate, _ofdm_modulation,
401  _trans_mode, _guard_interval, _hierarchy,
402  _mod_sys);
403  }
404 
406  {
407  return ParseATSC(_frequency, _modulation);
408  }
409 
410  LOG(VB_GENERAL, LOG_ERR, LOC +
411  QString("ParseTuningParams -- Unknown tuner type = 0x%1")
412  .arg(type,0,16,QChar('0')));
413 
414  return false;
415 }
416 
418 {
419  Clear();
420 
421  MSqlQuery query(MSqlQuery::InitCon());
422  query.prepare(
423  "SELECT frequency, inversion, symbolrate, "
424  " fec, polarity, "
425  " hp_code_rate, lp_code_rate, constellation, "
426  " transmission_mode, guard_interval, hierarchy, "
427  " modulation, bandwidth, sistandard, "
428  " mod_sys, rolloff "
429  "FROM dtv_multiplex "
430  "WHERE dtv_multiplex.mplexid = :MPLEXID");
431  query.bindValue(":MPLEXID", mplexid);
432 
433  if (!query.exec())
434  {
435  MythDB::DBError("DVBTuning::FillFromDB", query);
436  return false;
437  }
438 
439  if (!query.next())
440  {
441  LOG(VB_GENERAL, LOG_ERR, LOC +
442  QString("Could not find tuning parameters for mplex %1")
443  .arg(mplexid));
444 
445  return false;
446  }
447 
448  m_mplex = mplexid;
449  m_sistandard = query.value(13).toString();
450 
451  // Parse the query into our DVBTuning class
452  return ParseTuningParams(
453  type,
454  query.value(0).toString(), query.value(1).toString(),
455  query.value(2).toString(), query.value(3).toString(),
456  query.value(4).toString(), query.value(5).toString(),
457  query.value(6).toString(), query.value(7).toString(),
458  query.value(8).toString(), query.value(9).toString(),
459  query.value(10).toString(), query.value(11).toString(),
460  query.value(12).toString(), query.value(14).toString(),
461  query.value(15).toString());
462 }
463 
464 
466  const MPEGDescriptor &desc)
467 {
468  uint tag = desc.DescriptorTag();
469  m_sistandard = "dvb";
470 
471  switch (tag)
472  {
474  {
476 
478  {
479  return ParseDVB_T(
480  QString::number(cd.FrequencyHz()), "a",
484  cd.HierarchyString());
485  }
486 
488  {
489  return ParseDVB_T2(
490  QString::number(cd.FrequencyHz()), "a",
494  cd.HierarchyString(), "DVB-T");
495  }
496 
497  break;
498  }
500  {
501  const SatelliteDeliverySystemDescriptor cd(desc);
502 
504  {
505  if (cd.ModulationSystem())
506  {
507  LOG(VB_CHANSCAN, LOG_NOTICE, LOC +
508  "Ignoring DVB-S2 transponder with DVB-S card");
509  return false;
510  }
511 
512  return ParseDVB_S_and_C(
513  QString::number(cd.FrequencyHz()), "a",
514  QString::number(cd.SymbolRateHz()), cd.FECInnerString(),
515  cd.ModulationString(),
516  cd.PolarizationString());
517  }
518 
520  {
521  return ParseDVB_S2(
522  QString::number(cd.FrequencyHz()), "a",
523  QString::number(cd.SymbolRateHz()), cd.FECInnerString(),
524  cd.ModulationString(),
525  cd.PolarizationString(),
527  }
528 
529  break;
530  }
532  {
534  break;
535 
536  const CableDeliverySystemDescriptor cd(desc);
537 
538  return ParseDVB_C(
539  QString::number(cd.FrequencyHz()), "a",
540  QString::number(cd.SymbolRateHz()), cd.FECInnerString(),
541  cd.ModulationString(), QString(),
542  "DVB-C/A");
543  }
544  default:
545  LOG(VB_CHANSCAN, LOG_ERR, LOC +
546  "unknown delivery system descriptor");
547  return false;
548  }
549 
550  LOG(VB_CHANSCAN, LOG_ERR, LOC +
551  QString("Tuner type %1 does not match delivery system")
552  .arg(type.toString()));
553  return false;
554 }
555 
556 
559 
561 {
562  if (!DTVMultiplex::FillFromDB(type, mplexid))
563  return false;
564 
565  MSqlQuery query(MSqlQuery::InitCon());
566  query.prepare(
567  "SELECT c.mplexid, c.sourceid, c.chanid, "
568  " c.callsign, c.name, c.channum, "
569  " c.serviceid, c.atsc_major_chan, c.atsc_minor_chan, "
570  " c.useonairguide, c.visible, c.freqid, "
571  " c.icon, c.tvformat, c.xmltvid, "
572  " d.transportid, d.networkid, c.default_authority "
573  "FROM channel AS c, dtv_multiplex AS d "
574  "WHERE c.mplexid = :MPLEXID AND"
575  " c.mplexid = d.mplexid");
576  query.bindValue(":MPLEXID", mplexid);
577 
578  if (!query.exec())
579  {
580  MythDB::DBError("ScanDTVTransport::FillFromDB", query);
581  return false;
582  }
583 
584  while (query.next())
585  {
586  ChannelInsertInfo chan(
587  query.value(0).toUInt(), query.value(1).toUInt(),
588  query.value(2).toUInt(), query.value(3).toString(),
589  query.value(4).toString(), query.value(5).toString(),
590  query.value(6).toUInt(),
591  query.value(7).toUInt(), query.value(8).toUInt(),
592  query.value(9).toBool(), !query.value(10).toBool(),
593  false,
594  query.value(11).toString(), query.value(12).toString(),
595  query.value(13).toString(), query.value(14).toString(),
596  0, 0, 0,
597  query.value(15).toUInt(), query.value(16).toUInt(),
598  0,
599  QString(),
600  false, false, false, false,
601  false, false, false, false,
602  false, false, false, 0,
603  query.value(17).toString() /* default_authority */);
604 
605  m_channels.push_back(chan);
606  }
607 
608  return true;
609 }
610 
612 {
613  uint transportid = 0;
614 
615  MSqlQuery query(MSqlQuery::InitCon());
616  query.prepare(
617  "INSERT INTO channelscan_dtv_multiplex "
618  " ( scanid, "
619  " mplexid, frequency, inversion, "
620  " symbolrate, fec, polarity, "
621  " hp_code_rate, lp_code_rate, modulation, "
622  " transmission_mode, guard_interval, hierarchy, "
623  " mod_sys, rolloff, "
624  " bandwidth, sistandard, tuner_type "
625  " ) "
626  "VALUES "
627  " ( :SCANID, "
628  " :MPLEXID, :FREQUENCY, :INVERSION, "
629  " :SYMBOLRATE, :FEC, :POLARITY, "
630  " :HP_CODE_RATE, :LP_CODE_RATE, :MODULATION, "
631  " :TRANSMISSION_MODE, :GUARD_INTERVAL, :HIERARCHY, "
632  " :MOD_SYS, :ROLLOFF, "
633  " :BANDWIDTH, :SISTANDARD, :TUNER_TYPE "
634  " );");
635 
636  query.bindValue(":SCANID", scanid);
637  query.bindValue(":MPLEXID", m_mplex);
638  query.bindValue(":FREQUENCY", QString::number(m_frequency));
639  query.bindValue(":INVERSION", m_inversion.toString());
640  query.bindValue(":SYMBOLRATE", QString::number(m_symbolrate));
641  query.bindValue(":FEC", m_fec.toString());
642  query.bindValue(":POLARITY", m_polarity.toString());
643  query.bindValue(":HP_CODE_RATE", m_hp_code_rate.toString());
644  query.bindValue(":LP_CODE_RATE", m_lp_code_rate.toString());
645  query.bindValue(":MODULATION", m_modulation.toString());
646  query.bindValue(":TRANSMISSION_MODE", m_trans_mode.toString());
647  query.bindValue(":GUARD_INTERVAL", m_guard_interval.toString());
648  query.bindValue(":HIERARCHY", m_hierarchy.toString());
649  query.bindValue(":MOD_SYS", m_mod_sys.toString());
650  query.bindValue(":ROLLOFF", m_rolloff.toString());
651  query.bindValue(":BANDWIDTH", m_bandwidth.toString());
652  query.bindValue(":SISTANDARD", m_sistandard);
653  query.bindValue(":TUNER_TYPE", (uint)m_tuner_type);
654 
655  if (!query.exec())
656  {
657  MythDB::DBError("ScanDTVTransport::SaveScan 1", query);
658  return transportid;
659  }
660 
661  query.prepare("SELECT MAX(transportid) FROM channelscan_dtv_multiplex");
662  if (!query.exec())
663  MythDB::DBError("ScanDTVTransport::SaveScan 2", query);
664  else if (query.next())
665  transportid = query.value(0).toUInt();
666 
667  if (!transportid)
668  return transportid;
669 
670  for (size_t i = 0; i < m_channels.size(); i++)
671  m_channels[i].SaveScan(scanid, transportid);
672 
673  return transportid;
674 }
675 
678  QString _frequency, QString _inversion, QString _symbolrate,
679  QString _fec, QString _polarity,
680  QString _hp_code_rate, QString _lp_code_rate, QString _ofdm_modulation,
681  QString _trans_mode, QString _guard_interval, QString _hierarchy,
682  QString _modulation, QString _bandwidth, QString _mod_sys,
683  QString _rolloff)
684 {
685  m_tuner_type = type;
686 
688  type,
689  std::move(_frequency), std::move(_inversion), std::move(_symbolrate),
690  std::move(_fec), std::move(_polarity),
691  std::move(_hp_code_rate), std::move(_lp_code_rate), std::move(_ofdm_modulation),
692  std::move(_trans_mode), std::move(_guard_interval), std::move(_hierarchy),
693  std::move(_modulation), std::move(_bandwidth), std::move(_mod_sys),
694  std::move(_rolloff));
695 }
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:782
unsigned long long FrequencyHz(void) const
uint64_t m_symbolrate
Definition: dtvmultiplex.h:95
bool IsCompatible(const DTVGuardInterval &other) const
DTVGuardInterval m_guard_interval
Definition: dtvmultiplex.h:102
bool Parse(const QString &_value)
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:863
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)
bool Parse(const QString &_value)
bool operator==(const DTVMultiplex &m) const
static const int kTunerTypeDVBT
DTVBandwidth m_bandwidth
Definition: dtvmultiplex.h:97
static const int kTunerTypeATSC
DTVHierarchy m_hierarchy
Definition: dtvmultiplex.h:103
DTVPolarity m_polarity
Definition: dtvmultiplex.h:104
bool Parse(const QString &_value)
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
bool IsCompatible(const DTVHierarchy &other) const
bool IsCompatible(const DTVTransmitMode &other) const
QString FECInnerString(void) const
uint DescriptorTag(void) const
bool Parse(const QString &_value)
QString toString() const
bool ParseTuningParams(DTVTunerType type, QString frequency, QString inversion, QString symbolrate, QString fec, QString polarity, QString hp_code_rate, QString lp_code_rate, QString ofdm_modulation, QString trans_mode, QString guard_interval, QString hierarchy, QString modulation, QString bandwidth, QString mod_sys, QString rolloff)
unsigned int uint
Definition: compat.h:140
DTVInversion m_inversion
Definition: dtvmultiplex.h:96
DTVCodeRate m_lp_code_rate
Low Priority FEC rate.
Definition: dtvmultiplex.h:99
static const int kTunerTypeDVBS1
QString toString() const
bool Parse(const QString &_value)
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)
DTVTunerType m_tuner_type
Definition: dtvmultiplex.h:137
bool ParseATSC(const QString &frequency, const QString &modulation)
QString toString() const
ChannelInsertInfoList m_channels
Definition: dtvmultiplex.h:139
DTVCodeRate m_fec
Inner Forward Error Correction rate.
Definition: dtvmultiplex.h:105
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)
QVariant value(int i) const
Definition: mythdbcon.h:198
QString toString() const
bool FillFromDeliverySystemDesc(DTVTunerType type, const MPEGDescriptor &desc)
bool Parse(const QString &_value)
DTVCodeRate m_hp_code_rate
High Priority FEC rate.
Definition: dtvmultiplex.h:98
static const int kTunerTypeDVBS2
DTVModulation m_modulation
Definition: dtvmultiplex.h:100
QString toString() const
static const int kTunerTypeDVBT2
bool IsEqual(DTVTunerType type, const DTVMultiplex &other, uint freq_range=0, bool fuzzy=false) const
static const int kTunerTypeDVBC
bool Parse(const QString &_value)
uint SaveScan(uint scanid) const
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)
QString toString() const
bool IsCompatible(const DTVCodeRate &other) const
QString ModulationString(void) const
QString toString() const
QString ConstellationString(void) const
bool ParseDVB_S(const QString &frequency, const QString &inversion, const QString &symbol_rate, const QString &fec_inner, const QString &modulation, const QString &polarity)
bool IsCompatible(const DTVRollOff &other) const
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:535
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)
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)
QString m_sistandard
Definition: dtvmultiplex.h:111
QString toString() const
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:807
static const int kTunerTypeIPTV
bool IsCompatible(const DTVInversion &other) const
DTVRollOff m_rolloff
Definition: dtvmultiplex.h:107
#define LOG(_MASK_, _LEVEL_, _STRING_)
Definition: mythlogging.h:41
QString toString() const
QString toString() const
QString TransmissionModeString(void) const
IPTVTuningData m_iptv_tuning
Definition: dtvmultiplex.h:112
QString FECInnerString(void) const
bool FillFromDB(DTVTunerType type, uint mplexid) override
unsigned long long FrequencyHz(void) const
void Clear(void)
Definition: dtvmultiplex.h:34
bool IsCompatible(const DTVModulation &other) const
QString ModulationSystemString(void) const
bool Parse(const QString &_value)
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:603
bool IsCompatible(const DTVBandwidth &other) const
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:179
DTVModulationSystem m_mod_sys
Modulation system.
Definition: dtvmultiplex.h:106
bool IsCompatible(const DTVModulationSystem &other) const
QString ModulationString(void) const
#define LOC
Definition: dtvmultiplex.cpp:9
bool Parse(const QString &_value)
virtual bool FillFromDB(DTVTunerType type, uint mplexid)
uint64_t m_frequency
Definition: dtvmultiplex.h:94
DTVTransmitMode m_trans_mode
Definition: dtvmultiplex.h:101
bool Parse(const QString &_value)