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 "analogsignalmonitor.h"
33 #include "iptvchannelfetcher.h"
34 #include "dvbsignalmonitor.h"
35 #include "scanwizardconfig.h"
36 #include "channelscan_sm.h"
37 #include "channelscanner.h"
38 #include "hdhrchannel.h"
39 #include "scanmonitor.h"
40 #include "asichannel.h"
41 #ifdef USING_DVB // for bug in gcc 8.3
42 #include "dvbchannel.h"
43 #endif
44 #include "v4lchannel.h"
45 #include "iptvchannel.h"
46 #include "ExternalChannel.h"
47 #include "cardutil.h"
48 #include "satipchannel.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 
109 // full scan of existing transports broken
110 // existing transport scan broken
112  int scantype,
113  uint cardid,
114  const QString &inputname,
115  uint sourceid,
116  bool do_ignore_signal_timeout,
117  bool do_follow_nit,
118  bool do_test_decryption,
119  bool do_fta_only,
120  bool do_lcn_only,
121  bool do_complete_only,
122  bool do_full_channel_search,
123  bool do_remove_duplicates,
124  bool do_add_full_ts,
125  ServiceRequirements service_requirements,
126  // Needed for particular scans
127  uint mplexid, // TransportScan
128  const QMap<QString,QString> &startChan, // NITAddScan
129  const QString &freq_std, // FullScan
130  const QString &mod, // FullScan
131  const QString &tbl, // FullScan
132  const QString &tbl_start, // FullScan optional
133  const QString &tbl_end) // FullScan optional
134 {
135  m_freeToAirOnly = do_fta_only;
136  m_channelNumbersOnly = do_lcn_only;
137  m_completeOnly = do_complete_only;
138  m_fullSearch = do_full_channel_search;
139  m_removeDuplicates = do_remove_duplicates;
140  m_addFullTS = do_add_full_ts;
141  m_serviceRequirements = service_requirements;
142  m_sourceid = sourceid;
143 
144  PreScanCommon(scantype, cardid, inputname,
145  sourceid, do_ignore_signal_timeout, do_test_decryption);
146 
147  LOG(VB_CHANSCAN, LOG_INFO, LOC + "Scan()");
148 
149  if (!m_sigmonScanner)
150  {
151  LOG(VB_CHANSCAN, LOG_ERR, LOC + "Scan(): scanner does not exist...");
152  return;
153  }
154 
157 
158  bool ok = false;
159 
160  // "Full Scan"
161  if ((ScanTypeSetting::FullScan_ATSC == scantype) ||
162  (ScanTypeSetting::FullScan_DVBC == scantype) ||
163  (ScanTypeSetting::FullScan_DVBT == scantype) ||
164  (ScanTypeSetting::FullScan_DVBT2 == scantype) ||
165  (ScanTypeSetting::FullScan_Analog == scantype))
166  {
167  LOG(VB_CHANSCAN, LOG_INFO, LOC + QString("ScanTransports(%1, %2, %3)")
168  .arg(freq_std).arg(mod).arg(tbl));
169 
170  // HACK HACK HACK -- begin
171  // if using QAM we may need additional time... (at least with HD-3000)
172  if ((mod.startsWith("qam", Qt::CaseInsensitive)) &&
174  {
176  }
177  // HACK HACK HACK -- end
178 
180 
182  sourceid, freq_std, mod, tbl, tbl_start, tbl_end);
183  }
184  // "Full Scan (Tuned)"
185  else if ((ScanTypeSetting::NITAddScan_DVBT == scantype) ||
186  (ScanTypeSetting::NITAddScan_DVBT2 == scantype) ||
187  (ScanTypeSetting::NITAddScan_DVBS == scantype) ||
188  (ScanTypeSetting::NITAddScan_DVBS2 == scantype) ||
189  (ScanTypeSetting::NITAddScan_DVBC == scantype))
190  {
191  LOG(VB_CHANSCAN, LOG_INFO, LOC + "ScanTransports()");
192 
193  ok = m_sigmonScanner->ScanTransportsStartingOn(sourceid, startChan);
194  }
195  // "Scan of All Existing Transports"
196  else if (ScanTypeSetting::FullTransportScan == scantype)
197  {
198  LOG(VB_CHANSCAN, LOG_INFO, LOC + QString("ScanExistingTransports of source %1")
199  .arg(sourceid));
200 
201  ok = m_sigmonScanner->ScanExistingTransports(sourceid, do_follow_nit);
202  if (ok)
203  {
205  }
206  else
207  {
208  InformUser(tr("Error tuning to transport"));
209  Teardown();
210  }
211  }
212  else if ((ScanTypeSetting::DVBUtilsImport == scantype) && !m_channels.empty())
213  {
214  ok = true;
215 
216  LOG(VB_CHANSCAN, LOG_INFO, LOC +
217  QString("ScanForChannels for source %1").arg(sourceid));
218 
219  QString card_type = CardUtil::GetRawInputType(cardid);
220  QString sub_type = card_type;
221  if (card_type == "DVB")
222  {
223  QString device = CardUtil::GetVideoDevice(cardid);
224 
225  ok = !device.isEmpty();
226  if (ok)
227  sub_type = CardUtil::ProbeDVBType(device).toUpper();
228  }
229 
230  if (ok)
231  {
232  ok = m_sigmonScanner->ScanForChannels(sourceid, freq_std,
233  sub_type, m_channels);
234  }
235  if (ok)
236  {
238  }
239  else
240  {
241  InformUser(tr("Error tuning to transport"));
242  Teardown();
243  }
244  }
245  else if (ScanTypeSetting::IPTVImportMPTS == scantype)
246  {
247  if (m_iptvChannels.empty())
248  {
249  LOG(VB_CHANSCAN, LOG_INFO, LOC + "IPTVImportMPTS: no channels");
250  }
251  else
252  {
253  LOG(VB_CHANSCAN, LOG_INFO, LOC +
254  QString("ScanIPTVChannels(%1) IPTV MPTS").arg(sourceid));
255 
256  if ((ok = m_sigmonScanner->ScanIPTVChannels(sourceid, m_iptvChannels)))
258  else
259  {
260  InformUser(tr("Error scanning MPTS in IPTV"));
261  Teardown();
262  }
263  }
264  }
265  else if (ScanTypeSetting::TransportScan == scantype)
266  {
267  LOG(VB_CHANSCAN, LOG_INFO, LOC +
268  QString("ScanTransport(%1)").arg(mplexid));
269 
270  ok = m_sigmonScanner->ScanTransport(mplexid, do_follow_nit);
271  }
272  else if (ScanTypeSetting::CurrentTransportScan == scantype)
273  {
274  QString sistandard = "mpeg";
275  LOG(VB_CHANSCAN, LOG_INFO, LOC +
276  "ScanCurrentTransport(" + sistandard + ")");
277  ok = m_sigmonScanner->ScanCurrentTransport(sistandard);
278  }
279  else if (ScanTypeSetting::ExternRecImport == scantype)
280  {
281  LOG(VB_CHANSCAN, LOG_INFO, LOC +
282  "Importing channels from External Recorder");
283  ok = ImportExternRecorder(cardid, inputname, sourceid);
284  }
285 
286  if (!ok)
287  {
288  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to handle tune complete.");
289  InformUser(tr("Programmer Error: "
290  "Failed to handle tune complete."));
291  }
292 }
293 
295  uint sourceid, int cardtype, const QString &file)
296 {
297  m_sourceid = sourceid;
298  m_channels.clear();
299 
301  type = ((CardUtil::DVBT == cardtype) ||
302  (CardUtil::DVBT2 == cardtype)) ? DTVConfParser::OFDM : type;
303  type = (CardUtil::QPSK == cardtype) ? DTVConfParser::QPSK : type;
304  type = (CardUtil::DVBC == cardtype) ? DTVConfParser::QAM : type;
305  type = (CardUtil::DVBS2 == cardtype) ? DTVConfParser::DVBS2 : type;
306  type = ((CardUtil::ATSC == cardtype) ||
307  (CardUtil::HDHOMERUN == cardtype)) ? DTVConfParser::ATSC : type;
308 
312  else
313  {
314  DTVConfParser parser(type, sourceid, file);
315 
316  ret = parser.Parse();
317  if (DTVConfParser::OK == ret)
318  m_channels = parser.GetChannels();
319  }
320 
321  if (DTVConfParser::OK != ret)
322  {
323  QString msg = (DTVConfParser::ERROR_PARSE == ret) ?
324  tr("Failed to parse '%1'").arg(file) :
326  tr("Programmer Error : incorrect card type") :
327  tr("Failed to open '%1'").arg(file));
328 
329  InformUser(msg);
330  }
331 
332  return ret;
333 }
334 
335 bool ChannelScanner::ImportM3U(uint cardid, const QString &inputname,
336  uint sourceid, bool is_mpts)
337 {
338  (void) cardid;
339  (void) inputname;
340  m_sourceid = sourceid;
341 
342  if (!m_scanMonitor)
343  m_scanMonitor = new ScanMonitor(this);
344 
345  // Create an IPTV scan object
346  m_iptvScanner = new IPTVChannelFetcher(cardid, inputname, sourceid,
347  is_mpts, m_scanMonitor);
348 
349  MonitorProgress(false, false, false, false);
350 
351  m_iptvScanner->Scan();
352 
353  if (is_mpts)
355 
356  return true;
357 }
358 
359 bool ChannelScanner::ImportVBox(uint cardid, const QString &inputname, uint sourceid,
360  bool ftaOnly, ServiceRequirements serviceType)
361 {
362  m_sourceid = sourceid;
363 #ifdef USING_VBOX
364  if (!m_scanMonitor)
365  m_scanMonitor = new ScanMonitor(this);
366 
367  // Create a VBox scan object
368  m_vboxScanner = new VBoxChannelFetcher(cardid, inputname, sourceid, ftaOnly, serviceType, m_scanMonitor);
369 
370  MonitorProgress(false, false, false, false);
371 
372  m_vboxScanner->Scan();
373 
374  return true;
375 #else
376  (void) cardid;
377  (void) inputname;
378  return false;
379 #endif
380 }
381 
382 bool ChannelScanner::ImportExternRecorder(uint cardid, 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  (void) cardid;
403  (void) inputname;
404 
405  return false;
406 #endif
407 }
408 
410  int scantype,
411  uint cardid,
412  const QString &inputname,
413  uint sourceid,
414  bool do_ignore_signal_timeout,
415  bool do_test_decryption)
416 {
417  bool monitor_snr = false;
418  std::chrono::milliseconds signal_timeout = 1s;
419  std::chrono::milliseconds channel_timeout = 40s;
420  CardUtil::GetTimeouts(cardid, signal_timeout, channel_timeout);
421 
422  QString device = CardUtil::GetVideoDevice(cardid);
423  if (device.isEmpty())
424  {
425  LOG(VB_GENERAL, LOG_ERR, LOC + "No Device");
426  InformUser(tr("Programmer Error: No Device"));
427  return;
428  }
429 
430  if (!m_scanMonitor)
431  m_scanMonitor = new ScanMonitor(this);
432 
433  QString card_type = CardUtil::GetRawInputType(cardid);
434 
435 #ifdef USING_DVB
436  if ("DVB" == card_type)
437  {
438  QString sub_type = CardUtil::ProbeDVBType(device).toUpper();
439  bool need_nit = (("QAM" == sub_type) ||
440  ("QPSK" == sub_type) ||
441  ("OFDM" == sub_type) ||
442  ("DVB_T2" == sub_type));
443 
444  // Ugh, Some DVB drivers don't fully support signal monitoring...
445  if ((ScanTypeSetting::TransportScan == scantype) ||
447  {
448  signal_timeout = (do_ignore_signal_timeout) ?
449  channel_timeout * 10 : signal_timeout;
450  }
451 
452  // ensure a minimal signal timeout of 1 second
453  signal_timeout = std::max(signal_timeout, 1000ms);
454 
455  // Make sure that channel_timeout is at least 7 seconds to catch
456  // at least one SDT section. kDVBTableTimeout in ChannelScanSM
457  // ensures that we catch the NIT then.
458  channel_timeout = std::max(channel_timeout, static_cast<int>(need_nit) * 7 * 1000ms);
459 
460  m_channel = new DVBChannel(device);
461  }
462 #else
463  (void)do_ignore_signal_timeout;
464 #endif
465 
466 #ifdef USING_V4L2
467  if (("V4L" == card_type) || ("MPEG" == card_type))
468  m_channel = new V4LChannel(nullptr, device);
469 #endif
470 
471 #ifdef USING_HDHOMERUN
472  if ("HDHOMERUN" == card_type)
473  {
474  m_channel = new HDHRChannel(nullptr, device);
475  monitor_snr = true;
476  }
477 #endif // USING_HDHOMERUN
478 
479 #ifdef USING_SATIP
480  if ("SATIP" == card_type)
481  {
482  m_channel = new SatIPChannel(nullptr, device);
483  }
484 #endif
485 
486 #ifdef USING_ASI
487  if ("ASI" == card_type)
488  {
489  m_channel = new ASIChannel(nullptr, device);
490  }
491 #endif // USING_ASI
492 
493 #ifdef USING_IPTV
494  if ("FREEBOX" == card_type)
495  {
496  m_channel = new IPTVChannel(nullptr, device);
497  }
498 #endif
499 
500 #ifdef USING_VBOX
501  if ("VBOX" == card_type)
502  {
503  m_channel = new IPTVChannel(nullptr, device);
504  }
505 #endif
506 
507 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
508  if ("EXTERNAL" == card_type)
509  {
510  m_channel = new ExternalChannel(nullptr, device);
511  }
512 #endif
513 
514  if (!m_channel)
515  {
516  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel not created");
517  InformUser(tr("Programmer Error: Channel not created"));
518  return;
519  }
520 
521  // Explicitly set the cardid
522  m_channel->SetInputID(cardid);
523 
524  // If the backend is running this may fail...
525  if (!m_channel->Open())
526  {
527  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel could not be opened");
528  InformUser(tr("Channel could not be opened."));
529  return;
530  }
531 
532  ScanMonitor *lis = m_scanMonitor;
533 
534  m_sigmonScanner = new ChannelScanSM(lis, card_type, m_channel,
535  sourceid, signal_timeout, channel_timeout,
536  inputname, do_test_decryption);
537 
538  // If we know the channel types we can give the signal monitor a hint.
539  // Since we unfortunately do not record this info in the DB, we cannot
540  // do this for the other scan types and have to guess later on...
541  switch (scantype)
542  {
545  break;
548  break;
551  break;
554  break;
557  break;
560  break;
563  break;
566  break;
569  break;
570  default:
571  break;
572  }
573 
574  // Signal Meters are connected here
576  if (mon)
577  mon->AddListener(lis);
578 
579  bool using_rotor = false;
580 
581 #ifdef USING_DVB
583  if (dvbm && mon)
584  {
585  monitor_snr = true;
587  }
588 #endif // USING_DVB
589 
590  bool monitor_lock = mon != nullptr;
591  bool monitor_strength = mon != nullptr;
592  MonitorProgress(monitor_lock, monitor_strength, monitor_snr, using_rotor);
593 }
ChannelScanner::ImportVBox
virtual bool ImportVBox(uint cardid, const QString &inputname, uint sourceid, bool ftaOnly, ServiceRequirements serviceType)
Definition: channelscanner.cpp:359
DTVConfParser::ERROR_CARDTYPE
@ ERROR_CARDTYPE
Definition: dtvconfparser.h:78
ChannelScanner::m_channel
ChannelBase * m_channel
Definition: channelscanner.h:121
analogsignalmonitor.h
DTVTunerType::kTunerTypeDVBC
static const int kTunerTypeDVBC
Definition: dtvconfparserhelpers.h:95
DTVConfParser::cardtype_t
cardtype_t
Definition: dtvconfparser.h:79
ChannelScanner::~ChannelScanner
virtual ~ChannelScanner()
Definition: channelscanner.cpp:52
ScanTypeSetting::FullTransportScan
@ FullTransportScan
Definition: scanwizardconfig.h:89
ScanTypeSetting::FullScan_DVBT
@ FullScan_DVBT
Definition: scanwizardconfig.h:79
ChannelBase::Open
virtual bool Open(void)=0
Opens the channel changing hardware for use.
CardUtil::DVBT2
@ DVBT2
Definition: cardutil.h:68
ChannelScanner::m_channels
DTVChannelList m_channels
imported channels
Definition: channelscanner.h:128
ScanTypeSetting::DVBUtilsImport
@ DVBUtilsImport
Definition: scanwizardconfig.h:99
DTVTunerType::kTunerTypeDVBS1
static const int kTunerTypeDVBS1
Definition: dtvconfparserhelpers.h:93
VBoxChannelFetcher
Definition: vboxchannelfetcher.h:63
ScanTypeSetting::NITAddScan_DVBS
@ NITAddScan_DVBS
Definition: scanwizardconfig.h:85
channelscan_sm.h
ScanMonitor::ScanPercentComplete
void ScanPercentComplete(int pct)
Definition: scanmonitor.cpp:103
DVBSignalMonitor
Definition: dvbsignalmonitor.h:17
arg
arg(title).arg(filename).arg(doDelete))
DTVConfParser::ATSC
@ ATSC
Definition: dtvconfparser.h:79
scanwizardconfig.h
ChannelScanner::m_iptvChannels
fbox_chan_map_t m_iptvChannels
Definition: channelscanner.h:129
ChannelScanSM::SetAnalog
void SetAnalog(bool is_analog)
Definition: channelscan_sm.cpp:245
ScanTypeSetting::FullScan_ATSC
@ FullScan_ATSC
Definition: scanwizardconfig.h:77
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
ChannelScanner::m_removeDuplicates
bool m_removeDuplicates
Remove duplicate transports and channels?
Definition: channelscanner.h:152
build_compdb.parser
parser
Definition: build_compdb.py:7
IPTVChannelFetcher::Scan
void Scan(void)
Scans the given frequency list.
Definition: iptvchannelfetcher.cpp:84
build_compdb.file
file
Definition: build_compdb.py:55
DTVConfParser::QAM
@ QAM
Definition: dtvconfparser.h:79
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:2282
CardUtil::ProbeDVBType
static QString ProbeDVBType(const QString &device)
Definition: cardutil.cpp:671
SatIPChannel
Definition: satipchannel.h:12
ChannelScanSM::StartScanner
void StartScanner(void)
Starts the ChannelScanSM event loop.
Definition: channelscan_sm.cpp:1968
ChannelScanner::m_freeToAirOnly
bool m_freeToAirOnly
Only fta channels desired post scan?
Definition: channelscanner.h:140
DTVConfParser::DVBS2
@ DVBS2
Definition: dtvconfparser.h:79
CardUtil::DVBS2
@ DVBS2
Definition: cardutil.h:61
scanmonitor.h
ExternRecChannelScanner
Definition: externrecscanner.h:22
CardUtil::QPSK
@ QPSK
Definition: cardutil.h:51
ScanTypeSetting::NITAddScan_DVBT
@ NITAddScan_DVBT
Definition: scanwizardconfig.h:83
IPTVChannelFetcher::Stop
void Stop(void)
Stops the scanning thread running.
Definition: iptvchannelfetcher.cpp:56
dvbsignalmonitor.h
SignalMonitor::kDVBSigMon_WaitForPos
static const uint64_t kDVBSigMon_WaitForPos
Wait for rotor to complete turning the antenna.
Definition: signalmonitor.h:199
ChannelScanner::m_sigmonScanner
ChannelScanSM * m_sigmonScanner
Definition: channelscanner.h:124
ChannelScanner::m_sourceid
int m_sourceid
Definition: channelscanner.h:157
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:111
ScanTypeSetting::FullScan_Analog
@ FullScan_Analog
Definition: scanwizardconfig.h:76
v4lchannel.h
IPTVChannelFetcher
Definition: iptvchannelfetcher.h:64
ScanTypeSetting::IPTVImportMPTS
@ IPTVImportMPTS
Definition: scanwizardconfig.h:97
DTVConfParser
Parses dvb-utils channel scanner output files.
Definition: dtvconfparser.h:75
CardUtil::HDHOMERUN
@ HDHOMERUN
Definition: cardutil.h:58
DTVConfParser::OK
@ OK
Definition: dtvconfparser.h:78
DTVConfParser::UNKNOWN
@ UNKNOWN
Definition: dtvconfparser.h:79
ScanTypeSetting::FullScan_DVBC
@ FullScan_DVBC
Definition: scanwizardconfig.h:78
ChannelScanner::m_fullSearch
bool m_fullSearch
Extended search for old channels post scan?
Definition: channelscanner.h:149
ChannelScanner::Teardown
virtual void Teardown(void)
Definition: channelscanner.cpp:63
IPTVChannel
Definition: iptvchannel.h:24
ScanTypeSetting::NITAddScan_DVBT2
@ NITAddScan_DVBT2
Definition: scanwizardconfig.h:84
ChannelScanSM::SetSignalTimeout
void SetSignalTimeout(std::chrono::milliseconds val)
Definition: channelscan_sm.h:120
ScanTypeSetting::NITAddScan_DVBC
@ NITAddScan_DVBC
Definition: scanwizardconfig.h:87
ChannelScanSM::GetSignalTimeout
std::chrono::milliseconds GetSignalTimeout(void) const
Definition: channelscan_sm.h:125
DTVConfParser::ERROR_PARSE
@ ERROR_PARSE
Definition: dtvconfparser.h:78
ChannelScanner::InformUser
virtual void InformUser(const QString &)=0
ChannelScanSM
Scanning class for cards that support a SignalMonitor class.
Definition: channelscan_sm.h:85
uint
unsigned int uint
Definition: compat.h:140
ExternalChannel
-*- Mode: c++ -*-
Definition: ExternalChannel.h:17
CardUtil::GetTimeouts
static bool GetTimeouts(uint inputid, std::chrono::milliseconds &signal_timeout, std::chrono::milliseconds &channel_timeout)
Definition: cardutil.cpp:2097
ScanTypeSetting::CurrentTransportScan
@ CurrentTransportScan
Scans the transport when there is no tuner (for ASI)
Definition: scanwizardconfig.h:93
CardUtil::DVBC
@ DVBC
Definition: cardutil.h:52
ChannelScanSM::GetDVBSignalMonitor
DVBSignalMonitor * GetDVBSignalMonitor(void)
Definition: channelscan_sm.cpp:1910
DTVConfParser::OFDM
@ OFDM
Definition: dtvconfparser.h:79
ChannelScanner::m_channelNumbersOnly
bool m_channelNumbersOnly
Only channels with logical channel numbers desired post scan?
Definition: channelscanner.h:143
SignalMonitor
Signal monitoring base class.
Definition: signalmonitor.h:31
asichannel.h
ChannelScanner::m_iptvScanner
IPTVChannelFetcher * m_iptvScanner
Definition: channelscanner.h:125
DTVConfParser::QPSK
@ QPSK
Definition: dtvconfparser.h:79
ChannelScanner::m_addFullTS
bool m_addFullTS
Add MPTS "full transport stream" channels.
Definition: channelscanner.h:155
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:2413
ScanTypeSetting::TransportScan
@ TransportScan
Definition: scanwizardconfig.h:91
iptvchannel.h
CardUtil::GetRawInputType
static QString GetRawInputType(uint inputid)
Definition: cardutil.h:282
LOC
#define LOC
Definition: channelscanner.cpp:50
ChannelScanner::ImportDVBUtils
virtual DTVConfParser::return_t ImportDVBUtils(uint sourceid, int cardtype, const QString &file)
Definition: channelscanner.cpp:294
DVBChannel
Provides interface to the tuning hardware when using DVB drivers.
Definition: dvbchannel.h:30
ChannelScanner::ScanMonitor
friend class ScanMonitor
Definition: channelscanner.h:65
ChannelScanner::m_serviceRequirements
ServiceRequirements m_serviceRequirements
Services desired post scan.
Definition: channelscanner.h:160
SignalMonitor::HasFlags
bool HasFlags(uint64_t _flags) const
Definition: signalmonitor.cpp:277
ChannelScanner::m_scanMonitor
ScanMonitor * m_scanMonitor
Definition: channelscanner.h:120
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:409
ASIChannel
-*- Mode: c++ -*-
Definition: asichannel.h:14
SignalMonitor::AddListener
void AddListener(SignalMonitorListener *listener)
Definition: signalmonitor.cpp:387
cardutil.h
ExternalChannel.h
ScanTypeSetting::ExternRecImport
@ ExternRecImport
Definition: scanwizardconfig.h:105
ChannelScanSM::ScanCurrentTransport
bool ScanCurrentTransport(const QString &sistandard)
Definition: channelscan_sm.cpp:2604
DTVTunerType::kTunerTypeATSC
static const int kTunerTypeATSC
Definition: dtvconfparserhelpers.h:98
IPTVChannelFetcher::GetChannels
fbox_chan_map_t GetChannels(void)
Definition: iptvchannelfetcher.cpp:73
DTVConfParser::return_t
return_t
Definition: dtvconfparser.h:78
DTVTunerType::kTunerTypeDVBT
static const int kTunerTypeDVBT
Definition: dtvconfparserhelpers.h:96
ChannelScanner::MonitorProgress
virtual void MonitorProgress(bool, bool, bool, bool)
Definition: channelscanner.h:113
CardUtil::ATSC
@ ATSC
Definition: cardutil.h:54
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:2452
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:2582
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:122
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:320
iptvchannelfetcher.h
ScanTypeSetting::NITAddScan_DVBS2
@ NITAddScan_DVBS2
Definition: scanwizardconfig.h:86
ScanTypeSetting::FullScan_DVBT2
@ FullScan_DVBT2
Definition: scanwizardconfig.h:80
ChannelScanner::ImportM3U
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
Definition: channelscanner.cpp:335
ScanMonitor
Definition: scanmonitor.h:44
ChannelScanner::m_completeOnly
bool m_completeOnly
Only complete channels desired post scan?
Definition: channelscanner.h:146
CardUtil::DVBT
@ DVBT
Definition: cardutil.h:53
CardUtil::GetVideoDevice
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:284
ChannelScanSM::ScanForChannels
bool ScanForChannels(uint sourceid, const QString &std, const QString &cardtype, const DTVChannelList &channels)
Definition: channelscan_sm.cpp:2373
ChannelScanSM::GetSignalMonitor
SignalMonitor * GetSignalMonitor(void)
Definition: channelscan_sm.h:128
ChannelScanner::ImportExternRecorder
virtual bool ImportExternRecorder(uint cardid, const QString &inputname, uint sourceid)
Definition: channelscanner.cpp:382