MythTV  master
frequencytables.cpp
Go to the documentation of this file.
1 #include <QMutex>
2 
3 #include "frequencies.h"
4 #include "frequencytables.h"
5 #include "channelutil.h"
6 #include "compat.h"
7 
8 static bool frequencies_initialized = false;
9 static QMutex frequencies_lock;
11 
12 static void init_freq_tables(freq_table_map_t& /*fmap*/);
14  const QString &format, const QString &modulation, const QString &country);
15 
17 {
18  m_tuning.Clear();
19 }
20 
22  const QString &_si_std,
23  const QString &_name,
24  uint _mplexid,
25  uint _timeoutTune)
26  : m_mplexid(_mplexid), m_friendlyName(_name),
27  m_sourceID(sourceid),
28  m_timeoutTune(_timeoutTune)
29 {
30  m_tuning.Clear();
31  m_tuning.m_sistandard = _si_std;
32 
33  if (_si_std == "analog")
34  {
35  m_tuning.m_sistandard = "analog";
37  }
38 }
39 
41  const QString &_name,
42  DTVMultiplex &_tuning,
43  uint _timeoutTune)
44  : m_mplexid(0),
45  m_friendlyName(_name),
46  m_sourceID(_sourceid),
47  m_timeoutTune(_timeoutTune)
48 {
49  m_tuning = _tuning;
50 }
51 
53  const QString &_name,
54  DTVTunerType _tuner_type,
55  const DTVTransport &_tuning,
56  uint _timeoutTune)
57  : m_mplexid(0),
58  m_friendlyName(_name),
59  m_sourceID(_sourceid),
60  m_timeoutTune(_timeoutTune)
61 {
62  m_expectedChannels = _tuning.channels;
63 
64  m_tuning.Clear();
65 
67  _tuner_type,
68  QString::number(_tuning.m_frequency), _tuning.m_inversion.toString(),
69  QString::number(_tuning.m_symbolrate), _tuning.m_fec.toString(),
70  _tuning.m_polarity.toString(), _tuning.m_hp_code_rate.toString(),
71  _tuning.m_lp_code_rate.toString(), _tuning.m_modulation.toString(),
72  _tuning.m_trans_mode.toString(), _tuning.m_guard_interval.toString(),
73  _tuning.m_hierarchy.toString(), _tuning.m_modulation.toString(),
74  _tuning.m_bandwidth.toString(), _tuning.m_mod_sys.toString(),
75  _tuning.m_rolloff.toString());
76 }
77 
79  const QString &std,
80  const QString &strFmt,
81  uint freqNum,
82  uint freq,
83  const FrequencyTable &ft,
84  uint timeoutTune)
85  : m_mplexid(0), m_friendlyName(strFmt),
86  m_friendlyNum(freqNum), m_sourceID(sourceid),
87  m_timeoutTune(timeoutTune)
88 {
89  m_tuning.Clear();
90 
91  // setup tuning params
93  m_tuning.m_sistandard = "dvb";
95 
96  if (std.toLower() == "atsc")
97  m_tuning.m_sistandard = "atsc";
98  else if (std.toLower() == "analog")
99  {
100  m_tuning.m_sistandard = "analog";
102  }
103 
104  m_freqOffsets[1] = ft.m_offset1;
105  m_freqOffsets[2] = ft.m_offset2;
106 
107  if (std == "dvbt")
108  {
116  }
117  else if (std == "dvbc" || std == "dvbs")
118  {
121  }
122 
124 }
125 
127  const QString &_name,
128  const IPTVTuningData &_tuning,
129  const QString &_channel,
130  uint _timeoutTune) :
131  m_mplexid(0),
132  m_friendlyName(_name),
133  m_sourceID(_sourceid),
134  m_timeoutTune(_timeoutTune),
135  m_iptvTuning(_tuning), m_iptvChannel(_channel)
136 {
137  m_tuning.Clear();
138  m_tuning.m_sistandard = "MPEG";
139 }
140 
145 {
146  int mplexid = 0;
147 
148  for (uint i = 0; (i < offset_cnt()) && (mplexid <= 0); i++)
150 
151  return mplexid < 0 ? 0 : mplexid;
152 }
153 
155 {
156  int64_t freq = (int64_t) m_tuning.m_frequency;
157 
158  return (uint64_t) (freq + m_freqOffsets[i]);
159 }
160 
162 {
163  if (m_tuning.m_sistandard == "MPEG")
164  {
165  return m_iptvChannel + ": " + m_iptvTuning.GetDeviceKey();
166  }
167 
168  QString str = QString("Transport Scan Item '%1' #%2\n")
169  .arg(m_friendlyName).arg(m_friendlyNum);
170  str += QString("\tmplexid(%1) standard(%2) sourceid(%3)\n")
171  .arg(m_mplexid).arg(m_tuning.m_sistandard).arg(m_sourceID);
172  str += QString("\tuseTimer(%1) scanning(%2)\n")
173  .arg(m_useTimer).arg(m_scanning);
174  str += QString("\ttimeoutTune(%3 msec)\n").arg(m_timeoutTune);
175  if (m_tuning.m_sistandard == "atsc" || m_tuning.m_sistandard == "analog")
176  {
177  str += QString("\tfrequency(%1) modulation(%2)\n")
178  .arg(m_tuning.m_frequency)
180  }
181  else
182  {
183  str += QString("\tfrequency(%1) constellation(%2)\n")
184  .arg(m_tuning.m_frequency)
186  str += QString("\t inv(%1) bandwidth(%2) hp(%3) lp(%4)\n")
187  .arg(m_tuning.m_inversion)
188  .arg(m_tuning.m_bandwidth)
190  .arg(m_tuning.m_lp_code_rate);
191  str += QString("\t trans_mode(%1) guard_int(%2) hierarchy(%3)\n")
192  .arg(m_tuning.m_trans_mode)
194  .arg(m_tuning.m_hierarchy);
195  }
196  str += QString("\t offset[0..2]: %1 %2 %3")
197  .arg(m_freqOffsets[0]).arg(m_freqOffsets[1]).arg(m_freqOffsets[2]);
198  return str;
199 }
200 
201 static bool init_freq_tables(void)
202 {
204  {
207  }
208  return true;
209 }
210 
212 {
213  QMutexLocker locker(&frequencies_lock);
215  {
216  frequencies.clear();
217  frequencies_initialized = false;
218  }
219  return true;
220 }
221 
223  const QString &format, const QString &modulation, const QString &country)
224 {
225  const freq_table_map_t &fmap = frequencies;
226 
228 
229  QString lookup = QString("%1_%2_%3%4")
230  .arg(format).arg(modulation).arg(country);
231 
232  freq_table_map_t::const_iterator it = fmap.begin();
233  for (uint i = 0; it != fmap.end(); i++)
234  {
235  it = fmap.find(lookup.arg(i));
236  if (it != fmap.end())
237  list.push_back(*it);
238  }
239 
240  return list;
241 }
242 
244  const QString &format, const QString &modulation, const QString &country)
245 {
246  QMutexLocker locker(&frequencies_lock);
248 
250  get_matching_freq_tables_internal(format, modulation, country);
251 
252  freq_table_list_t new_list;
253  for (size_t i = 0; i < list.size(); i++)
254  new_list.push_back(new FrequencyTable(*list[i]));
255 
256  return new_list;
257 }
258 
260  const QString& format, const QString& modulation, const QString& country, int freqid)
261 {
262  QMutexLocker locker(&frequencies_lock);
264 
266  get_matching_freq_tables_internal(format, modulation, country);
267 
268  for (size_t i = 0; i < list.size(); ++i)
269  {
270  int min_freqid = list[i]->m_nameOffset;
271  int max_freqid = min_freqid +
272  ((list[i]->m_frequencyEnd - list[i]->m_frequencyStart) /
273  list[i]->m_frequencyStep);
274 
275  if ((min_freqid <= freqid) && (freqid <= max_freqid))
276  return list[i]->m_frequencyStart +
277  list[i]->m_frequencyStep * (freqid - min_freqid);
278  }
279  return -1;
280 }
281 
283  const QString& format, QString modulation, const QString& country, long long centerfreq)
284 {
285  modulation = (modulation == "8vsb") ? "vsb8" : modulation;
286 
288  get_matching_freq_tables_internal(format, modulation, country);
289 
290  for (size_t i = 0; i < list.size(); ++i)
291  {
292  int min_freqid = list[i]->m_nameOffset;
293  int max_freqid = min_freqid +
294  ((list[i]->m_frequencyEnd - list[i]->m_frequencyStart) /
295  list[i]->m_frequencyStep);
296  int freqid =
297  ((centerfreq - list[i]->m_frequencyStart) /
298  list[i]->m_frequencyStep) + min_freqid;
299 
300  if ((min_freqid <= freqid) && (freqid <= max_freqid))
301  return freqid;
302  }
303 #if 0
304  LOG(VB_GENERAL, LOG_DEBUG,
305  QString("get_closest_freqid(%1, %2, %3, %4) Failed sz(%5)")
306  .arg(format) .arg(modulation) .arg(country) .arg(centerfreq)
307  .arg(list.size()));
308 #endif
309  return -1;
310 }
311 
312 
314 {
315  // United Kingdom
316  fmap["dvbt_ofdm_gb0"] = new FrequencyTable(
317  474000000, 850000000, 8000000, "Channel %1", 21,
323  DTVModulation::kModulationQAMAuto, 166670, -166670);
324 
325  // Finland
326  fmap["dvbt_ofdm_fi0"] = new FrequencyTable(
327  474000000, 850000000, 8000000, "Channel %1", 21,
334 
335  // Sweden
336  fmap["dvbt_ofdm_se0"] = new FrequencyTable(
337  474000000, 850000000, 8000000, "Channel %1", 21,
344 
345  // Australia
346  fmap["dvbt_ofdm_au0"] = new FrequencyTable(
347  177500000, 226500000, 7000000, "Channel %1", 5,
353  DTVModulation::kModulationQAMAuto, 125000, 0); // VHF 5-12
354  fmap["dvbt_ofdm_au1"] = new FrequencyTable(
355  529500000, 816500000, 7000000, "Channel %1", 28,
361  DTVModulation::kModulationQAMAuto, 125000, 0); // UHF 28-69
362 
363  // Germany (Deutschland)
364  fmap["dvbt_ofdm_de0"] = new FrequencyTable(
365  177500000, 226500000, 7000000, "Channel %1", 5,
371  DTVModulation::kModulationQAMAuto, 0, 0); // VHF 5-12, deprecated
372  fmap["dvbt_ofdm_de1"] = new FrequencyTable(
373  474000000, 826000000, 8000000, "Channel %1", 21,
379  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 21-65
380 
381  // Israel
382  fmap["dvbt_ofdm_il0"] = new FrequencyTable(
383  514000000, 514000000+1, 8000000, "Channel %1", 26,
389  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 26 - central Israel
390  fmap["dvbt_ofdm_il1"] = new FrequencyTable(
391  538000000, 538000000+1, 8000000, "Channel %1", 29,
397  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 29 - North and Eilat area
398 
399  // Italy (Italia)
400  fmap["dvbt_ofdm_it0"] = new FrequencyTable(
401  177500000, 226500000, 7000000, "Channel %1", 5,
407  DTVModulation::kModulationQAMAuto, 0, 0); // VHF 5-12, deprecated
408  fmap["dvbt_ofdm_it1"] = new FrequencyTable(
409  474000000, 858000000, 8000000, "Channel %1", 21,
415  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 21-65
416 
417  // Czech Republic
418  fmap["dvbt_ofdm_cz0"] = new FrequencyTable(
419  474000000, 858000000, 8000000, "Channel %1", 21,
425  DTVModulation::kModulationQAM64, 0, 0); // UHF 21-69
426 
427  // Greece (Hellas)
428  fmap["dvbt_ofdm_gr0"] = new FrequencyTable(
429  174000000, 230000000, 7000000, "Channel %1", 5,
435  DTVModulation::kModulationQAMAuto, 0, 0); // VHF 5-12, deprecated
436  fmap["dvbt_ofdm_gr1"] = new FrequencyTable(
437  474000000, 866000000, 8000000, "Channel %1", 21,
443  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 21-65
444 
445  // Spain
446  fmap["dvbt_ofdm_es0"] = new FrequencyTable(
447  474000000, 858000000, 8000000, "Channel %1", 21,
453  DTVModulation::kModulationQAMAuto, 125000, 0); // UHF 21-69
454 
455  // New Zealand
456  fmap["dvbt_ofdm_nz0"] = new FrequencyTable(
457  474000000, 858000000, 8000000, "Channel %1", 21,
463  DTVModulation::kModulationQAM64, 0 , 0); // UHF 21-69
464 
465  // France
466  fmap["dvbt_ofdm_fr0"] = new FrequencyTable(
467  474000000, 850000000, 8000000, "Channel %1", 21,
473  DTVModulation::kModulationQAMAuto, 167000, -166000);
474 
475  // Denmark
476  fmap["dvbt_ofdm_dk0"] = new FrequencyTable(
477  474000000, 858000000, 8000000, "Channel %1", 21,
484 
485  // Netherlands
486  fmap["dvbt_ofdm_nl0"] = new FrequencyTable(
487  474000000, 786000000, 8000000, "Channel %1", 21,
493  DTVModulation::kModulationQAMAuto, 0, 0); // UHF 21-60
494 
495  // Chile (ISDB-Tb)
496  fmap["dvbt_ofdm_cl0"] = new FrequencyTable(
497  473000000, 803000000, 6000000, "Channel %1", 14,
504 
505  // DVB-C Germany
506  fmap["dvbc_qam_de0"] = new FrequencyTable(
507  73000000, 73000000, 8000000, "Channel D%1", 73,
509  6900000, 0, 0);
510  fmap["dvbc_qam_de1"] = new FrequencyTable(
511  81000000, 81000000, 8000000, "Channel D%1", 81,
513  6900000, 0, 0);
514  fmap["dvbc_qam_de2"] = new FrequencyTable(
515  113000000, 121000000, 8000000, "Channel S0%1", 2,
517  6900000, 0, 0);
518  fmap["dvbc_qam_de3"] = new FrequencyTable(
519  306000000, 466000000, 8000000, "Channel S%1", 21,
521  6900000, 0, 0);
522  fmap["dvbc_qam_de4"] = new FrequencyTable(
523  474000000, 858000000, 8000000, "Channel %1", 21,
525  6900000, 0, 0);
526 
527  fmap["dvbc_qam_gb0"] = new FrequencyTable(
528  12324000, 12324000+1, 10, "Channel %1", 1,
530  29500000, 0, 0);
531  fmap["dvbc_qam_gb1"] = new FrequencyTable(
532  459000000, 459000000+1, 10, "Channel %1", 2,
534  6952000, 0, 0);
535 
536  fmap["dvbc_qam_bf0"] = new FrequencyTable(
537  203000000, 795000000, 100000, "BF Channel %1", 1,
539  6900000, 0, 0);
540  fmap["dvbc_qam_bf1"] = new FrequencyTable(
541  194750000, 794750000, 100000, "BF Channel %1", 1 + (795000-203000) / 100,
543  6900000, 0, 0);
544 
545 //#define DEBUG_DVB_OFFSETS
546 #ifdef DEBUG_DVB_OFFSETS
547  // UHF 14-51
548  fmap["atsc_vsb8_us0"] = new FrequencyTable(
549  533000000, 695000000, 6000000, "xATSC Channel %1", 24,
555  DTVModulation::kModulation8VSB, -100000, 100000);
556 #else // if !DEBUG_DVB_OFFSETS
557  // USA Terrestrial (center frequency, subtract 1.75 MHz for visual carrier)
558  // VHF 2-4
559  fmap["atsc_vsb8_us0"] = new FrequencyTable(
560  "ATSC Channel %1", 2, 57000000, 69000000, 6000000,
562  // VHF 5-6
563  fmap["atsc_vsb8_us1"] = new FrequencyTable(
564  "ATSC Channel %1", 5, 79000000, 85000000, 6000000,
566  // VHF 7-13
567  fmap["atsc_vsb8_us2"] = new FrequencyTable(
568  "ATSC Channel %1", 7, 177000000, 213000000, 6000000,
570  // UHF 14-51
571  fmap["atsc_vsb8_us3"] = new FrequencyTable(
572  "ATSC Channel %1", 14, 473000000, 695000000, 6000000,
574 #endif // !DEBUG_DVB_OFFSETS
575 
576  QString modStr[] = { "vsb8", "qam256", "qam128", "qam64", };
581  QString desc[] = { "ATSC ", "QAM-256 ", "QAM-128 ", "QAM-64 ", };
582 
583 #define FREQ(A,B, C,D, E,F,G, H, I) \
584  fmap[QString("atsc_%1_us%2").arg(A).arg(B)] = \
585  new FrequencyTable((C)+(D), E, F, G, H, I);
586 
587 // The maximum channel defined in the US frequency tables (standard, HRC, IRC)
588 #define US_MAX_CHAN 159
589 // Equation for computing EIA-542 frequency of channels > 99
590 // A = bandwidth, B = offset, C = channel designation (number)
591 #define EIA_542_FREQUENCY(A,B,C) ( ( (A) * ( 8 + (C) ) ) + (B) )
592 
593  for (uint i = 0; i < 4; i++)
594  {
595  // USA Cable, ch 2 to US_MAX_CHAN and T.7 to T.14
596  FREQ(modStr[i], "cable0", desc[i], "Channel %1",
597  2, 57000000, 69000000, 6000000, mod[i]); // 2-4
598  FREQ(modStr[i], "cable1", desc[i], "Channel %1",
599  5, 79000000, 85000000, 6000000, mod[i]); // 5-6
600  FREQ(modStr[i], "cable2", desc[i], "Channel %1",
601  7, 177000000, 213000000, 6000000, mod[i]); // 7-13
602  FREQ(modStr[i], "cable3", desc[i], "Channel %1",
603  14, 123000000, 171000000, 6000000, mod[i]); // 14-22
604  FREQ(modStr[i], "cable4", desc[i], "Channel %1",
605  23, 219000000, 645000000, 6000000, mod[i]); // 23-94
606  FREQ(modStr[i], "cable5", desc[i], "Channel %1",
607  95, 93000000, 117000000, 6000000, mod[i]); // 95-99
608  // The center frequency of any EIA-542 std cable channel over 99 is
609  // Frequency_MHz = ( 6 * ( 8 + channel_designation ) ) + 3
610  FREQ(modStr[i], "cable6", desc[i], "Channel %1",
611  100, 651000000,
612  EIA_542_FREQUENCY(6000000, 3000000, US_MAX_CHAN),
613  6000000, mod[i]); // 100-US_MAX_CHAN
614  FREQ(modStr[i], "cable7", desc[i], "Channel T-%1",
615  7, 8750000, 50750000, 6000000, mod[i]); // T7-14
616 
617  // USA Cable, QAM 256 ch 78 to US_MAX_CHAN
618  FREQ(modStr[i], "cablehigh0", desc[i], "Channel %1",
619  78, 549000000, 645000000, 6000000, mod[i]); // 78-94
620  FREQ(modStr[i], "cablehigh1", desc[i], "Channel %1",
621  100, 651000000,
622  EIA_542_FREQUENCY(6000000, 3000000, US_MAX_CHAN),
623  6000000, mod[i]); // 100-US_MAX_CHAN
624 
625  // USA Cable HRC, ch 1 to US_MAX_CHAN
626  FREQ(modStr[i], "hrc0", desc[i], "HRC %1",
627  1, 73753600, 73753601, 6000300, mod[i]); // 1
628  FREQ(modStr[i], "hrc1", desc[i], "HRC %1",
629  2, 55752700, 67753300, 6000300, mod[i]); // 2-4
630  FREQ(modStr[i], "hrc2", desc[i], "HRC %1",
631  5, 79753900, 85754200, 6000300, mod[i]); // 5-6
632  FREQ(modStr[i], "hrc3", desc[i], "HRC %1",
633  7, 175758700, 211760500, 6000300, mod[i]); // 7-13
634  FREQ(modStr[i], "hrc4", desc[i], "HRC %1",
635  14, 121756000, 169758400, 6000300, mod[i]); // 14-22
636  FREQ(modStr[i], "hrc5", desc[i], "HRC %1",
637  23, 217760800, 643782100, 6000300, mod[i]); // 23-94
638  FREQ(modStr[i], "hrc6", desc[i], "HRC %1",
639  95, 91754500, 115755700, 6000300, mod[i]); // 95-99
640  // The center frequency of any EIA-542 HRC cable channel over 99 is
641  // Frequency_MHz = ( 6.0003 * ( 8 + channel_designation ) ) + 1.75
642  FREQ(modStr[i], "hrc7", desc[i], "HRC %1",
643  100, 649782400,
644  EIA_542_FREQUENCY(6000300, 1750000, US_MAX_CHAN),
645  6000300, mod[i]); // 100-US_MAX_CHAN
646 
647  // USA Cable HRC, ch 76-94 and 100-US_MAX_CHAN
648  // Channels 95-99 are low frequency despite high channel numbers
649  FREQ(modStr[i], "hrchigh0", desc[i], "HRC %1",
650  76, 535776700, 643782100, 6000300, mod[i]); // 76-94
651  FREQ(modStr[i], "hrchigh1", desc[i], "HRC %1",
652  100, 649782400,
653  EIA_542_FREQUENCY(6000300, 1750000, US_MAX_CHAN),
654  6000300, mod[i]); // 100-US_MAX_CHAN
655 
656  // USA Cable IRC, ch 1 to US_MAX_CHAN
657  FREQ(modStr[i], "irc0", desc[i], "IRC %1",
658  1, 75012500, 75012501, 6000000, mod[i]); // 1
659  FREQ(modStr[i], "irc1", desc[i], "IRC %1",
660  2, 57012500, 69012500, 6000000, mod[i]); // 2-4
661  FREQ(modStr[i], "irc2", desc[i], "IRC %1",
662  5, 81012500, 87012500, 6000000, mod[i]); // 5-6
663  FREQ(modStr[i], "irc3", desc[i], "IRC %1",
664  7, 177012500, 213012500, 6000000, mod[i]); // 7-13
665  FREQ(modStr[i], "irc4", desc[i], "IRC %1",
666  14, 123012500, 171012500, 6000000, mod[i]); // 14-22
667  FREQ(modStr[i], "irc5", desc[i], "IRC %1",
668  23, 219012500, 327012500, 6000000, mod[i]); // 23-41
669  FREQ(modStr[i], "irc6", desc[i], "IRC %1",
670  42, 333025000, 333025001, 6000000, mod[i]); // 42
671  FREQ(modStr[i], "irc7", desc[i], "IRC %1",
672  43, 339012500, 645012500, 6000000, mod[i]); // 43-94
673  FREQ(modStr[i], "irc8", desc[i], "IRC %1",
674  95, 93012500, 105012500, 6000000, mod[i]); // 95-97
675  FREQ(modStr[i], "irc9", desc[i], "IRC %1",
676  98, 111025000, 117025000, 6000000, mod[i]); // 98-99
677  // The center frequency of any EIA-542 IRC cable channel over 99 is
678  // Frequency_MHz = ( 6 * ( 8 + channel_designation ) ) + 3.0125
679  FREQ(modStr[i], "irc10", desc[i], "IRC %1",
680  100, 651012500,
681  EIA_542_FREQUENCY(6000000, 3012500, US_MAX_CHAN),
682  6000000, mod[i]); // 100-US_MAX_CHAN
683 
684  // USA Cable IRC, ch 76-94 and 100-125
685  // Channels 95-99 are low frequency despite high channel numbers
686  FREQ(modStr[i], "irchigh0", desc[i], "IRC %1",
687  76, 537012500, 645012500, 6000000, mod[i]); // 76-94
688  FREQ(modStr[i], "irchigh1", desc[i], "IRC %1",
689  100, 651012500,
690  EIA_542_FREQUENCY(6000000, 3012500, US_MAX_CHAN),
691  6000000, mod[i]); // 100-US_MAX_CHAN
692  }
693 
694  // create old school frequency tables...
695  for (struct CHANLISTS *ptr = chanlists; ptr->name ; ptr++)
696  {
697  QString tbl_name = ptr->name;
698  for (uint i = 0; i < (uint)ptr->count; i++)
699  {
700  uint64_t freq = (ptr->list[i].freq * 1000LL) + 1750000;
701  fmap[QString("analog_analog_%1%2").arg(tbl_name).arg(i)] =
702  new FrequencyTable(
703  QString("%1 %2").arg(tbl_name).arg(ptr->list[i].name), i+2,
704  freq, freq + 3000000,
706  }
707  }
708 
709 }
#define US_MAX_CHAN
uint64_t m_symbolrate
Definition: dtvmultiplex.h:95
DTVHierarchy m_hierarchy
DTVCodeRate m_coderateLp
DTVGuardInterval m_guard_interval
Definition: dtvmultiplex.h:102
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.
vector< const FrequencyTable * > freq_table_list_t
QString toString() const
struct CHANLIST * list
Definition: frequencies.h:103
unsigned int uint
Definition: compat.h:140
freq_table_list_t get_matching_freq_tables(const QString &format, const QString &modulation, const QString &country)
QMap< QString, const FrequencyTable * > freq_table_map_t
DTVInversion m_inversion
Definition: dtvmultiplex.h:96
uint32_t freq[4]
Definition: element.c:44
bool teardown_frequency_tables(void)
DTVCodeRate m_lp_code_rate
Low Priority FEC rate.
Definition: dtvmultiplex.h:99
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
DTVCodeRate m_hp_code_rate
High Priority FEC rate.
Definition: dtvmultiplex.h:98
DTVModulation m_modulation
Definition: dtvmultiplex.h:100
struct CHANLISTS chanlists[]
DTVCodeRate m_fecInner
QString toString() const
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)
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)
static void init_freq_tables(freq_table_map_t &)
DTVBandwidth m_bandwidth
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.
DTVChannelInfoList channels
Definition: dtvconfparser.h:68
static freq_table_map_t frequencies
uint offset_cnt() const
static bool frequencies_initialized
QString toString() const
DTVModulationSystem m_mod_sys
Modulation system.
Definition: dtvmultiplex.h:106
#define EIA_542_FREQUENCY(A, B, C)
bool m_scanning
Probably Unnecessary.
DTVMultiplex m_tuning
Tuning info.
uint64_t m_frequency
Definition: dtvmultiplex.h:94
DTVTransmitMode m_trans_mode
Definition: dtvmultiplex.h:101