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 
33 
34 #include "cardutil.h"
35 #include "channelscan_sm.h"
36 #include "channelscanner.h"
37 #include "iptvchannelfetcher.h"
40 #include "recorders/asichannel.h"
41 #ifdef USING_DVB // for bug in gcc 8.3
42 #include "recorders/dvbchannel.h"
43 #endif
45 #include "recorders/hdhrchannel.h"
46 #include "recorders/iptvchannel.h"
47 #include "recorders/satipchannel.h"
48 #include "recorders/v4lchannel.h"
49 #include "scanmonitor.h"
50 #include "scanwizardconfig.h"
51 
52 #define LOC QString("ChScan: ")
53 
55 {
57 
58  if (m_scanMonitor)
59  {
61  m_scanMonitor = nullptr;
62  }
63 }
64 
66 {
67  if (m_sigmonScanner)
68  {
69  delete m_sigmonScanner;
70  m_sigmonScanner = nullptr;
71  }
72 
73  if (m_channel)
74  {
75  delete m_channel;
76  m_channel = nullptr;
77  }
78 
79  if (m_iptvScanner)
80  {
82  delete m_iptvScanner;
83  m_iptvScanner = nullptr;
84  }
85 
86 #ifdef USING_VBOX
87  if (m_vboxScanner)
88  {
89  m_vboxScanner->Stop();
90  delete m_vboxScanner;
91  m_vboxScanner = nullptr;
92  }
93 #endif
94 
95 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
96  if (m_externRecScanner)
97  {
98  m_externRecScanner->Stop();
99  delete m_externRecScanner;
100  m_externRecScanner = nullptr;
101  }
102 #endif
103 
104  if (m_scanMonitor)
105  {
107  m_scanMonitor = nullptr;
108  }
109 }
110 
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, mod, 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 
257  if (ok)
259  else
260  {
261  InformUser(tr("Error scanning MPTS in IPTV"));
262  Teardown();
263  }
264  }
265  }
266  else if (ScanTypeSetting::TransportScan == scantype)
267  {
268  LOG(VB_CHANSCAN, LOG_INFO, LOC +
269  QString("ScanTransport(%1)").arg(mplexid));
270 
271  ok = m_sigmonScanner->ScanTransport(mplexid, do_follow_nit);
272  }
273  else if (ScanTypeSetting::CurrentTransportScan == scantype)
274  {
275  QString sistandard = "mpeg";
276  LOG(VB_CHANSCAN, LOG_INFO, LOC +
277  "ScanCurrentTransport(" + sistandard + ")");
278  ok = m_sigmonScanner->ScanCurrentTransport(sistandard);
279  }
280  else if (ScanTypeSetting::ExternRecImport == scantype)
281  {
282  LOG(VB_CHANSCAN, LOG_INFO, LOC +
283  "Importing channels from External Recorder");
284  ok = ImportExternRecorder(cardid, inputname, sourceid);
285  }
286 
287  if (!ok)
288  {
289  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to handle tune complete.");
290  InformUser(tr("Programmer Error: "
291  "Failed to handle tune complete."));
292  }
293 }
294 
296  uint sourceid, CardUtil::INPUT_TYPES cardtype, const QString &file)
297 {
298  m_sourceid = sourceid;
299  m_channels.clear();
300 
302  switch (cardtype) {
306  break;
309  break;
312  break;
315  break;
319  break;
320  default:
322  break;
323  }
324 
328  else
329  {
330  DTVConfParser parser(type, sourceid, file);
331 
332  ret = parser.Parse();
333  if (DTVConfParser::return_t::OK == ret)
334  m_channels = parser.GetChannels();
335  }
336 
337  if (DTVConfParser::return_t::OK != ret)
338  {
339  QString msg;
341  msg = tr("Failed to parse '%1'").arg(file);
343  msg = tr("Programmer Error : incorrect card type");
344  else
345  msg = tr("Failed to open '%1'").arg(file);
346 
347  InformUser(msg);
348  }
349 
350  return ret;
351 }
352 
353 bool ChannelScanner::ImportM3U([[maybe_unused]] uint cardid,
354  [[maybe_unused]] const QString &inputname,
355  uint sourceid,
356  bool is_mpts)
357 {
358  m_sourceid = sourceid;
359 
360  if (!m_scanMonitor)
361  m_scanMonitor = new ScanMonitor(this);
362 
363  // Create an IPTV scan object
364  m_iptvScanner = new IPTVChannelFetcher(cardid, inputname, sourceid,
365  is_mpts, m_scanMonitor);
366 
367  MonitorProgress(false, false, false, false);
368 
369  m_iptvScanner->Scan();
370 
371  if (is_mpts)
373 
374  return true;
375 }
376 
377 bool ChannelScanner::ImportVBox([[maybe_unused]] uint cardid,
378  [[maybe_unused]] const QString &inputname,
379  uint sourceid,
380  [[maybe_unused]] bool ftaOnly,
381  [[maybe_unused]] ServiceRequirements serviceType)
382 {
383  m_sourceid = sourceid;
384 #ifdef USING_VBOX
385  if (!m_scanMonitor)
386  m_scanMonitor = new ScanMonitor(this);
387 
388  // Create a VBox scan object
389  m_vboxScanner = new VBoxChannelFetcher(cardid, inputname, sourceid, ftaOnly, serviceType, m_scanMonitor);
390 
391  MonitorProgress(false, false, false, false);
392 
393  m_vboxScanner->Scan();
394 
395  return true;
396 #else
397  return false;
398 #endif
399 }
400 
401 bool ChannelScanner::ImportExternRecorder([[maybe_unused]] uint cardid,
402  [[maybe_unused]] const QString &inputname,
403  uint sourceid)
404 {
405  m_sourceid = sourceid;
406 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
407  if (!m_scanMonitor)
408  m_scanMonitor = new ScanMonitor(this);
409 
410  // Create a External Recorder Channel Fetcher
411  m_externRecScanner = new ExternRecChannelScanner(cardid,
412  inputname,
413  sourceid,
414  m_scanMonitor);
415 
416  MonitorProgress(false, false, false, false);
417 
418  m_externRecScanner->Scan();
419 
420  return true;
421 #else
422  return false;
423 #endif
424 }
425 
426 bool ChannelScanner::ImportHDHR([[maybe_unused]] uint cardid,
427  [[maybe_unused]] const QString &inputname,
428  uint sourceid,
429  [[maybe_unused]] ServiceRequirements serviceType)
430 {
431  m_sourceid = sourceid;
432 #ifdef USING_HDHOMERUN
433  if (!m_scanMonitor)
434  m_scanMonitor = new ScanMonitor(this);
435 
436  // Create a HDHomeRun scan object
437  m_hdhrScanner = new HDHRChannelFetcher(cardid, inputname, sourceid, serviceType, m_scanMonitor);
438 
439  MonitorProgress(false, false, false, false);
440 
441  m_hdhrScanner->Scan();
442 
443  return true;
444 #else
445  return false;
446 #endif
447 }
448 
450  int scantype,
451  uint cardid,
452  const QString &inputname,
453  uint sourceid,
454  [[maybe_unused]] bool do_ignore_signal_timeout,
455  bool do_test_decryption)
456 {
457  bool monitor_snr = false;
458  std::chrono::milliseconds signal_timeout = 1s;
459  std::chrono::milliseconds channel_timeout = 40s;
460  CardUtil::GetTimeouts(cardid, signal_timeout, channel_timeout);
461 
462  QString device = CardUtil::GetVideoDevice(cardid);
463  if (device.isEmpty())
464  {
465  LOG(VB_GENERAL, LOG_ERR, LOC + "No Device");
466  InformUser(tr("Programmer Error: No Device"));
467  return;
468  }
469 
470  if (!m_scanMonitor)
471  m_scanMonitor = new ScanMonitor(this);
472 
473  QString card_type = CardUtil::GetRawInputType(cardid);
474 
475 #ifdef USING_DVB
476  if ("DVB" == card_type)
477  {
478  QString sub_type = CardUtil::ProbeDVBType(device).toUpper();
479  bool need_nit = (("QAM" == sub_type) ||
480  ("QPSK" == sub_type) ||
481  ("OFDM" == sub_type) ||
482  ("DVB_T2" == sub_type));
483 
484  // Ugh, Some DVB drivers don't fully support signal monitoring...
485  if ((ScanTypeSetting::TransportScan == scantype) ||
487  {
488  signal_timeout = (do_ignore_signal_timeout) ?
489  channel_timeout * 10 : signal_timeout;
490  }
491 
492  // ensure a minimal signal timeout of 1 second
493  signal_timeout = std::max(signal_timeout, 1000ms);
494 
495  // Make sure that channel_timeout is at least 7 seconds to catch
496  // at least one SDT section. kDVBTableTimeout in ChannelScanSM
497  // ensures that we catch the NIT then.
498  channel_timeout = std::max(channel_timeout, static_cast<int>(need_nit) * 7 * 1000ms);
499 
500  m_channel = new DVBChannel(device);
501  }
502 #endif
503 
504 #ifdef USING_V4L2
505  if (("V4L" == card_type) || ("MPEG" == card_type))
506  m_channel = new V4LChannel(nullptr, device);
507 #endif
508 
509 #ifdef USING_HDHOMERUN
510  if ("HDHOMERUN" == card_type)
511  {
512  m_channel = new HDHRChannel(nullptr, device);
513  monitor_snr = true;
514  }
515 #endif // USING_HDHOMERUN
516 
517 #ifdef USING_SATIP
518  if ("SATIP" == card_type)
519  {
520  m_channel = new SatIPChannel(nullptr, device);
521  }
522 #endif
523 
524 #ifdef USING_ASI
525  if ("ASI" == card_type)
526  {
527  m_channel = new ASIChannel(nullptr, device);
528  }
529 #endif // USING_ASI
530 
531 #ifdef USING_IPTV
532  if ("FREEBOX" == card_type)
533  {
534  m_channel = new IPTVChannel(nullptr, device);
535  }
536 #endif
537 
538 #ifdef USING_VBOX
539  if ("VBOX" == card_type)
540  {
541  m_channel = new IPTVChannel(nullptr, device);
542  }
543 #endif
544 
545 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
546  if ("EXTERNAL" == card_type)
547  {
548  m_channel = new ExternalChannel(nullptr, device);
549  }
550 #endif
551 
552  if (!m_channel)
553  {
554  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel not created");
555  InformUser(tr("Programmer Error: Channel not created"));
556  return;
557  }
558 
559  // Explicitly set the cardid
560  m_channel->SetInputID(cardid);
561 
562  // If the backend is running this may fail...
563  if (!m_channel->Open())
564  {
565  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel could not be opened");
566  InformUser(tr("Channel could not be opened."));
567  return;
568  }
569 
570  ScanMonitor *lis = m_scanMonitor;
571 
572  m_sigmonScanner = new ChannelScanSM(lis, card_type, m_channel,
573  sourceid, signal_timeout, channel_timeout,
574  inputname, do_test_decryption);
575 
576  // If we know the channel types we can give the signal monitor a hint.
577  // Since we unfortunately do not record this info in the DB, we cannot
578  // do this for the other scan types and have to guess later on...
579  switch (scantype)
580  {
583  break;
586  break;
589  break;
592  break;
595  break;
598  break;
601  break;
604  break;
607  break;
608  default:
609  break;
610  }
611 
612  // Signal Meters are connected here
614  if (mon)
615  mon->AddListener(lis);
616 
617  bool using_rotor = false;
618 
619 #ifdef USING_DVB
621  if (dvbm && mon)
622  {
623  monitor_snr = true;
625  }
626 #endif // USING_DVB
627 
628  bool monitor_lock = mon != nullptr;
629  bool monitor_strength = mon != nullptr;
630  MonitorProgress(monitor_lock, monitor_strength, monitor_snr, using_rotor);
631 }
ChannelScanner::ImportVBox
virtual bool ImportVBox(uint cardid, const QString &inputname, uint sourceid, bool ftaOnly, ServiceRequirements serviceType)
Definition: channelscanner.cpp:377
DTVConfParser::cardtype_t::QPSK
@ QPSK
ChannelScanner::m_channel
ChannelBase * m_channel
Definition: channelscanner.h:129
CardUtil::INPUT_TYPES::HDHOMERUN
@ HDHOMERUN
ScanTypeSetting::FullScan_DVBT
@ FullScan_DVBT
Definition: scanwizardconfig.h:80
analogsignalmonitor.h
DTVTunerType::kTunerTypeDVBC
static const int kTunerTypeDVBC
Definition: dtvconfparserhelpers.h:95
ChannelScanner::~ChannelScanner
virtual ~ChannelScanner()
Definition: channelscanner.cpp:54
ChannelScanner::m_hdhrScanner
HDHRChannelFetcher * m_hdhrScanner
Definition: channelscanner.h:148
ChannelBase::Open
virtual bool Open(void)=0
Opens the channel changing hardware for use.
ChannelScanner::m_channels
DTVChannelList m_channels
imported channels
Definition: channelscanner.h:136
DTVTunerType::kTunerTypeDVBS1
static const int kTunerTypeDVBS1
Definition: dtvconfparserhelpers.h:93
VBoxChannelFetcher
Definition: vboxchannelfetcher.h:64
CardUtil::INPUT_TYPES::DVBS2
@ DVBS2
channelscan_sm.h
ScanMonitor::ScanPercentComplete
void ScanPercentComplete(int pct)
Definition: scanmonitor.cpp:103
DVBSignalMonitor
Definition: dvbsignalmonitor.h:17
ScanTypeSetting::NITAddScan_DVBT
@ NITAddScan_DVBT
Definition: scanwizardconfig.h:84
scanwizardconfig.h
ChannelScanner::m_iptvChannels
fbox_chan_map_t m_iptvChannels
Definition: channelscanner.h:137
ChannelScanSM::SetAnalog
void SetAnalog(bool is_analog)
Definition: channelscan_sm.cpp:251
DTVConfParser::cardtype_t::QAM
@ QAM
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
ChannelScanner::ImportDVBUtils
virtual DTVConfParser::return_t ImportDVBUtils(uint sourceid, CardUtil::INPUT_TYPES cardtype, const QString &file)
Definition: channelscanner.cpp:295
ChannelScanner::m_removeDuplicates
bool m_removeDuplicates
Remove duplicate transports and channels?
Definition: channelscanner.h:164
DTVConfParser::return_t::ERROR_CARDTYPE
@ ERROR_CARDTYPE
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
ScanTypeSetting::FullScan_DVBT2
@ FullScan_DVBT2
Definition: scanwizardconfig.h:81
satipchannel.h
ScanTypeSetting::DVBUtilsImport
@ DVBUtilsImport
Definition: scanwizardconfig.h:100
DTVConfParser::cardtype_t::ATSC
@ ATSC
dvbchannel.h
ScanMonitor::deleteLater
virtual void deleteLater(void)
Definition: scanmonitor.cpp:91
HDHRChannel
Definition: hdhrchannel.h:20
ScanTypeSetting::NITAddScan_DVBT2
@ NITAddScan_DVBT2
Definition: scanwizardconfig.h:85
DTVConfParser::return_t::OK
@ OK
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:2313
CardUtil::ProbeDVBType
static QString ProbeDVBType(const QString &device)
Definition: cardutil.cpp:724
SatIPChannel
Definition: satipchannel.h:12
ChannelScanSM::StartScanner
void StartScanner(void)
Starts the ChannelScanSM event loop.
Definition: channelscan_sm.cpp:1993
ChannelScanner::m_freeToAirOnly
bool m_freeToAirOnly
Only fta channels desired post scan?
Definition: channelscanner.h:152
scanmonitor.h
DTVConfParser::return_t::ERROR_PARSE
@ ERROR_PARSE
ExternRecChannelScanner
Definition: externrecscanner.h:22
IPTVChannelFetcher::Stop
void Stop(void)
Stops the scanning thread running.
Definition: iptvchannelfetcher.cpp:58
dvbsignalmonitor.h
mythlogging.h
SignalMonitor::kDVBSigMon_WaitForPos
static const uint64_t kDVBSigMon_WaitForPos
Wait for rotor to complete turning the antenna.
Definition: signalmonitor.h:198
ScanTypeSetting::IPTVImportMPTS
@ IPTVImportMPTS
Definition: scanwizardconfig.h:98
HDHRChannelFetcher
Definition: hdhrchannelfetcher.h:92
DTVConfParser::cardtype_t::UNKNOWN
@ UNKNOWN
ChannelScanner::m_sigmonScanner
ChannelScanSM * m_sigmonScanner
Definition: channelscanner.h:132
HDHRChannelFetcher::Scan
void Scan(void)
Definition: hdhrchannelfetcher.cpp:310
ChannelScanner::m_sourceid
int m_sourceid
Definition: channelscanner.h:169
DTVConfParser::cardtype_t
cardtype_t
Definition: dtvconfparser.h:77
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
v4lchannel.h
IPTVChannelFetcher
Definition: iptvchannelfetcher.h:67
CardUtil::INPUT_TYPES::DVBC
@ DVBC
DTVConfParser
Parses dvb-utils channel scanner output files.
Definition: dtvconfparser.h:73
ScanTypeSetting::CurrentTransportScan
@ CurrentTransportScan
Scans the transport when there is no tuner (for ASI)
Definition: scanwizardconfig.h:94
ChannelScanner::ImportHDHR
virtual bool ImportHDHR(uint cardid, const QString &inputname, uint sourceid, ServiceRequirements serviceType)
Definition: channelscanner.cpp:426
ServiceRequirements
ServiceRequirements
Definition: channelscantypes.h:4
ChannelScanner::m_fullSearch
bool m_fullSearch
Extended search for old channels post scan?
Definition: channelscanner.h:161
ChannelScanner::Teardown
virtual void Teardown(void)
Definition: channelscanner.cpp:65
IPTVChannel
Definition: iptvchannel.h:24
ChannelScanSM::SetSignalTimeout
void SetSignalTimeout(std::chrono::milliseconds val)
Definition: channelscan_sm.h:121
ChannelScanSM::GetSignalTimeout
std::chrono::milliseconds GetSignalTimeout(void) const
Definition: channelscan_sm.h:126
CardUtil::INPUT_TYPES::ATSC
@ ATSC
ChannelScanner::InformUser
virtual void InformUser(const QString &)=0
ChannelScanSM
Scanning class for cards that support a SignalMonitor class.
Definition: channelscan_sm.h:86
DTVConfParser::cardtype_t::OFDM
@ OFDM
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:2287
ChannelScanSM::GetDVBSignalMonitor
DVBSignalMonitor * GetDVBSignalMonitor(void)
Definition: channelscan_sm.cpp:1935
ChannelScanner::m_channelNumbersOnly
bool m_channelNumbersOnly
Only channels with logical channel numbers desired post scan?
Definition: channelscanner.h:155
SignalMonitor
Signal monitoring base class.
Definition: signalmonitor.h:30
asichannel.h
ChannelScanner::m_iptvScanner
IPTVChannelFetcher * m_iptvScanner
Definition: channelscanner.h:133
ScanTypeSetting::NITAddScan_DVBS
@ NITAddScan_DVBS
Definition: scanwizardconfig.h:86
ChannelScanner::m_addFullTS
bool m_addFullTS
Add MPTS "full transport stream" channels.
Definition: channelscanner.h:167
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:2444
iptvchannel.h
CardUtil::GetRawInputType
static QString GetRawInputType(uint inputid)
Definition: cardutil.h:292
LOC
#define LOC
Definition: channelscanner.cpp:52
DVBChannel
Provides interface to the tuning hardware when using DVB drivers.
Definition: dvbchannel.h:30
ChannelScanner::ScanMonitor
friend class ScanMonitor
Definition: channelscanner.h:71
ChannelScanner::m_serviceRequirements
ServiceRequirements m_serviceRequirements
Services desired post scan.
Definition: channelscanner.h:172
CardUtil::INPUT_TYPES::QPSK
@ QPSK
ScanTypeSetting::ExternRecImport
@ ExternRecImport
Definition: scanwizardconfig.h:106
SignalMonitor::HasFlags
bool HasFlags(uint64_t _flags) const
Definition: signalmonitor.cpp:275
ChannelScanner::m_scanMonitor
ScanMonitor * m_scanMonitor
Definition: channelscanner.h:128
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:449
ASIChannel
-*- Mode: c++ -*-
Definition: asichannel.h:14
ScanTypeSetting::NITAddScan_DVBC
@ NITAddScan_DVBC
Definition: scanwizardconfig.h:88
SignalMonitor::AddListener
void AddListener(SignalMonitorListener *listener)
Definition: signalmonitor.cpp:385
cardutil.h
ExternalChannel.h
CardUtil::INPUT_TYPES::DVBT2
@ DVBT2
ChannelScanSM::ScanCurrentTransport
bool ScanCurrentTransport(const QString &sistandard)
Definition: channelscan_sm.cpp:2635
ScanTypeSetting::FullScan_ATSC
@ FullScan_ATSC
Definition: scanwizardconfig.h:78
ScanTypeSetting::FullScan_DVBC
@ FullScan_DVBC
Definition: scanwizardconfig.h:79
DTVConfParser::return_t
return_t
Definition: dtvconfparser.h:76
DTVTunerType::kTunerTypeATSC
static const int kTunerTypeATSC
Definition: dtvconfparserhelpers.h:98
IPTVChannelFetcher::GetChannels
fbox_chan_map_t GetChannels(void)
Definition: iptvchannelfetcher.cpp:75
ScanTypeSetting::TransportScan
@ TransportScan
Definition: scanwizardconfig.h:92
ScanTypeSetting::NITAddScan_DVBS2
@ NITAddScan_DVBS2
Definition: scanwizardconfig.h:87
DTVTunerType::kTunerTypeDVBT
static const int kTunerTypeDVBT
Definition: dtvconfparserhelpers.h:96
CardUtil::INPUT_TYPES
INPUT_TYPES
all the different inputs
Definition: cardutil.h:49
ChannelScanner::MonitorProgress
virtual void MonitorProgress(bool, bool, bool, bool)
Definition: channelscanner.h:121
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:2483
ScanTypeSetting::FullTransportScan
@ FullTransportScan
Definition: scanwizardconfig.h:90
ScanMonitor::ScanUpdateStatusText
void ScanUpdateStatusText(const QString &status)
Definition: scanmonitor.cpp:114
hdhrchannel.h
DTVTunerType::kTunerTypeDVBT2
static const int kTunerTypeDVBT2
Definition: dtvconfparserhelpers.h:97
ChannelScanSM::ScanTransport
bool ScanTransport(uint mplexid, bool follow_nit)
Definition: channelscan_sm.cpp:2613
V4LChannel
Implements tuning for TV cards using the V4L driver API, both versions 1 and 2.
Definition: v4lchannel.h:30
DTVConfParser::cardtype_t::DVBS2
@ DVBS2
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:322
iptvchannelfetcher.h
ScanTypeSetting::FullScan_Analog
@ FullScan_Analog
Definition: scanwizardconfig.h:77
ChannelScanner::ImportM3U
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
Definition: channelscanner.cpp:353
ScanMonitor
Definition: scanmonitor.h:44
ChannelScanner::m_completeOnly
bool m_completeOnly
Only complete channels desired post scan?
Definition: channelscanner.h:158
CardUtil::GetVideoDevice
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:294
uint
unsigned int uint
Definition: freesurround.h:24
ChannelScanSM::ScanForChannels
bool ScanForChannels(uint sourceid, const QString &std, const QString &cardtype, const DTVChannelList &channels)
Definition: channelscan_sm.cpp:2404
ChannelScanSM::GetSignalMonitor
SignalMonitor * GetSignalMonitor(void)
Definition: channelscan_sm.h:129
CardUtil::INPUT_TYPES::DVBT
@ DVBT
ChannelScanner::ImportExternRecorder
virtual bool ImportExternRecorder(uint cardid, const QString &inputname, uint sourceid)
Definition: channelscanner.cpp:401