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(uint cardid, const QString &inputname,
334  uint sourceid, bool is_mpts)
335 {
336  (void) cardid;
337  (void) inputname;
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(uint cardid, const QString &inputname, uint sourceid,
358  bool ftaOnly, ServiceRequirements serviceType)
359 {
360  m_sourceid = sourceid;
361 #ifdef USING_VBOX
362  if (!m_scanMonitor)
363  m_scanMonitor = new ScanMonitor(this);
364 
365  // Create a VBox scan object
366  m_vboxScanner = new VBoxChannelFetcher(cardid, inputname, sourceid, ftaOnly, serviceType, m_scanMonitor);
367 
368  MonitorProgress(false, false, false, false);
369 
370  m_vboxScanner->Scan();
371 
372  return true;
373 #else
374  (void) cardid;
375  (void) inputname;
376  return false;
377 #endif
378 }
379 
380 bool ChannelScanner::ImportExternRecorder(uint cardid, const QString &inputname,
381  uint sourceid)
382 {
383  m_sourceid = sourceid;
384 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
385  if (!m_scanMonitor)
386  m_scanMonitor = new ScanMonitor(this);
387 
388  // Create a External Recorder Channel Fetcher
389  m_externRecScanner = new ExternRecChannelScanner(cardid,
390  inputname,
391  sourceid,
392  m_scanMonitor);
393 
394  MonitorProgress(false, false, false, false);
395 
396  m_externRecScanner->Scan();
397 
398  return true;
399 #else
400  (void) cardid;
401  (void) inputname;
402 
403  return false;
404 #endif
405 }
406 
408  int scantype,
409  uint cardid,
410  const QString &inputname,
411  uint sourceid,
412  bool do_ignore_signal_timeout,
413  bool do_test_decryption)
414 {
415  bool monitor_snr = false;
416  std::chrono::milliseconds signal_timeout = 1s;
417  std::chrono::milliseconds channel_timeout = 40s;
418  CardUtil::GetTimeouts(cardid, signal_timeout, channel_timeout);
419 
420  QString device = CardUtil::GetVideoDevice(cardid);
421  if (device.isEmpty())
422  {
423  LOG(VB_GENERAL, LOG_ERR, LOC + "No Device");
424  InformUser(tr("Programmer Error: No Device"));
425  return;
426  }
427 
428  if (!m_scanMonitor)
429  m_scanMonitor = new ScanMonitor(this);
430 
431  QString card_type = CardUtil::GetRawInputType(cardid);
432 
433 #ifdef USING_DVB
434  if ("DVB" == card_type)
435  {
436  QString sub_type = CardUtil::ProbeDVBType(device).toUpper();
437  bool need_nit = (("QAM" == sub_type) ||
438  ("QPSK" == sub_type) ||
439  ("OFDM" == sub_type) ||
440  ("DVB_T2" == sub_type));
441 
442  // Ugh, Some DVB drivers don't fully support signal monitoring...
443  if ((ScanTypeSetting::TransportScan == scantype) ||
445  {
446  signal_timeout = (do_ignore_signal_timeout) ?
447  channel_timeout * 10 : signal_timeout;
448  }
449 
450  // ensure a minimal signal timeout of 1 second
451  signal_timeout = std::max(signal_timeout, 1000ms);
452 
453  // Make sure that channel_timeout is at least 7 seconds to catch
454  // at least one SDT section. kDVBTableTimeout in ChannelScanSM
455  // ensures that we catch the NIT then.
456  channel_timeout = std::max(channel_timeout, static_cast<int>(need_nit) * 7 * 1000ms);
457 
458  m_channel = new DVBChannel(device);
459  }
460 #else
461  (void)do_ignore_signal_timeout;
462 #endif
463 
464 #ifdef USING_V4L2
465  if (("V4L" == card_type) || ("MPEG" == card_type))
466  m_channel = new V4LChannel(nullptr, device);
467 #endif
468 
469 #ifdef USING_HDHOMERUN
470  if ("HDHOMERUN" == card_type)
471  {
472  m_channel = new HDHRChannel(nullptr, device);
473  monitor_snr = true;
474  }
475 #endif // USING_HDHOMERUN
476 
477 #ifdef USING_SATIP
478  if ("SATIP" == card_type)
479  {
480  m_channel = new SatIPChannel(nullptr, device);
481  }
482 #endif
483 
484 #ifdef USING_ASI
485  if ("ASI" == card_type)
486  {
487  m_channel = new ASIChannel(nullptr, device);
488  }
489 #endif // USING_ASI
490 
491 #ifdef USING_IPTV
492  if ("FREEBOX" == card_type)
493  {
494  m_channel = new IPTVChannel(nullptr, device);
495  }
496 #endif
497 
498 #ifdef USING_VBOX
499  if ("VBOX" == card_type)
500  {
501  m_channel = new IPTVChannel(nullptr, device);
502  }
503 #endif
504 
505 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
506  if ("EXTERNAL" == card_type)
507  {
508  m_channel = new ExternalChannel(nullptr, device);
509  }
510 #endif
511 
512  if (!m_channel)
513  {
514  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel not created");
515  InformUser(tr("Programmer Error: Channel not created"));
516  return;
517  }
518 
519  // Explicitly set the cardid
520  m_channel->SetInputID(cardid);
521 
522  // If the backend is running this may fail...
523  if (!m_channel->Open())
524  {
525  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel could not be opened");
526  InformUser(tr("Channel could not be opened."));
527  return;
528  }
529 
530  ScanMonitor *lis = m_scanMonitor;
531 
532  m_sigmonScanner = new ChannelScanSM(lis, card_type, m_channel,
533  sourceid, signal_timeout, channel_timeout,
534  inputname, do_test_decryption);
535 
536  // If we know the channel types we can give the signal monitor a hint.
537  // Since we unfortunately do not record this info in the DB, we cannot
538  // do this for the other scan types and have to guess later on...
539  switch (scantype)
540  {
543  break;
546  break;
549  break;
552  break;
555  break;
558  break;
561  break;
564  break;
567  break;
568  default:
569  break;
570  }
571 
572  // Signal Meters are connected here
574  if (mon)
575  mon->AddListener(lis);
576 
577  bool using_rotor = false;
578 
579 #ifdef USING_DVB
581  if (dvbm && mon)
582  {
583  monitor_snr = true;
585  }
586 #endif // USING_DVB
587 
588  bool monitor_lock = mon != nullptr;
589  bool monitor_strength = mon != nullptr;
590  MonitorProgress(monitor_lock, monitor_strength, monitor_snr, using_rotor);
591 }
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:122
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
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:68
ChannelScanner::m_channels
DTVChannelList m_channels
imported channels
Definition: channelscanner.h:129
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:130
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:153
build_compdb.parser
parser
Definition: build_compdb.py:7
IPTVChannelFetcher::Scan
void Scan(void)
Scans the given frequency list.
Definition: iptvchannelfetcher.cpp:85
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:666
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:141
DTVConfParser::DVBS2
@ DVBS2
Definition: dtvconfparser.h:77
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:84
IPTVChannelFetcher::Stop
void Stop(void)
Stops the scanning thread running.
Definition: iptvchannelfetcher.cpp:57
dvbsignalmonitor.h
SignalMonitor::kDVBSigMon_WaitForPos
static const uint64_t kDVBSigMon_WaitForPos
Wait for rotor to complete turning the antenna.
Definition: signalmonitor.h:200
ChannelScanner::m_sigmonScanner
ChannelScanSM * m_sigmonScanner
Definition: channelscanner.h:125
ChannelScanner::m_sourceid
int m_sourceid
Definition: channelscanner.h:158
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
CardUtil::HDHOMERUN
@ HDHOMERUN
Definition: cardutil.h:58
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:150
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:120
ScanTypeSetting::NITAddScan_DVBC
@ NITAddScan_DVBC
Definition: scanwizardconfig.h:88
ChannelScanSM::GetSignalTimeout
std::chrono::milliseconds GetSignalTimeout(void) const
Definition: channelscan_sm.h:125
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:85
uint
unsigned int uint
Definition: compat.h:79
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:2235
ScanTypeSetting::CurrentTransportScan
@ CurrentTransportScan
Scans the transport when there is no tuner (for ASI)
Definition: scanwizardconfig.h:94
CardUtil::DVBC
@ DVBC
Definition: cardutil.h:52
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:144
SignalMonitor
Signal monitoring base class.
Definition: signalmonitor.h:32
asichannel.h
ChannelScanner::m_iptvScanner
IPTVChannelFetcher * m_iptvScanner
Definition: channelscanner.h:126
DTVConfParser::QPSK
@ QPSK
Definition: dtvconfparser.h:77
ChannelScanner::m_addFullTS
bool m_addFullTS
Add MPTS "full transport stream" channels.
Definition: channelscanner.h:156
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:287
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:66
ChannelScanner::m_serviceRequirements
ServiceRequirements m_serviceRequirements
Services desired post scan.
Definition: channelscanner.h:161
SignalMonitor::HasFlags
bool HasFlags(uint64_t _flags) const
Definition: signalmonitor.cpp:278
ChannelScanner::m_scanMonitor
ScanMonitor * m_scanMonitor
Definition: channelscanner.h:121
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:407
ASIChannel
-*- Mode: c++ -*-
Definition: asichannel.h:14
SignalMonitor::AddListener
void AddListener(SignalMonitorListener *listener)
Definition: signalmonitor.cpp:388
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:74
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:114
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: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: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: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:147
CardUtil::DVBT
@ DVBT
Definition: cardutil.h:53
CardUtil::GetVideoDevice
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:289
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:128
ChannelScanner::ImportExternRecorder
virtual bool ImportExternRecorder(uint cardid, const QString &inputname, uint sourceid)
Definition: channelscanner.cpp:380