MythTV  master
frequencytables.cpp
Go to the documentation of this file.
1 #include <utility>
2 
3 #include <QMutex>
4 
5 #include "frequencies.h"
6 #include "frequencytables.h"
7 #include "channelutil.h"
8 #include "compat.h"
9 
10 static bool frequencies_initialized = false;
11 static QMutex frequencies_lock;
13 
14 static void init_freq_tables(freq_table_map_t& /*fmap*/);
16  const QString &format, const QString &modulation, const QString &country);
17 
19 {
20  m_tuning.Clear();
21 }
22 
24  const QString &_si_std,
25  QString _name,
26  uint _mplexid,
27  uint _timeoutTune)
28  : m_mplexid(_mplexid), m_friendlyName(std::move(_name)),
29  m_sourceID(sourceid),
30  m_timeoutTune(_timeoutTune)
31 {
32  m_tuning.Clear();
33  m_tuning.m_sistandard = _si_std;
34 
35  if (_si_std == "analog")
36  {
37  m_tuning.m_sistandard = "analog";
39  }
40 }
41 
43  QString _name,
44  DTVMultiplex &_tuning,
45  uint _timeoutTune)
46  : m_mplexid(0),
47  m_friendlyName(std::move(_name)),
48  m_sourceID(_sourceid),
49  m_timeoutTune(_timeoutTune)
50 {
51  m_tuning = _tuning;
52 }
53 
55  QString _name,
56  DTVTunerType _tuner_type,
57  const DTVTransport &_tuning,
58  uint _timeoutTune)
59  : m_mplexid(0),
60  m_friendlyName(std::move(_name)),
61  m_sourceID(_sourceid),
62  m_timeoutTune(_timeoutTune)
63 {
64  m_expectedChannels = _tuning.channels;
65 
66  m_tuning.Clear();
67 
69  _tuner_type,
70  QString::number(_tuning.m_frequency), _tuning.m_inversion.toString(),
71  QString::number(_tuning.m_symbolRate), _tuning.m_fec.toString(),
72  _tuning.m_polarity.toString(), _tuning.m_hpCodeRate.toString(),
73  _tuning.m_lpCodeRate.toString(), _tuning.m_modulation.toString(),
74  _tuning.m_transMode.toString(), _tuning.m_guardInterval.toString(),
75  _tuning.m_hierarchy.toString(), _tuning.m_modulation.toString(),
76  _tuning.m_bandwidth.toString(), _tuning.m_modSys.toString(),
77  _tuning.m_rolloff.toString());
78 }
79 
81  const QString &std,
82  QString strFmt,
83  uint freqNum,
84  uint freq,
85  const FrequencyTable &ft,
86  uint timeoutTune)
87  : m_mplexid(0), m_friendlyName(std::move(strFmt)),
88  m_friendlyNum(freqNum), m_sourceID(sourceid),
89  m_timeoutTune(timeoutTune)
90 {
91  m_tuning.Clear();
92 
93  // setup tuning params
95  m_tuning.m_sistandard = "dvb";
97 
98  if (std.toLower() == "atsc")
99  m_tuning.m_sistandard = "atsc";
100  else if (std.toLower() == "analog")
101  {
102  m_tuning.m_sistandard = "analog";
104  }
105 
106  m_freqOffsets[1] = ft.m_offset1;
107  m_freqOffsets[2] = ft.m_offset2;
108 
109  if (std == "dvbt")
110  {
118  }
119  else if (std == "dvbc" || std == "dvbs")
120  {
123  }
124 
126 }
127 
129  QString _name,
130  IPTVTuningData _tuning,
131  QString _channel,
132  uint _timeoutTune) :
133  m_mplexid(0),
134  m_friendlyName(std::move(_name)),
135  m_sourceID(_sourceid),
136  m_timeoutTune(_timeoutTune),
137  m_iptvTuning(std::move(_tuning)), m_iptvChannel(std::move(_channel))
138 {
139  m_tuning.Clear();
140  m_tuning.m_sistandard = "MPEG";
141 }
142 
147 {
148  int mplexid = 0;
149 
150  for (uint i = 0; (i < offset_cnt()) && (mplexid <= 0); i++)
152 
153  return mplexid < 0 ? 0 : mplexid;
154 }
155 
157 {
158  auto freq = (int64_t) m_tuning.m_frequency;
159 
160  return (uint64_t) (freq + m_freqOffsets[i]);
161 }
162 
164 {
165  if (m_tuning.m_sistandard == "MPEG")
166  {
167  return m_iptvChannel + ": " + m_iptvTuning.GetDeviceKey();
168  }
169 
170  QString str = QString("Transport Scan Item '%1' #%2\n")
171  .arg(m_friendlyName).arg(m_friendlyNum);
172  str += QString("\tmplexid(%1) standard(%2) sourceid(%3)\n")
173  .arg(m_mplexid).arg(m_tuning.m_sistandard).arg(m_sourceID);
174  str += QString("\tuseTimer(%1) scanning(%2)\n")
175  .arg(m_useTimer).arg(m_scanning);
176  str += QString("\ttimeoutTune(%3 msec)\n").arg(m_timeoutTune);
177  if (m_tuning.m_sistandard == "atsc" || m_tuning.m_sistandard == "analog")
178  {
179  str += QString("\tfrequency(%1) modulation(%2)\n")
180  .arg(m_tuning.m_frequency)
182  }
183  else
184  {
185  str += QString("\tfrequency(%1) constellation(%2)\n")
186  .arg(m_tuning.m_frequency)
188  str += QString("\t inv(%1) bandwidth(%2) hp(%3) lp(%4)\n")
189  .arg(m_tuning.m_inversion)
190  .arg(m_tuning.m_bandwidth)
191  .arg(m_tuning.m_hpCodeRate)
192  .arg(m_tuning.m_lpCodeRate);
193  str += QString("\t trans_mode(%1) guard_int(%2) hierarchy(%3)\n")
194  .arg(m_tuning.m_transMode)
196  .arg(m_tuning.m_hierarchy);
197  str += QString("\t symbol_rate(%1) fec(%2)\n")
198  .arg(m_tuning.m_symbolRate)
199  .arg(m_tuning.m_fec);
200  }
201  str += QString("\toffset[0..2]: %1 %2 %3")
202  .arg(m_freqOffsets[0]).arg(m_freqOffsets[1]).arg(m_freqOffsets[2]);
203  return str;
204 }
205 
206 static bool init_freq_tables(void)
207 {
209  {
212  }
213  return true;
214 }
215 
217 {
218  QMutexLocker locker(&frequencies_lock);
220  {
221  frequencies.clear();
222  frequencies_initialized = false;
223  }
224  return true;
225 }
226 
228  const QString &format, const QString &modulation, const QString &country)
229 {
230  const freq_table_map_t &fmap = frequencies;
231 
233 
234  QString lookup = QString("%1_%2_%3%4")
235  .arg(format).arg(modulation).arg(country);
236 
237  freq_table_map_t::const_iterator it = fmap.begin();
238  for (uint i = 0; it != fmap.end(); i++)
239  {
240  it = fmap.find(lookup.arg(i));
241  if (it != fmap.end())
242  list.push_back(*it);
243  }
244 
245  return list;
246 }
247 
249  const QString &format, const QString &modulation, const QString &country)
250 {
251  QMutexLocker locker(&frequencies_lock);
253 
255  get_matching_freq_tables_internal(format, modulation, country);
256 
257  freq_table_list_t new_list;
258  for (auto & ft : list)
259  new_list.push_back(new FrequencyTable(*ft));
260 
261  return new_list;
262 }
263 
265  const QString& format, const QString& modulation, const QString& country, int freqid)
266 {
267  QMutexLocker locker(&frequencies_lock);
269 
271  get_matching_freq_tables_internal(format, modulation, country);
272 
273  for (auto & ft : list)
274  {
275  int min_freqid = ft->m_nameOffset;
276  int max_freqid = min_freqid +
277  ((ft->m_frequencyEnd - ft->m_frequencyStart) /
278  ft->m_frequencyStep);
279 
280  if ((min_freqid <= freqid) && (freqid <= max_freqid))
281  return ft->m_frequencyStart +
282  ft->m_frequencyStep * (freqid - min_freqid);
283  }
284  return -1;
285 }
286 
288  const QString& format, QString modulation, const QString& country, long long centerfreq)
289 {
290  modulation = (modulation == "8vsb") ? "vsb8" : modulation;
291 
293  get_matching_freq_tables_internal(format, modulation, country);
294 
295  for (auto & ft : list)
296  {
297  int min_freqid = ft->m_nameOffset;
298  int max_freqid = min_freqid +
299  ((ft->m_frequencyEnd - ft->m_frequencyStart) /
300  ft->m_frequencyStep);
301  int freqid =
302  ((centerfreq - ft->m_frequencyStart) /
303  ft->m_frequencyStep) + min_freqid;
304 
305  if ((min_freqid <= freqid) && (freqid <= max_freqid))
306  return freqid;
307  }
308 #if 0
309  LOG(VB_GENERAL, LOG_DEBUG,
310  QString("get_closest_freqid(%1, %2, %3, %4) Failed sz(%5)")
311  .arg(format) .arg(modulation) .arg(country) .arg(centerfreq)
312  .arg(list.size()));
313 #endif
314  return -1;
315 }
316 
317 
319 {
320  // United Kingdom
321  fmap["dvbt_ofdm_gb0"] = new FrequencyTable(
322  474000000, 850000000, 8000000, "Channel %1", 21,
328  DTVModulation::kModulationQAMAuto, 166670, -166670);
329 
330  // Finland
331  fmap["dvbt_ofdm_fi0"] = new FrequencyTable(
332  474000000, 850000000, 8000000, "Channel %1", 21,
339 
340  // Sweden
341  fmap["dvbt_ofdm_se0"] = new FrequencyTable(
342  474000000, 850000000, 8000000, "Channel %1", 21,
349 
350  // Australia
351  fmap["dvbt_ofdm_au0"] = new FrequencyTable(
352  177500000, 226500000, 7000000, "Channel %1", 5,
358  DTVModulation::kModulationQAMAuto, 125000, 0); // VHF 5-12
359  fmap["dvbt_ofdm_au1"] = new FrequencyTable(
360  529500000, 816500000, 7000000, "Channel %1", 28,
366  DTVModulation::kModulationQAMAuto, 125000, 0); // UHF 28-69
367 
368  // Germany (Deutschland)
369  fmap["dvbt_ofdm_de0"] = new FrequencyTable(
370  177500000, 226500000, 7000000, "Channel %1", 5,
376  DTVModulation::kModulationQAMAuto, 0, 0); // VHF 5-12, deprecated
377  fmap["dvbt_ofdm_de1"] = new FrequencyTable(
378  474000000, 826000000, 8000000, "Channel %1", 21,
384  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 21-65
385 
386  // Israel
387  fmap["dvbt_ofdm_il0"] = new FrequencyTable(
388  514000000, 514000000+1, 8000000, "Channel %1", 26,
394  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 26 - central Israel
395  fmap["dvbt_ofdm_il1"] = new FrequencyTable(
396  538000000, 538000000+1, 8000000, "Channel %1", 29,
402  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 29 - North and Eilat area
403 
404  // Italy (Italia)
405  fmap["dvbt_ofdm_it0"] = new FrequencyTable(
406  177500000, 226500000, 7000000, "Channel %1", 5,
412  DTVModulation::kModulationQAMAuto, 0, 0); // VHF 5-12, deprecated
413  fmap["dvbt_ofdm_it1"] = new FrequencyTable(
414  474000000, 858000000, 8000000, "Channel %1", 21,
420  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 21-65
421 
422  // Czech Republic
423  fmap["dvbt_ofdm_cz0"] = new FrequencyTable(
424  474000000, 858000000, 8000000, "Channel %1", 21,
430  DTVModulation::kModulationQAM64, 0, 0); // UHF 21-69
431 
432  // Greece (Hellas)
433  fmap["dvbt_ofdm_gr0"] = new FrequencyTable(
434  174000000, 230000000, 7000000, "Channel %1", 5,
440  DTVModulation::kModulationQAMAuto, 0, 0); // VHF 5-12, deprecated
441  fmap["dvbt_ofdm_gr1"] = new FrequencyTable(
442  474000000, 866000000, 8000000, "Channel %1", 21,
448  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 21-65
449 
450  // Spain
451  fmap["dvbt_ofdm_es0"] = new FrequencyTable(
452  474000000, 858000000, 8000000, "Channel %1", 21,
458  DTVModulation::kModulationQAMAuto, 125000, 0); // UHF 21-69
459 
460  // New Zealand
461  fmap["dvbt_ofdm_nz0"] = new FrequencyTable(
462  474000000, 858000000, 8000000, "Channel %1", 21,
468  DTVModulation::kModulationQAM64, 0 , 0); // UHF 21-69
469 
470  // France
471  fmap["dvbt_ofdm_fr0"] = new FrequencyTable(
472  474000000, 850000000, 8000000, "Channel %1", 21,
478  DTVModulation::kModulationQAMAuto, 167000, -166000);
479 
480  // Denmark
481  fmap["dvbt_ofdm_dk0"] = new FrequencyTable(
482  474000000, 858000000, 8000000, "Channel %1", 21,
489 
490  // Netherlands
491  fmap["dvbt_ofdm_nl0"] = new FrequencyTable(
492  474000000, 786000000, 8000000, "Channel %1", 21,
498  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 21-60
499 
500  // Chile (ISDB-Tb)
501  fmap["dvbt_ofdm_cl0"] = new FrequencyTable(
502  473000000, 803000000, 6000000, "Channel %1", 14,
509 
510  // DVB-C Germany
511  fmap["dvbc_qam_de0"] = new FrequencyTable(
512  73000000, 73000000, 8000000, "Channel D%1", 73,
514  6900000, 0, 0);
515  fmap["dvbc_qam_de1"] = new FrequencyTable(
516  81000000, 81000000, 8000000, "Channel D%1", 81,
518  6900000, 0, 0);
519  fmap["dvbc_qam_de2"] = new FrequencyTable(
520  113000000, 121000000, 8000000, "Channel S0%1", 2,
522  6900000, 0, 0);
523  fmap["dvbc_qam_de3"] = new FrequencyTable(
524  306000000, 466000000, 8000000, "Channel S%1", 21,
526  6900000, 0, 0);
527  fmap["dvbc_qam_de4"] = new FrequencyTable(
528  474000000, 858000000, 8000000, "Channel %1", 21,
530  6900000, 0, 0);
531 
532  // DVB-C Netherlands
533  fmap["dvbc_qam_nl0"] = new FrequencyTable(
534  474000000, 474000000, 8000000, "Channel %1", 21,
536  6875000, 0, 0);
537 
538  // DVB-C United Kingdom
539  fmap["dvbc_qam_gb0"] = new FrequencyTable(
540  12324000, 12324000+1, 10, "Channel %1", 1,
542  29500000, 0, 0);
543  fmap["dvbc_qam_gb1"] = new FrequencyTable(
544  459000000, 459000000+1, 10, "Channel %1", 2,
546  6952000, 0, 0);
547 
548  // DVB-C Unknown (British Forces ?)
549  fmap["dvbc_qam_bf0"] = new FrequencyTable(
550  203000000, 795000000, 100000, "BF Channel %1", 1,
552  6900000, 0, 0);
553  fmap["dvbc_qam_bf1"] = new FrequencyTable(
554  194750000, 794750000, 100000, "BF Channel %1", 1 + (795000-203000) / 100,
556  6900000, 0, 0);
557 
558 //#define DEBUG_DVB_OFFSETS
559 #ifdef DEBUG_DVB_OFFSETS
560  // UHF 14-51
561  fmap["atsc_vsb8_us0"] = new FrequencyTable(
562  533000000, 695000000, 6000000, "xATSC Channel %1", 24,
568  DTVModulation::kModulation8VSB, -100000, 100000);
569 #else // if !DEBUG_DVB_OFFSETS
570  // USA Terrestrial (center frequency, subtract 1.75 MHz for visual carrier)
571  // VHF 2-4
572  fmap["atsc_vsb8_us0"] = new FrequencyTable(
573  "ATSC Channel %1", 2, 57000000, 69000000, 6000000,
575  // VHF 5-6
576  fmap["atsc_vsb8_us1"] = new FrequencyTable(
577  "ATSC Channel %1", 5, 79000000, 85000000, 6000000,
579  // VHF 7-13
580  fmap["atsc_vsb8_us2"] = new FrequencyTable(
581  "ATSC Channel %1", 7, 177000000, 213000000, 6000000,
583  // UHF 14-51
584  fmap["atsc_vsb8_us3"] = new FrequencyTable(
585  "ATSC Channel %1", 14, 473000000, 695000000, 6000000,
587 #endif // !DEBUG_DVB_OFFSETS
588 
589  QString modStr[] = { "vsb8", "qam256", "qam128", "qam64", };
594  QString desc[] = { "ATSC ", "QAM-256 ", "QAM-128 ", "QAM-64 ", };
595 
596 #define FREQ(A,B, C,D, E,F,G, H, I) \
597  fmap[QString("atsc_%1_us%2").arg(A).arg(B)] = \
598  new FrequencyTable((C)+(D), E, F, G, H, I);
599 
600 // The maximum channel defined in the US frequency tables (standard, HRC, IRC)
601 #define US_MAX_CHAN 159
602 // Equation for computing EIA-542 frequency of channels > 99
603 // A = bandwidth, B = offset, C = channel designation (number)
604 #define EIA_542_FREQUENCY(A,B,C) ( ( (A) * ( 8 + (C) ) ) + (B) )
605 
606  for (uint i = 0; i < 4; i++)
607  {
608  // USA Cable, ch 2 to US_MAX_CHAN and T.7 to T.14
609  FREQ(modStr[i], "cable0", desc[i], "Channel %1",
610  2, 57000000, 69000000, 6000000, mod[i]); // 2-4
611  FREQ(modStr[i], "cable1", desc[i], "Channel %1",
612  5, 79000000, 85000000, 6000000, mod[i]); // 5-6
613  FREQ(modStr[i], "cable2", desc[i], "Channel %1",
614  7, 177000000, 213000000, 6000000, mod[i]); // 7-13
615  FREQ(modStr[i], "cable3", desc[i], "Channel %1",
616  14, 123000000, 171000000, 6000000, mod[i]); // 14-22
617  FREQ(modStr[i], "cable4", desc[i], "Channel %1",
618  23, 219000000, 645000000, 6000000, mod[i]); // 23-94
619  FREQ(modStr[i], "cable5", desc[i], "Channel %1",
620  95, 93000000, 117000000, 6000000, mod[i]); // 95-99
621  // The center frequency of any EIA-542 std cable channel over 99 is
622  // Frequency_MHz = ( 6 * ( 8 + channel_designation ) ) + 3
623  FREQ(modStr[i], "cable6", desc[i], "Channel %1",
624  100, 651000000,
625  EIA_542_FREQUENCY(6000000, 3000000, US_MAX_CHAN),
626  6000000, mod[i]); // 100-US_MAX_CHAN
627  FREQ(modStr[i], "cable7", desc[i], "Channel T-%1",
628  7, 8750000, 50750000, 6000000, mod[i]); // T7-14
629 
630  // USA Cable, QAM 256 ch 78 to US_MAX_CHAN
631  FREQ(modStr[i], "cablehigh0", desc[i], "Channel %1",
632  78, 549000000, 645000000, 6000000, mod[i]); // 78-94
633  FREQ(modStr[i], "cablehigh1", desc[i], "Channel %1",
634  100, 651000000,
635  EIA_542_FREQUENCY(6000000, 3000000, US_MAX_CHAN),
636  6000000, mod[i]); // 100-US_MAX_CHAN
637 
638  // USA Cable HRC, ch 1 to US_MAX_CHAN
639  FREQ(modStr[i], "hrc0", desc[i], "HRC %1",
640  1, 73753600, 73753601, 6000300, mod[i]); // 1
641  FREQ(modStr[i], "hrc1", desc[i], "HRC %1",
642  2, 55752700, 67753300, 6000300, mod[i]); // 2-4
643  FREQ(modStr[i], "hrc2", desc[i], "HRC %1",
644  5, 79753900, 85754200, 6000300, mod[i]); // 5-6
645  FREQ(modStr[i], "hrc3", desc[i], "HRC %1",
646  7, 175758700, 211760500, 6000300, mod[i]); // 7-13
647  FREQ(modStr[i], "hrc4", desc[i], "HRC %1",
648  14, 121756000, 169758400, 6000300, mod[i]); // 14-22
649  FREQ(modStr[i], "hrc5", desc[i], "HRC %1",
650  23, 217760800, 643782100, 6000300, mod[i]); // 23-94
651  FREQ(modStr[i], "hrc6", desc[i], "HRC %1",
652  95, 91754500, 115755700, 6000300, mod[i]); // 95-99
653  // The center frequency of any EIA-542 HRC cable channel over 99 is
654  // Frequency_MHz = ( 6.0003 * ( 8 + channel_designation ) ) + 1.75
655  FREQ(modStr[i], "hrc7", desc[i], "HRC %1",
656  100, 649782400,
657  EIA_542_FREQUENCY(6000300, 1750000, US_MAX_CHAN),
658  6000300, mod[i]); // 100-US_MAX_CHAN
659 
660  // USA Cable HRC, ch 76-94 and 100-US_MAX_CHAN
661  // Channels 95-99 are low frequency despite high channel numbers
662  FREQ(modStr[i], "hrchigh0", desc[i], "HRC %1",
663  76, 535776700, 643782100, 6000300, mod[i]); // 76-94
664  FREQ(modStr[i], "hrchigh1", desc[i], "HRC %1",
665  100, 649782400,
666  EIA_542_FREQUENCY(6000300, 1750000, US_MAX_CHAN),
667  6000300, mod[i]); // 100-US_MAX_CHAN
668 
669  // USA Cable IRC, ch 1 to US_MAX_CHAN
670  FREQ(modStr[i], "irc0", desc[i], "IRC %1",
671  1, 75012500, 75012501, 6000000, mod[i]); // 1
672  FREQ(modStr[i], "irc1", desc[i], "IRC %1",
673  2, 57012500, 69012500, 6000000, mod[i]); // 2-4
674  FREQ(modStr[i], "irc2", desc[i], "IRC %1",
675  5, 81012500, 87012500, 6000000, mod[i]); // 5-6
676  FREQ(modStr[i], "irc3", desc[i], "IRC %1",
677  7, 177012500, 213012500, 6000000, mod[i]); // 7-13
678  FREQ(modStr[i], "irc4", desc[i], "IRC %1",
679  14, 123012500, 171012500, 6000000, mod[i]); // 14-22
680  FREQ(modStr[i], "irc5", desc[i], "IRC %1",
681  23, 219012500, 327012500, 6000000, mod[i]); // 23-41
682  FREQ(modStr[i], "irc6", desc[i], "IRC %1",
683  42, 333025000, 333025001, 6000000, mod[i]); // 42
684  FREQ(modStr[i], "irc7", desc[i], "IRC %1",
685  43, 339012500, 645012500, 6000000, mod[i]); // 43-94
686  FREQ(modStr[i], "irc8", desc[i], "IRC %1",
687  95, 93012500, 105012500, 6000000, mod[i]); // 95-97
688  FREQ(modStr[i], "irc9", desc[i], "IRC %1",
689  98, 111025000, 117025000, 6000000, mod[i]); // 98-99
690  // The center frequency of any EIA-542 IRC cable channel over 99 is
691  // Frequency_MHz = ( 6 * ( 8 + channel_designation ) ) + 3.0125
692  FREQ(modStr[i], "irc10", desc[i], "IRC %1",
693  100, 651012500,
694  EIA_542_FREQUENCY(6000000, 3012500, US_MAX_CHAN),
695  6000000, mod[i]); // 100-US_MAX_CHAN
696 
697  // USA Cable IRC, ch 76-94 and 100-125
698  // Channels 95-99 are low frequency despite high channel numbers
699  FREQ(modStr[i], "irchigh0", desc[i], "IRC %1",
700  76, 537012500, 645012500, 6000000, mod[i]); // 76-94
701  FREQ(modStr[i], "irchigh1", desc[i], "IRC %1",
702  100, 651012500,
703  EIA_542_FREQUENCY(6000000, 3012500, US_MAX_CHAN),
704  6000000, mod[i]); // 100-US_MAX_CHAN
705  }
706 
707  // create old school frequency tables...
708  for (CHANLISTS *ptr = chanlists; ptr->name ; ptr++)
709  {
710  QString tbl_name = ptr->name;
711  for (uint i = 0; i < (uint)ptr->count; i++)
712  {
713  uint64_t freq = (ptr->list[i].freq * 1000LL) + 1750000;
714  fmap[QString("analog_analog_%1%2").arg(tbl_name).arg(i)] =
715  new FrequencyTable(
716  QString("%1 %2").arg(tbl_name).arg(ptr->list[i].name), i+2,
717  freq, freq + 3000000,
719  }
720  }
721 
722 }
#define US_MAX_CHAN
DTVHierarchy m_hierarchy
DTVCodeRate m_coderateLp
DTVGuardInterval m_guardInterval
Definition: dtvmultiplex.h:102
uint64_t m_symbolRate
Definition: dtvmultiplex.h:95
int m_sourceID
Associated SourceID.
DTVInversion m_inversion
DTVBandwidth m_bandwidth
Definition: dtvmultiplex.h:97
DTVHierarchy m_hierarchy
Definition: dtvmultiplex.h:103
uint m_friendlyNum
Frequency number (freqid w/freq table)
int m_freqOffsets[3]
Frequency offsets.
DTVGuardInterval m_guardInterval
DTVModulation m_modulation
DTVPolarity m_polarity
Definition: dtvmultiplex.h:104
unsigned m_timeoutTune
Timeout to tune to a frequency.
IPTVTuningData m_iptvTuning
IPTV Tuning info.
QString toString() const
struct CHANLIST * list
Definition: frequencies.h:103
freq_table_list_t get_matching_freq_tables(const QString &format, const QString &modulation, const QString &country)
DTVInversion m_inversion
Definition: dtvmultiplex.h:96
uint32_t freq[4]
Definition: element.c:44
bool teardown_frequency_tables(void)
QString m_iptvChannel
IPTV base channel.
static uint GetMplexID(uint sourceid, const QString &channum)
bool m_useTimer
Set if timer is used after lock for getting PAT.
QString toString() const
int get_closest_freqid(const QString &format, QString modulation, const QString &country, long long centerfreq)
DTVCodeRate m_fec
Inner Forward Error Correction rate.
Definition: dtvmultiplex.h:105
const char * name
Definition: frequencies.h:102
uint GetMultiplexIdFromDB(void) const
Fetches mplexid if it exists, based on the frequency and sourceid.
QString toString() const
DTVModulation m_modulation
Definition: dtvmultiplex.h:100
struct CHANLISTS chanlists[]
DTVCodeRate m_fecInner
QString toString() const
vector< const FrequencyTable * > freq_table_list_t
long long get_center_frequency(const QString &format, const QString &modulation, const QString &country, int freqid)
DTVChannelInfoList m_expectedChannels
DTVCodeRate m_coderateHp
QString toString() const
QString toString() const
#define FREQ(A, B, C, D, E, F, G, H, I)
unsigned int uint
Definition: compat.h:140
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)
QMap< QString, const FrequencyTable * > freq_table_map_t
static void init_freq_tables(freq_table_map_t &)
DTVBandwidth m_bandwidth
DTVTransmitMode m_transMode
Definition: dtvmultiplex.h:101
QString m_sistandard
Definition: dtvmultiplex.h:111
QString m_friendlyName
Name to display in scanner dialog.
QString GetDeviceKey(void) const
QString toString() const
DTVRollOff m_rolloff
Definition: dtvmultiplex.h:107
static freq_table_list_t get_matching_freq_tables_internal(const QString &format, const QString &modulation, const QString &country)
#define LOG(_MASK_, _LEVEL_, _STRING_)
Definition: mythlogging.h:41
uint64_t freq_offset(uint i) const
QString toString() const
QString toString() const
static QMutex frequencies_lock
DTVTransmitMode m_transMode
int m_offset1
The first offset from the centre freq.
void Clear(void)
Definition: dtvmultiplex.h:34
int m_offset2
The second offset from the centre freq.
uint m_mplexid
DB Mplexid.
DTVCodeRate m_hpCodeRate
High Priority FEC rate.
Definition: dtvmultiplex.h:98
DTVChannelInfoList channels
Definition: dtvconfparser.h:69
static freq_table_map_t frequencies
uint offset_cnt() const
static bool frequencies_initialized
QString toString() const
#define EIA_542_FREQUENCY(A, B, C)
bool m_scanning
Probably Unnecessary.
DTVMultiplex m_tuning
Tuning info.
DTVCodeRate m_lpCodeRate
Low Priority FEC rate.
Definition: dtvmultiplex.h:99
DTVModulationSystem m_modSys
Modulation system.
Definition: dtvmultiplex.h:106
uint64_t m_frequency
Definition: dtvmultiplex.h:94