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 
255  if (ok)
257  else
258  {
259  InformUser(tr("Error scanning MPTS in IPTV"));
260  Teardown();
261  }
262  }
263  }
264  else if (ScanTypeSetting::TransportScan == scantype)
265  {
266  LOG(VB_CHANSCAN, LOG_INFO, LOC +
267  QString("ScanTransport(%1)").arg(mplexid));
268 
269  ok = m_sigmonScanner->ScanTransport(mplexid, do_follow_nit);
270  }
271  else if (ScanTypeSetting::CurrentTransportScan == scantype)
272  {
273  QString sistandard = "mpeg";
274  LOG(VB_CHANSCAN, LOG_INFO, LOC +
275  "ScanCurrentTransport(" + sistandard + ")");
276  ok = m_sigmonScanner->ScanCurrentTransport(sistandard);
277  }
278  else if (ScanTypeSetting::ExternRecImport == scantype)
279  {
280  LOG(VB_CHANSCAN, LOG_INFO, LOC +
281  "Importing channels from External Recorder");
282  ok = ImportExternRecorder(cardid, inputname, sourceid);
283  }
284 
285  if (!ok)
286  {
287  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to handle tune complete.");
288  InformUser(tr("Programmer Error: "
289  "Failed to handle tune complete."));
290  }
291 }
292 
294  uint sourceid, CardUtil::INPUT_TYPES cardtype, const QString &file)
295 {
296  m_sourceid = sourceid;
297  m_channels.clear();
298 
300  switch (cardtype) {
304  break;
307  break;
310  break;
313  break;
317  break;
318  default:
320  break;
321  }
322 
326  else
327  {
328  DTVConfParser parser(type, sourceid, file);
329 
330  ret = parser.Parse();
331  if (DTVConfParser::return_t::OK == ret)
332  m_channels = parser.GetChannels();
333  }
334 
335  if (DTVConfParser::return_t::OK != ret)
336  {
337  QString msg;
339  msg = tr("Failed to parse '%1'").arg(file);
341  msg = tr("Programmer Error : incorrect card type");
342  else
343  msg = tr("Failed to open '%1'").arg(file);
344 
345  InformUser(msg);
346  }
347 
348  return ret;
349 }
350 
351 bool ChannelScanner::ImportM3U([[maybe_unused]] uint cardid,
352  [[maybe_unused]] const QString &inputname,
353  uint sourceid,
354  bool is_mpts)
355 {
356  m_sourceid = sourceid;
357 
358  if (!m_scanMonitor)
359  m_scanMonitor = new ScanMonitor(this);
360 
361  // Create an IPTV scan object
362  m_iptvScanner = new IPTVChannelFetcher(cardid, inputname, sourceid,
363  is_mpts, m_scanMonitor);
364 
365  MonitorProgress(false, false, false, false);
366 
367  m_iptvScanner->Scan();
368 
369  if (is_mpts)
371 
372  return true;
373 }
374 
375 bool ChannelScanner::ImportVBox([[maybe_unused]] uint cardid,
376  [[maybe_unused]] const QString &inputname,
377  uint sourceid,
378  [[maybe_unused]] bool ftaOnly,
379  [[maybe_unused]] ServiceRequirements serviceType)
380 {
381  m_sourceid = sourceid;
382 #ifdef USING_VBOX
383  if (!m_scanMonitor)
384  m_scanMonitor = new ScanMonitor(this);
385 
386  // Create a VBox scan object
387  m_vboxScanner = new VBoxChannelFetcher(cardid, inputname, sourceid, ftaOnly, serviceType, m_scanMonitor);
388 
389  MonitorProgress(false, false, false, false);
390 
391  m_vboxScanner->Scan();
392 
393  return true;
394 #else
395  return false;
396 #endif
397 }
398 
399 bool ChannelScanner::ImportExternRecorder([[maybe_unused]] uint cardid,
400  [[maybe_unused]] const QString &inputname,
401  uint sourceid)
402 {
403  m_sourceid = sourceid;
404 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
405  if (!m_scanMonitor)
406  m_scanMonitor = new ScanMonitor(this);
407 
408  // Create a External Recorder Channel Fetcher
409  m_externRecScanner = new ExternRecChannelScanner(cardid,
410  inputname,
411  sourceid,
412  m_scanMonitor);
413 
414  MonitorProgress(false, false, false, false);
415 
416  m_externRecScanner->Scan();
417 
418  return true;
419 #else
420  return false;
421 #endif
422 }
423 
424 bool ChannelScanner::ImportHDHR([[maybe_unused]] uint cardid,
425  [[maybe_unused]] const QString &inputname,
426  uint sourceid,
427  [[maybe_unused]] ServiceRequirements serviceType)
428 {
429  m_sourceid = sourceid;
430 #ifdef USING_HDHOMERUN
431  if (!m_scanMonitor)
432  m_scanMonitor = new ScanMonitor(this);
433 
434  // Create a HDHomeRun scan object
435  m_hdhrScanner = new HDHRChannelFetcher(cardid, inputname, sourceid, serviceType, m_scanMonitor);
436 
437  MonitorProgress(false, false, false, false);
438 
439  m_hdhrScanner->Scan();
440 
441  return true;
442 #else
443  return false;
444 #endif
445 }
446 
448  int scantype,
449  uint cardid,
450  const QString &inputname,
451  uint sourceid,
452  [[maybe_unused]] bool do_ignore_signal_timeout,
453  bool do_test_decryption)
454 {
455  bool monitor_snr = false;
456  std::chrono::milliseconds signal_timeout = 1s;
457  std::chrono::milliseconds channel_timeout = 40s;
458  CardUtil::GetTimeouts(cardid, signal_timeout, channel_timeout);
459 
460  QString device = CardUtil::GetVideoDevice(cardid);
461  if (device.isEmpty())
462  {
463  LOG(VB_GENERAL, LOG_ERR, LOC + "No Device");
464  InformUser(tr("Programmer Error: No Device"));
465  return;
466  }
467 
468  if (!m_scanMonitor)
469  m_scanMonitor = new ScanMonitor(this);
470 
471  QString card_type = CardUtil::GetRawInputType(cardid);
472 
473 #ifdef USING_DVB
474  if ("DVB" == card_type)
475  {
476  QString sub_type = CardUtil::ProbeDVBType(device).toUpper();
477  bool need_nit = (("QAM" == sub_type) ||
478  ("QPSK" == sub_type) ||
479  ("OFDM" == sub_type) ||
480  ("DVB_T2" == sub_type));
481 
482  // Ugh, Some DVB drivers don't fully support signal monitoring...
483  if ((ScanTypeSetting::TransportScan == scantype) ||
485  {
486  signal_timeout = (do_ignore_signal_timeout) ?
487  channel_timeout * 10 : signal_timeout;
488  }
489 
490  // ensure a minimal signal timeout of 1 second
491  signal_timeout = std::max(signal_timeout, 1000ms);
492 
493  // Make sure that channel_timeout is at least 7 seconds to catch
494  // at least one SDT section. kDVBTableTimeout in ChannelScanSM
495  // ensures that we catch the NIT then.
496  channel_timeout = std::max(channel_timeout, static_cast<int>(need_nit) * 7 * 1000ms);
497 
498  m_channel = new DVBChannel(device);
499  }
500 #endif
501 
502 #ifdef USING_V4L2
503  if (("V4L" == card_type) || ("MPEG" == card_type))
504  m_channel = new V4LChannel(nullptr, device);
505 #endif
506 
507 #ifdef USING_HDHOMERUN
508  if ("HDHOMERUN" == card_type)
509  {
510  m_channel = new HDHRChannel(nullptr, device);
511  monitor_snr = true;
512  }
513 #endif // USING_HDHOMERUN
514 
515 #ifdef USING_SATIP
516  if ("SATIP" == card_type)
517  {
518  m_channel = new SatIPChannel(nullptr, device);
519  }
520 #endif
521 
522 #ifdef USING_ASI
523  if ("ASI" == card_type)
524  {
525  m_channel = new ASIChannel(nullptr, device);
526  }
527 #endif // USING_ASI
528 
529 #ifdef USING_IPTV
530  if ("FREEBOX" == card_type)
531  {
532  m_channel = new IPTVChannel(nullptr, device);
533  }
534 #endif
535 
536 #ifdef USING_VBOX
537  if ("VBOX" == card_type)
538  {
539  m_channel = new IPTVChannel(nullptr, device);
540  }
541 #endif
542 
543 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
544  if ("EXTERNAL" == card_type)
545  {
546  m_channel = new ExternalChannel(nullptr, device);
547  }
548 #endif
549 
550  if (!m_channel)
551  {
552  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel not created");
553  InformUser(tr("Programmer Error: Channel not created"));
554  return;
555  }
556 
557  // Explicitly set the cardid
558  m_channel->SetInputID(cardid);
559 
560  // If the backend is running this may fail...
561  if (!m_channel->Open())
562  {
563  LOG(VB_GENERAL, LOG_ERR, LOC + "Channel could not be opened");
564  InformUser(tr("Channel could not be opened."));
565  return;
566  }
567 
568  ScanMonitor *lis = m_scanMonitor;
569 
570  m_sigmonScanner = new ChannelScanSM(lis, card_type, m_channel,
571  sourceid, signal_timeout, channel_timeout,
572  inputname, do_test_decryption);
573 
574  // If we know the channel types we can give the signal monitor a hint.
575  // Since we unfortunately do not record this info in the DB, we cannot
576  // do this for the other scan types and have to guess later on...
577  switch (scantype)
578  {
581  break;
584  break;
587  break;
590  break;
593  break;
596  break;
599  break;
602  break;
605  break;
606  default:
607  break;
608  }
609 
610  // Signal Meters are connected here
612  if (mon)
613  mon->AddListener(lis);
614 
615  bool using_rotor = false;
616 
617 #ifdef USING_DVB
619  if (dvbm && mon)
620  {
621  monitor_snr = true;
623  }
624 #endif // USING_DVB
625 
626  bool monitor_lock = mon != nullptr;
627  bool monitor_strength = mon != nullptr;
628  MonitorProgress(monitor_lock, monitor_strength, monitor_snr, using_rotor);
629 }
ChannelScanner::ImportVBox
virtual bool ImportVBox(uint cardid, const QString &inputname, uint sourceid, bool ftaOnly, ServiceRequirements serviceType)
Definition: channelscanner.cpp:375
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:52
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:293
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:723
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
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:311
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:109
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:424
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:63
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:2286
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:50
DVBChannel
Provides interface to the tuning hardware when using DVB drivers.
Definition: dvbchannel.h:31
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:447
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:351
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:399