MythTV  master
channelscanner.cpp
Go to the documentation of this file.
1 /* -*- Mode: c++ -*-
2  * vim: set expandtab tabstop=4 shiftwidth=4:
3  *
4  * Original Project
5  * MythTV http://www.mythtv.org
6  *
7  * Copyright (c) 2004, 2005 John Pullan <john@pullan.org>
8  * Copyright (c) 2005 - 2007 Daniel Kristjansson
9  *
10  * Description:
11  * Collection of classes to provide channel scanning functionallity
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
26  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
27  *
28  */
29 
30 #include <algorithm>
31 
32 #include "cardutil.h"
33 #include "channelscan_sm.h"
34 #include "channelscanner.h"
35 #include "iptvchannelfetcher.h"
38 #include "recorders/asichannel.h"
39 #ifdef USING_DVB // for bug in gcc 8.3
40 #include "recorders/dvbchannel.h"
41 #endif
43 #include "recorders/hdhrchannel.h"
44 #include "recorders/iptvchannel.h"
45 #include "recorders/satipchannel.h"
46 #include "recorders/v4lchannel.h"
47 #include "scanmonitor.h"
48 #include "scanwizardconfig.h"
49 
50 #define LOC QString("ChScan: ")
51 
53 {
55 
56  if (m_scanMonitor)
57  {
59  m_scanMonitor = nullptr;
60  }
61 }
62 
64 {
65  if (m_sigmonScanner)
66  {
67  delete m_sigmonScanner;
68  m_sigmonScanner = nullptr;
69  }
70 
71  if (m_channel)
72  {
73  delete m_channel;
74  m_channel = nullptr;
75  }
76 
77  if (m_iptvScanner)
78  {
80  delete m_iptvScanner;
81  m_iptvScanner = nullptr;
82  }
83 
84 #ifdef USING_VBOX
85  if (m_vboxScanner)
86  {
87  m_vboxScanner->Stop();
88  delete m_vboxScanner;
89  m_vboxScanner = nullptr;
90  }
91 #endif
92 
93 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
94  if (m_externRecScanner)
95  {
96  m_externRecScanner->Stop();
97  delete m_externRecScanner;
98  m_externRecScanner = nullptr;
99  }
100 #endif
101 
102  if (m_scanMonitor)
103  {
105  m_scanMonitor = nullptr;
106  }
107 }
108 
110  int scantype,
111  uint cardid,
112  const QString &inputname,
113  uint sourceid,
114  bool do_ignore_signal_timeout,
115  bool do_follow_nit,
116  bool do_test_decryption,
117  bool do_fta_only,
118  bool do_lcn_only,
119  bool do_complete_only,
120  bool do_full_channel_search,
121  bool do_remove_duplicates,
122  bool do_add_full_ts,
123  ServiceRequirements service_requirements,
124  // Needed for particular scans
125  uint mplexid, // TransportScan
126  const QMap<QString,QString> &startChan, // NITAddScan
127  const QString &freq_std, // FullScan
128  const QString &mod, // FullScan
129  const QString &tbl, // FullScan
130  const QString &tbl_start, // FullScan optional
131  const QString &tbl_end) // FullScan optional
132 {
133  m_freeToAirOnly = do_fta_only;
134  m_channelNumbersOnly = do_lcn_only;
135  m_completeOnly = do_complete_only;
136  m_fullSearch = do_full_channel_search;
137  m_removeDuplicates = do_remove_duplicates;
138  m_addFullTS = do_add_full_ts;
139  m_serviceRequirements = service_requirements;
140  m_sourceid = sourceid;
141 
142  PreScanCommon(scantype, cardid, inputname,
143  sourceid, do_ignore_signal_timeout, do_test_decryption);
144 
145  LOG(VB_CHANSCAN, LOG_INFO, LOC + "Scan()");
146 
147  if (!m_sigmonScanner)
148  {
149  LOG(VB_CHANSCAN, LOG_ERR, LOC + "Scan(): scanner does not exist...");
150  return;
151  }
152 
155 
156  bool ok = false;
157 
158  // "Full Scan"
159  if ((ScanTypeSetting::FullScan_ATSC == scantype) ||
160  (ScanTypeSetting::FullScan_DVBC == scantype) ||
161  (ScanTypeSetting::FullScan_DVBT == scantype) ||
162  (ScanTypeSetting::FullScan_DVBT2 == scantype) ||
163  (ScanTypeSetting::FullScan_Analog == scantype))
164  {
165  LOG(VB_CHANSCAN, LOG_INFO, LOC + QString("ScanTransports(%1, %2, %3)")
166  .arg(freq_std, mod, tbl));
167 
168  // HACK HACK HACK -- begin
169  // if using QAM we may need additional time... (at least with HD-3000)
170  if ((mod.startsWith("qam", Qt::CaseInsensitive)) &&
172  {
174  }
175  // HACK HACK HACK -- end
176 
178 
180  sourceid, freq_std, mod, tbl, tbl_start, tbl_end);
181  }
182  // "Full Scan (Tuned)"
183  else if ((ScanTypeSetting::NITAddScan_DVBT == scantype) ||
184  (ScanTypeSetting::NITAddScan_DVBT2 == scantype) ||
185  (ScanTypeSetting::NITAddScan_DVBS == scantype) ||
186  (ScanTypeSetting::NITAddScan_DVBS2 == scantype) ||
187  (ScanTypeSetting::NITAddScan_DVBC == scantype))
188  {
189  LOG(VB_CHANSCAN, LOG_INFO, LOC + "ScanTransports()");
190 
191  ok = m_sigmonScanner->ScanTransportsStartingOn(sourceid, startChan);
192  }
193  // "Scan of All Existing Transports"
194  else if (ScanTypeSetting::FullTransportScan == scantype)
195  {
196  LOG(VB_CHANSCAN, LOG_INFO, LOC + QString("ScanExistingTransports of source %1")
197  .arg(sourceid));
198 
199  ok = m_sigmonScanner->ScanExistingTransports(sourceid, do_follow_nit);
200  if (ok)
201  {
203  }
204  else
205  {
206  InformUser(tr("Error tuning to transport"));
207  Teardown();
208  }
209  }
210  else if ((ScanTypeSetting::DVBUtilsImport == scantype) && !m_channels.empty())
211  {
212  ok = true;
213 
214  LOG(VB_CHANSCAN, LOG_INFO, LOC +
215  QString("ScanForChannels for source %1").arg(sourceid));
216 
217  QString card_type = CardUtil::GetRawInputType(cardid);
218  QString sub_type = card_type;
219  if (card_type == "DVB")
220  {
221  QString device = CardUtil::GetVideoDevice(cardid);
222 
223  ok = !device.isEmpty();
224  if (ok)
225  sub_type = CardUtil::ProbeDVBType(device).toUpper();
226  }
227 
228  if (ok)
229  {
230  ok = m_sigmonScanner->ScanForChannels(sourceid, freq_std,
231  sub_type, m_channels);
232  }
233  if (ok)
234  {
236  }
237  else
238  {
239  InformUser(tr("Error tuning to transport"));
240  Teardown();
241  }
242  }
243  else if (ScanTypeSetting::IPTVImportMPTS == scantype)
244  {
245  if (m_iptvChannels.empty())
246  {
247  LOG(VB_CHANSCAN, LOG_INFO, LOC + "IPTVImportMPTS: no channels");
248  }
249  else
250  {
251  LOG(VB_CHANSCAN, LOG_INFO, LOC +
252  QString("ScanIPTVChannels(%1) IPTV MPTS").arg(sourceid));
253 
254  if ((ok = m_sigmonScanner->ScanIPTVChannels(sourceid, m_iptvChannels)))
256  else
257  {
258  InformUser(tr("Error scanning MPTS in IPTV"));
259  Teardown();
260  }
261  }
262  }
263  else if (ScanTypeSetting::TransportScan == scantype)
264  {
265  LOG(VB_CHANSCAN, LOG_INFO, LOC +
266  QString("ScanTransport(%1)").arg(mplexid));
267 
268  ok = m_sigmonScanner->ScanTransport(mplexid, do_follow_nit);
269  }
270  else if (ScanTypeSetting::CurrentTransportScan == scantype)
271  {
272  QString sistandard = "mpeg";
273  LOG(VB_CHANSCAN, LOG_INFO, LOC +
274  "ScanCurrentTransport(" + sistandard + ")");
275  ok = m_sigmonScanner->ScanCurrentTransport(sistandard);
276  }
277  else if (ScanTypeSetting::ExternRecImport == scantype)
278  {
279  LOG(VB_CHANSCAN, LOG_INFO, LOC +
280  "Importing channels from External Recorder");
281  ok = ImportExternRecorder(cardid, inputname, sourceid);
282  }
283 
284  if (!ok)
285  {
286  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to handle tune complete.");
287  InformUser(tr("Programmer Error: "
288  "Failed to handle tune complete."));
289  }
290 }
291 
293  uint sourceid, int cardtype, const QString &file)
294 {
295  m_sourceid = sourceid;
296  m_channels.clear();
297 
299  type = ((CardUtil::DVBT == cardtype) ||
300  (CardUtil::DVBT2 == cardtype)) ? DTVConfParser::OFDM : type;
301  type = (CardUtil::QPSK == cardtype) ? DTVConfParser::QPSK : type;
302  type = (CardUtil::DVBC == cardtype) ? DTVConfParser::QAM : type;
303  type = (CardUtil::DVBS2 == cardtype) ? DTVConfParser::DVBS2 : type;
304  type = ((CardUtil::ATSC == cardtype) ||
305  (CardUtil::HDHOMERUN == cardtype)) ? DTVConfParser::ATSC : type;
306 
310  else
311  {
312  DTVConfParser parser(type, sourceid, file);
313 
314  ret = parser.Parse();
315  if (DTVConfParser::OK == ret)
316  m_channels = parser.GetChannels();
317  }
318 
319  if (DTVConfParser::OK != ret)
320  {
321  QString msg = (DTVConfParser::ERROR_PARSE == ret) ?
322  tr("Failed to parse '%1'").arg(file) :
324  tr("Programmer Error : incorrect card type") :
325  tr("Failed to open '%1'").arg(file));
326 
327  InformUser(msg);
328  }
329 
330  return ret;
331 }
332 
333 bool ChannelScanner::ImportM3U([[maybe_unused]] uint cardid,
334  [[maybe_unused]] const QString &inputname,
335  uint sourceid,
336  bool is_mpts)
337 {
338  m_sourceid = sourceid;
339 
340  if (!m_scanMonitor)
341  m_scanMonitor = new ScanMonitor(this);
342 
343  // Create an IPTV scan object
344  m_iptvScanner = new IPTVChannelFetcher(cardid, inputname, sourceid,
345  is_mpts, m_scanMonitor);
346 
347  MonitorProgress(false, false, false, false);
348 
349  m_iptvScanner->Scan();
350 
351  if (is_mpts)
353 
354  return true;
355 }
356 
357 bool ChannelScanner::ImportVBox([[maybe_unused]] uint cardid,
358  [[maybe_unused]] const QString &inputname,
359  uint sourceid,
360  [[maybe_unused]] bool ftaOnly,
361  [[maybe_unused]] ServiceRequirements serviceType)
362 {
363  m_sourceid = sourceid;
364 #ifdef USING_VBOX
365  if (!m_scanMonitor)
366  m_scanMonitor = new ScanMonitor(this);
367 
368  // Create a VBox scan object
369  m_vboxScanner = new VBoxChannelFetcher(cardid, inputname, sourceid, ftaOnly, serviceType, m_scanMonitor);
370 
371  MonitorProgress(false, false, false, false);
372 
373  m_vboxScanner->Scan();
374 
375  return true;
376 #else
377  return false;
378 #endif
379 }
380 
381 bool ChannelScanner::ImportExternRecorder([[maybe_unused]] uint cardid,
382  [[maybe_unused]] const QString &inputname,
383  uint sourceid)
384 {
385  m_sourceid = sourceid;
386 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
387  if (!m_scanMonitor)
388  m_scanMonitor = new ScanMonitor(this);
389 
390  // Create a External Recorder Channel Fetcher
391  m_externRecScanner = new ExternRecChannelScanner(cardid,
392  inputname,
393  sourceid,
394  m_scanMonitor);
395 
396  MonitorProgress(false, false, false, false);
397 
398  m_externRecScanner->Scan();
399 
400  return true;
401 #else
402  return false;
403 #endif
404 }
405 
406 bool ChannelScanner::ImportHDHR([[maybe_unused]] uint cardid,
407  [[maybe_unused]] const QString &inputname,
408  uint sourceid,
409  [[maybe_unused]] ServiceRequirements serviceType)
410 {
411  m_sourceid = sourceid;
412 #ifdef USING_HDHOMERUN
413  if (!m_scanMonitor)
414  m_scanMonitor = new ScanMonitor(this);
415 
416  // Create a HDHomeRun scan object
417  m_hdhrScanner = new HDHRChannelFetcher(cardid, inputname, sourceid, serviceType, m_scanMonitor);
418 
419  MonitorProgress(false, false, false, false);
420 
421  m_hdhrScanner->Scan();
422 
423  return true;
424 #else
425  return false;
426 #endif
427 }
428 
430  int scantype,
431  uint cardid,
432  const QString &inputname,
433  uint sourceid,
434  [[maybe_unused]] bool do_ignore_signal_timeout,
435  bool do_test_decryption)
436 {
437  bool monitor_snr = false;
438  std::chrono::milliseconds signal_timeout = 1s;
439  std::chrono::milliseconds channel_timeout = 40s;
440  CardUtil::GetTimeouts(cardid, signal_timeout, channel_timeout);
441 
442  QString device = CardUtil::GetVideoDevice(cardid);
443  if (device.isEmpty())
444  {
445  LOG(VB_GENERAL, LOG_ERR, LOC + "No Device");
446  InformUser(tr("Programmer Error: No Device"));
447  return;
448  }
449 
450  if (!m_scanMonitor)
451  m_scanMonitor = new ScanMonitor(this);
452 
453  QString card_type = CardUtil::GetRawInputType(cardid);
454 
455 #ifdef USING_DVB
456  if ("DVB" == card_type)
457  {
458  QString sub_type = CardUtil::ProbeDVBType(device).toUpper();
459  bool need_nit = (("QAM" == sub_type) ||
460  ("QPSK" == sub_type) ||
461  ("OFDM" == sub_type) ||
462  ("DVB_T2" == sub_type));
463 
464  // Ugh, Some DVB drivers don't fully support signal monitoring...
465  if ((ScanTypeSetting::TransportScan == scantype) ||
467  {
468  signal_timeout = (do_ignore_signal_timeout) ?
469  channel_timeout * 10 : signal_timeout;
470  }
471 
472  // ensure a minimal signal timeout of 1 second
473  signal_timeout = std::max(signal_timeout, 1000ms);
474 
475  // Make sure that channel_timeout is at least 7 seconds to catch
476  // at least one SDT section. kDVBTableTimeout in ChannelScanSM
477  // ensures that we catch the NIT then.
478  channel_timeout = std::max(channel_timeout, static_cast<int>(need_nit) * 7 * 1000ms);
479 
480  m_channel = new DVBChannel(device);
481  }
482 #endif
483 
484 #ifdef USING_V4L2
485  if (("V4L" == card_type) || ("MPEG" == card_type))
486  m_channel = new V4LChannel(nullptr, device);
487 #endif
488 
489 #ifdef USING_HDHOMERUN
490  if ("HDHOMERUN" == card_type)
491  {
492  m_channel = new HDHRChannel(nullptr, device);
493  monitor_snr = true;
494  }
495 #endif // USING_HDHOMERUN
496 
497 #ifdef USING_SATIP
498  if ("SATIP" == card_type)
499  {
500  m_channel = new SatIPChannel(nullptr, device);
501  }
502 #endif
503 
504 #ifdef USING_ASI
505  if ("ASI" == card_type)
506  {
507  m_channel = new ASIChannel(nullptr, device);
508  }
509 #endif // USING_ASI
510 
511 #ifdef USING_IPTV
512  if ("FREEBOX" == card_type)
513  {
514  m_channel = new IPTVChannel(nullptr, device);
515  }
516 #endif
517 
518 #ifdef USING_VBOX
519  if ("VBOX" == card_type)
520  {
521  m_channel = new IPTVChannel(nullptr, device);
522  }
523 #endif
524 
525 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
526  if ("EXTERNAL" == card_type)
527  {
528  m_channel = new ExternalChannel(nullptr, device);
529  }
530 #endif
531 
532  if (!m_channel)
533  {
534  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel not created");
535  InformUser(tr("Programmer Error: Channel not created"));
536  return;
537  }
538 
539  // Explicitly set the cardid
540  m_channel->SetInputID(cardid);
541 
542  // If the backend is running this may fail...
543  if (!m_channel->Open())
544  {
545  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel could not be opened");
546  InformUser(tr("Channel could not be opened."));
547  return;
548  }
549 
550  ScanMonitor *lis = m_scanMonitor;
551 
552  m_sigmonScanner = new ChannelScanSM(lis, card_type, m_channel,
553  sourceid, signal_timeout, channel_timeout,
554  inputname, do_test_decryption);
555 
556  // If we know the channel types we can give the signal monitor a hint.
557  // Since we unfortunately do not record this info in the DB, we cannot
558  // do this for the other scan types and have to guess later on...
559  switch (scantype)
560  {
563  break;
566  break;
569  break;
572  break;
575  break;
578  break;
581  break;
584  break;
587  break;
588  default:
589  break;
590  }
591 
592  // Signal Meters are connected here
594  if (mon)
595  mon->AddListener(lis);
596 
597  bool using_rotor = false;
598 
599 #ifdef USING_DVB
601  if (dvbm && mon)
602  {
603  monitor_snr = true;
605  }
606 #endif // USING_DVB
607 
608  bool monitor_lock = mon != nullptr;
609  bool monitor_strength = mon != nullptr;
610  MonitorProgress(monitor_lock, monitor_strength, monitor_snr, using_rotor);
611 }
ChannelScanner::ImportVBox
virtual bool ImportVBox(uint cardid, const QString &inputname, uint sourceid, bool ftaOnly, ServiceRequirements serviceType)
Definition: channelscanner.cpp:357
DTVConfParser::ERROR_CARDTYPE
@ ERROR_CARDTYPE
Definition: dtvconfparser.h:76
ChannelScanner::m_channel
ChannelBase * m_channel
Definition: channelscanner.h:128
analogsignalmonitor.h
DTVTunerType::kTunerTypeDVBC
static const int kTunerTypeDVBC
Definition: dtvconfparserhelpers.h:95
DTVConfParser::cardtype_t
cardtype_t
Definition: dtvconfparser.h:77
ChannelScanner::~ChannelScanner
virtual ~ChannelScanner()
Definition: channelscanner.cpp:52
ChannelScanner::m_hdhrScanner
HDHRChannelFetcher * m_hdhrScanner
Definition: channelscanner.h:147
ScanTypeSetting::FullTransportScan
@ FullTransportScan
Definition: scanwizardconfig.h:90
ScanTypeSetting::FullScan_DVBT
@ FullScan_DVBT
Definition: scanwizardconfig.h:80
ChannelBase::Open
virtual bool Open(void)=0
Opens the channel changing hardware for use.
CardUtil::DVBT2
@ DVBT2
Definition: cardutil.h:71
ChannelScanner::m_channels
DTVChannelList m_channels
imported channels
Definition: channelscanner.h:135
ScanTypeSetting::DVBUtilsImport
@ DVBUtilsImport
Definition: scanwizardconfig.h:100
DTVTunerType::kTunerTypeDVBS1
static const int kTunerTypeDVBS1
Definition: dtvconfparserhelpers.h:93
VBoxChannelFetcher
Definition: vboxchannelfetcher.h:64
ScanTypeSetting::NITAddScan_DVBS
@ NITAddScan_DVBS
Definition: scanwizardconfig.h:86
channelscan_sm.h
ScanMonitor::ScanPercentComplete
void ScanPercentComplete(int pct)
Definition: scanmonitor.cpp:103
DVBSignalMonitor
Definition: dvbsignalmonitor.h:17
DTVConfParser::ATSC
@ ATSC
Definition: dtvconfparser.h:77
scanwizardconfig.h
ChannelScanner::m_iptvChannels
fbox_chan_map_t m_iptvChannels
Definition: channelscanner.h:136
ChannelScanSM::SetAnalog
void SetAnalog(bool is_analog)
Definition: channelscan_sm.cpp:251
ScanTypeSetting::FullScan_ATSC
@ FullScan_ATSC
Definition: scanwizardconfig.h:78
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
ChannelScanner::m_removeDuplicates
bool m_removeDuplicates
Remove duplicate transports and channels?
Definition: channelscanner.h:163
build_compdb.parser
parser
Definition: build_compdb.py:7
IPTVChannelFetcher::Scan
void Scan(void)
Scans the given frequency list.
Definition: iptvchannelfetcher.cpp:86
build_compdb.file
file
Definition: build_compdb.py:55
DTVConfParser::QAM
@ QAM
Definition: dtvconfparser.h:77
satipchannel.h
dvbchannel.h
ScanMonitor::deleteLater
virtual void deleteLater(void)
Definition: scanmonitor.cpp:91
HDHRChannel
Definition: hdhrchannel.h:20
channelscanner.h
ChannelScanSM::ScanTransports
bool ScanTransports(int SourceID, const QString &std, const QString &mod, const QString &country, const QString &table_start=QString(), const QString &table_end=QString())
Generates a list of frequencies to scan and adds it to the scanTransport list, and then sets the scan...
Definition: channelscan_sm.cpp:2299
CardUtil::ProbeDVBType
static QString ProbeDVBType(const QString &device)
Definition: cardutil.cpp:723
SatIPChannel
Definition: satipchannel.h:12
ChannelScanSM::StartScanner
void StartScanner(void)
Starts the ChannelScanSM event loop.
Definition: channelscan_sm.cpp:1980
ChannelScanner::m_freeToAirOnly
bool m_freeToAirOnly
Only fta channels desired post scan?
Definition: channelscanner.h:151
DTVConfParser::DVBS2
@ DVBS2
Definition: dtvconfparser.h:77
CardUtil::DVBS2
@ DVBS2
Definition: cardutil.h:64
scanmonitor.h
ExternRecChannelScanner
Definition: externrecscanner.h:22
CardUtil::QPSK
@ QPSK
Definition: cardutil.h:54
ScanTypeSetting::NITAddScan_DVBT
@ NITAddScan_DVBT
Definition: scanwizardconfig.h:84
IPTVChannelFetcher::Stop
void Stop(void)
Stops the scanning thread running.
Definition: iptvchannelfetcher.cpp:58
dvbsignalmonitor.h
SignalMonitor::kDVBSigMon_WaitForPos
static const uint64_t kDVBSigMon_WaitForPos
Wait for rotor to complete turning the antenna.
Definition: signalmonitor.h:200
HDHRChannelFetcher
Definition: hdhrchannelfetcher.h:92
ChannelScanner::m_sigmonScanner
ChannelScanSM * m_sigmonScanner
Definition: channelscanner.h:131
HDHRChannelFetcher::Scan
void Scan(void)
Definition: hdhrchannelfetcher.cpp:299
ChannelScanner::m_sourceid
int m_sourceid
Definition: channelscanner.h:168
ChannelScanner::Scan
void Scan(int scantype, uint cardid, const QString &inputname, uint sourceid, bool do_ignore_signal_timeout, bool do_follow_nit, bool do_test_decryption, bool do_fta_only, bool do_lcn_only, bool do_complete_only, bool do_full_channel_search, bool do_remove_duplicates, bool do_add_full_ts, ServiceRequirements service_requirements, uint mplexid, const QMap< QString, QString > &startChan, const QString &freq_std, const QString &mod, const QString &tbl, const QString &tbl_start=QString(), const QString &tbl_end=QString())
Definition: channelscanner.cpp:109
ScanTypeSetting::FullScan_Analog
@ FullScan_Analog
Definition: scanwizardconfig.h:77
v4lchannel.h
IPTVChannelFetcher
Definition: iptvchannelfetcher.h:64
ScanTypeSetting::IPTVImportMPTS
@ IPTVImportMPTS
Definition: scanwizardconfig.h:98
DTVConfParser
Parses dvb-utils channel scanner output files.
Definition: dtvconfparser.h:73
ChannelScanner::ImportHDHR
virtual bool ImportHDHR(uint cardid, const QString &inputname, uint sourceid, ServiceRequirements serviceType)
Definition: channelscanner.cpp:406
CardUtil::HDHOMERUN
@ HDHOMERUN
Definition: cardutil.h:61
DTVConfParser::OK
@ OK
Definition: dtvconfparser.h:76
DTVConfParser::UNKNOWN
@ UNKNOWN
Definition: dtvconfparser.h:77
ScanTypeSetting::FullScan_DVBC
@ FullScan_DVBC
Definition: scanwizardconfig.h:79
ChannelScanner::m_fullSearch
bool m_fullSearch
Extended search for old channels post scan?
Definition: channelscanner.h:160
ChannelScanner::Teardown
virtual void Teardown(void)
Definition: channelscanner.cpp:63
IPTVChannel
Definition: iptvchannel.h:24
ScanTypeSetting::NITAddScan_DVBT2
@ NITAddScan_DVBT2
Definition: scanwizardconfig.h:85
ChannelScanSM::SetSignalTimeout
void SetSignalTimeout(std::chrono::milliseconds val)
Definition: channelscan_sm.h:121
ScanTypeSetting::NITAddScan_DVBC
@ NITAddScan_DVBC
Definition: scanwizardconfig.h:88
ChannelScanSM::GetSignalTimeout
std::chrono::milliseconds GetSignalTimeout(void) const
Definition: channelscan_sm.h:126
DTVConfParser::ERROR_PARSE
@ ERROR_PARSE
Definition: dtvconfparser.h:76
ChannelScanner::InformUser
virtual void InformUser(const QString &)=0
ChannelScanSM
Scanning class for cards that support a SignalMonitor class.
Definition: channelscan_sm.h:86
uint
unsigned int uint
Definition: compat.h:81
ExternalChannel
-*- Mode: c++ -*-
Definition: ExternalChannel.h:20
CardUtil::GetTimeouts
static bool GetTimeouts(uint inputid, std::chrono::milliseconds &signal_timeout, std::chrono::milliseconds &channel_timeout)
Definition: cardutil.cpp:2282
ScanTypeSetting::CurrentTransportScan
@ CurrentTransportScan
Scans the transport when there is no tuner (for ASI)
Definition: scanwizardconfig.h:94
CardUtil::DVBC
@ DVBC
Definition: cardutil.h:55
ChannelScanSM::GetDVBSignalMonitor
DVBSignalMonitor * GetDVBSignalMonitor(void)
Definition: channelscan_sm.cpp:1922
DTVConfParser::OFDM
@ OFDM
Definition: dtvconfparser.h:77
ChannelScanner::m_channelNumbersOnly
bool m_channelNumbersOnly
Only channels with logical channel numbers desired post scan?
Definition: channelscanner.h:154
SignalMonitor
Signal monitoring base class.
Definition: signalmonitor.h:32
asichannel.h
ChannelScanner::m_iptvScanner
IPTVChannelFetcher * m_iptvScanner
Definition: channelscanner.h:132
DTVConfParser::QPSK
@ QPSK
Definition: dtvconfparser.h:77
ChannelScanner::m_addFullTS
bool m_addFullTS
Add MPTS "full transport stream" channels.
Definition: channelscanner.h:166
DTVTunerType::kTunerTypeDVBS2
static const int kTunerTypeDVBS2
Definition: dtvconfparserhelpers.h:94
ChannelScanSM::ScanIPTVChannels
bool ScanIPTVChannels(uint sourceid, const fbox_chan_map_t &iptv_channels)
Definition: channelscan_sm.cpp:2430
ScanTypeSetting::TransportScan
@ TransportScan
Definition: scanwizardconfig.h:92
iptvchannel.h
CardUtil::GetRawInputType
static QString GetRawInputType(uint inputid)
Definition: cardutil.h:292
LOC
#define LOC
Definition: channelscanner.cpp:50
ChannelScanner::ImportDVBUtils
virtual DTVConfParser::return_t ImportDVBUtils(uint sourceid, int cardtype, const QString &file)
Definition: channelscanner.cpp:292
DVBChannel
Provides interface to the tuning hardware when using DVB drivers.
Definition: dvbchannel.h:31
ChannelScanner::ScanMonitor
friend class ScanMonitor
Definition: channelscanner.h:70
ChannelScanner::m_serviceRequirements
ServiceRequirements m_serviceRequirements
Services desired post scan.
Definition: channelscanner.h:171
SignalMonitor::HasFlags
bool HasFlags(uint64_t _flags) const
Definition: signalmonitor.cpp:275
ChannelScanner::m_scanMonitor
ScanMonitor * m_scanMonitor
Definition: channelscanner.h:127
ChannelBase::SetInputID
void SetInputID(uint _inputid)
Definition: channelbase.h:101
ChannelScanner::PreScanCommon
virtual void PreScanCommon(int scantype, uint cardid, const QString &inputname, uint sourceid, bool do_ignore_signal_timeout, bool do_test_decryption)
Definition: channelscanner.cpp:429
ASIChannel
-*- Mode: c++ -*-
Definition: asichannel.h:14
SignalMonitor::AddListener
void AddListener(SignalMonitorListener *listener)
Definition: signalmonitor.cpp:385
cardutil.h
ExternalChannel.h
ScanTypeSetting::ExternRecImport
@ ExternRecImport
Definition: scanwizardconfig.h:106
ChannelScanSM::ScanCurrentTransport
bool ScanCurrentTransport(const QString &sistandard)
Definition: channelscan_sm.cpp:2621
DTVTunerType::kTunerTypeATSC
static const int kTunerTypeATSC
Definition: dtvconfparserhelpers.h:98
IPTVChannelFetcher::GetChannels
fbox_chan_map_t GetChannels(void)
Definition: iptvchannelfetcher.cpp:75
DTVConfParser::return_t
return_t
Definition: dtvconfparser.h:76
DTVTunerType::kTunerTypeDVBT
static const int kTunerTypeDVBT
Definition: dtvconfparserhelpers.h:96
ChannelScanner::MonitorProgress
virtual void MonitorProgress(bool, bool, bool, bool)
Definition: channelscanner.h:120
CardUtil::ATSC
@ ATSC
Definition: cardutil.h:57
ChannelScanSM::ScanTransportsStartingOn
bool ScanTransportsStartingOn(int sourceid, const QMap< QString, QString > &startChan)
Generates a list of frequencies to scan and adds it to the scanTransport list, and then sets the scan...
Definition: channelscan_sm.cpp:2469
ScanMonitor::ScanUpdateStatusText
void ScanUpdateStatusText(const QString &status)
Definition: scanmonitor.cpp:114
hdhrchannel.h
ServiceRequirements
ServiceRequirements
Definition: channelscantypes.h:4
DTVTunerType::kTunerTypeDVBT2
static const int kTunerTypeDVBT2
Definition: dtvconfparserhelpers.h:97
ChannelScanSM::ScanTransport
bool ScanTransport(uint mplexid, bool follow_nit)
Definition: channelscan_sm.cpp:2599
V4LChannel
Implements tuning for TV cards using the V4L driver API, both versions 1 and 2.
Definition: v4lchannel.h:30
ChannelScanSM::SetScanDTVTunerType
void SetScanDTVTunerType(DTVTunerType t)
Definition: channelscan_sm.h:123
ChannelScanSM::ScanExistingTransports
bool ScanExistingTransports(uint sourceid, bool follow_nit)
If we are not already scanning a frequency table, this creates a new frequency table from database an...
Definition: channelscan_sm.cpp:326
iptvchannelfetcher.h
ScanTypeSetting::NITAddScan_DVBS2
@ NITAddScan_DVBS2
Definition: scanwizardconfig.h:87
ScanTypeSetting::FullScan_DVBT2
@ FullScan_DVBT2
Definition: scanwizardconfig.h:81
ChannelScanner::ImportM3U
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
Definition: channelscanner.cpp:333
ScanMonitor
Definition: scanmonitor.h:44
ChannelScanner::m_completeOnly
bool m_completeOnly
Only complete channels desired post scan?
Definition: channelscanner.h:157
CardUtil::DVBT
@ DVBT
Definition: cardutil.h:56
CardUtil::GetVideoDevice
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:294
ChannelScanSM::ScanForChannels
bool ScanForChannels(uint sourceid, const QString &std, const QString &cardtype, const DTVChannelList &channels)
Definition: channelscan_sm.cpp:2390
ChannelScanSM::GetSignalMonitor
SignalMonitor * GetSignalMonitor(void)
Definition: channelscan_sm.h:129
ChannelScanner::ImportExternRecorder
virtual bool ImportExternRecorder(uint cardid, const QString &inputname, uint sourceid)
Definition: channelscanner.cpp:381