MythTV  master
channelscanner_web.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) 2008 Daniel Kristjansson
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
23  *
24  */
25 
26 // Qt headers
27 #include <QCoreApplication>
28 #include <iostream>
29 
30 // MythTv headers
31 #include "channelscanner_web.h"
32 
34 
35 #include "channelscan_sm.h"
36 #include "channelimporter.h"
37 #include "libmythtv/cardutil.h"
39 #ifdef USING_SATIP
40 #include "recorders/satiputils.h"
41 #endif // USING_SATIP
42 
43 #define LOC QString("ChScanWeb: ")
44 
46 
48 {
49  if (s_Instance == nullptr)
51  return s_Instance;
52 }
53 
54 // Called from Web Service API
55 // Run in http thread
57  const QString &DesiredServices,
58  bool freeToAirOnly,
59  bool ChannelNumbersOnly,
61  bool FullChannelSearch,
62  bool RemoveDuplicates,
63  bool AddFullTS,
64  bool TestDecryptable,
65  const QString &ScanType,
66  const QString &FreqTable,
67  QString modulation,
68  const QString &FirstChan,
69  const QString &LastChan,
70  uint ScanId,
72  bool FollowNITSetting,
73  uint MplexId,
74  const QString &frequency,
75  const QString &bandwidth,
76  const QString &polarity,
77  const QString &symbolrate,
78  const QString &inversion,
79  const QString &constellation,
80  const QString &modsys,
81  const QString &coderate_lp,
82  const QString &coderate_hp,
83  const QString &fec,
84  const QString &trans_mode,
85  const QString &guard_interval,
86  const QString &hierarchy,
87  const QString &rolloff)
88 {
89 
90  ResetStatus();
91  m_cardid = cardid;
92  m_scanId = ScanId;
93 
94  QString subType = CardUtil::ProbeSubTypeName(cardid);
95  CardUtil::INPUT_TYPES inputType = CardUtil::toInputType(subType);
96 
97 #ifdef USING_SATIP
98  if (inputType == CardUtil::INPUT_TYPES::SATIP)
99  {
100  inputType = SatIP::toDVBInputType(CardUtil::GetVideoDevice(cardid));
101  }
102 #endif // USING_SATIP
103 
104  int nScanType = -99;
105  if (ScanType == "FULL")
106  {
107  switch(inputType) {
109  nScanType = ScanTypeSetting::FullScan_ATSC;
110  break;
112  nScanType = ScanTypeSetting::FullScan_DVBT;
113  break;
117  break;
120  break;
122  nScanType = ScanTypeSetting::FullScan_DVBC;
123  break;
126  nScanType = ScanTypeSetting::FullScan_DVBC;
128  nScanType = ScanTypeSetting::FullScan_DVBT;
129  else
130  nScanType = ScanTypeSetting::FullScan_ATSC;
131  break;
132  default:
133  break;
134  }
135  }
136  else if (ScanType == "FULLTUNED")
137  {
138  switch(inputType) {
141  break;
144  break;
147  break;
150  break;
153  break;
159  break;
160  default:
161  break;
162  }
163  }
164  else if (ScanType == "VBOXIMPORT")
165  {
166  nScanType = ScanTypeSetting::VBoxImport;
167  }
168  else if (ScanType == "HDHRIMPORT")
169  {
170  nScanType = ScanTypeSetting::HDHRImport;
171  }
172  else if (ScanType == "MPTSIMPORT")
173  {
175  }
176  else if (ScanType == "M3UIMPORT")
177  {
178  nScanType = ScanTypeSetting::IPTVImport;
179  }
180  else if (ScanType == "ASI" || ScanType == "MPTS")
181  {
183  }
184  else if (ScanType == "EXTIMPORT")
185  {
187  }
188  else if (ScanType == "IMPORT")
189  {
191  }
192  else if (ScanType == "ALLTRANSPORT")
193  {
195  }
196  else if (ScanType == "ONETRANSPORT")
197  {
198  nScanType = ScanTypeSetting::TransportScan;
199  }
200 
201  if (nScanType == -99)
202  {
203  m_dlgMsg = QObject::tr("This scan type is not supported");
204  return false;
205  }
206  ServiceRequirements service_requirements
208  if (DesiredServices == "tv")
209  service_requirements = static_cast<ServiceRequirements> (kRequireVideo | kRequireAudio);
210  else if (DesiredServices == "audio")
211  service_requirements = kRequireAudio;
212  else if (DesiredServices == "all")
213  service_requirements = kRequireNothing;
214  QString freq_std;
215  switch(nScanType)
216  {
218  freq_std = "atsc";
219  break;
221  freq_std = "dvbc";
222  break;
225  freq_std = "dvbt";
226  break;
228  freq_std = "analog";
229  break;
230  }
231 
232  switch (nScanType)
233  {
235  // in this case the modulation is supplied in the
236  // scan call so it is not changed here
237  break;
239  modulation = "qam";
240  break;
243  modulation = "ofdm";
244  break;
246  modulation = "analog";
247  break;
248  }
249 
250  m_scantype = nScanType;
251 
252  // Get startChan. Logic copied from ScanOptionalConfig::GetStartChan(void)
253  QMap<QString,QString> startChan;
254  if (ScanTypeSetting::NITAddScan_DVBT == nScanType)
255  {
256  startChan["std"] = "dvb";
257  startChan["type"] = "OFDM";
258  startChan["frequency"] = frequency;
259  startChan["inversion"] = inversion;
260  startChan["bandwidth"] = bandwidth;
261  startChan["coderate_hp"] = coderate_hp;
262  startChan["coderate_lp"] = coderate_lp;
263  startChan["constellation"] = constellation;
264  startChan["trans_mode"] = trans_mode;
265  startChan["guard_interval"] = guard_interval;
266  startChan["hierarchy"] = hierarchy;
267  }
268  else if (ScanTypeSetting::NITAddScan_DVBT2 == nScanType)
269  {
270  startChan["std"] = "dvb";
271  startChan["type"] = "DVB_T2";
272  startChan["frequency"] = frequency;
273  startChan["inversion"] = inversion;
274  startChan["bandwidth"] = bandwidth;
275  startChan["coderate_hp"] = coderate_hp;
276  startChan["coderate_lp"] = coderate_lp;
277  startChan["constellation"] = constellation;
278  startChan["trans_mode"] = trans_mode;
279  startChan["guard_interval"] = guard_interval;
280  startChan["hierarchy"] = hierarchy;
281  startChan["mod_sys"] = modsys;
282  }
283  else if (ScanTypeSetting::NITAddScan_DVBS == nScanType)
284  {
285  startChan["std"] = "dvb";
286  startChan["type"] = "QPSK";
287  startChan["modulation"] = "qpsk";
288  startChan["frequency"] = frequency;
289  startChan["inversion"] = inversion;
290  startChan["symbolrate"] = symbolrate;
291  startChan["fec"] = fec;
292  startChan["polarity"] = polarity;
293  }
294  else if (ScanTypeSetting::NITAddScan_DVBC == nScanType)
295  {
296  startChan["std"] = "dvb";
297  startChan["type"] = "QAM";
298  startChan["frequency"] = frequency;
299  startChan["symbolrate"] = symbolrate;
300  startChan["modulation"] = modulation;
301  startChan["mod_sys"] = modsys;
302  startChan["inversion"] = inversion;
303  startChan["fec"] = fec;
304  }
305  else if (ScanTypeSetting::NITAddScan_DVBS2 == nScanType)
306  {
307  startChan["std"] = "dvb";
308  startChan["type"] = "DVB_S2";
309  startChan["frequency"] = frequency;
310  startChan["inversion"] = inversion;
311  startChan["symbolrate"] = symbolrate;
312  startChan["fec"] = fec;
313  startChan["modulation"] = modulation;
314  startChan["polarity"] = polarity;
315  startChan["mod_sys"] = modsys;
316  startChan["rolloff"] = rolloff;
317  }
318 
319  setupScan(cardid);
320 
321  QString inputname = get_on_input("inputname", cardid);
322  int sourceid = get_on_input("sourceid", cardid).toUInt();
323 
324  if (ScanTypeSetting::ExistingScanImport == nScanType)
325  {
326  m_freeToAirOnly = freeToAirOnly;
332  m_serviceRequirements = service_requirements;
333  m_sourceid = sourceid;
334  // The import is handled by the monitor thread after the complete event
336  }
337  else if (nScanType == ScanTypeSetting::IPTVImport)
338  {
339  ImportM3U(cardid, inputname, sourceid, false);
340  }
341  else if (nScanType == ScanTypeSetting::VBoxImport)
342  {
343  ImportVBox(cardid, inputname, sourceid,
344  freeToAirOnly,
345  service_requirements);
346  }
347  else if (nScanType == ScanTypeSetting::HDHRImport)
348  {
349  ImportHDHR(cardid, inputname, sourceid,
350  service_requirements);
351  }
352  else if (nScanType == ScanTypeSetting::ExternRecImport)
353  {
354  ImportExternRecorder(cardid, inputname, sourceid);
355  }
356  else if (nScanType == ScanTypeSetting::IPTVImportMPTS)
357  {
358  ImportM3U(cardid, inputname, sourceid, true);
359  }
360  else
361  {
362  Scan(
363  nScanType,
364  cardid,
365  inputname,
366  sourceid,
367  IgnoreSignalTimeout, // do_ignore_signal_timeout,
368  FollowNITSetting, // do_follow_nit,
369  TestDecryptable,
370  freeToAirOnly,
375  AddFullTS,
376  service_requirements,
377  MplexId,
378  startChan,
379  freq_std,
380  modulation,
381  FreqTable,
382  FirstChan,
383  LastChan);
384  }
385 
386  return true;
387 }
388 
390 {
391  m_runType = 0;
392  m_onlysavescan = false;
393  m_interactive = false;
394  m_cardid = 0;
395  m_status = "IDLE";
396  m_statusLock = false;
397  m_statusProgress = 0;
398  m_statusSnr = 0;
399  m_statusText = "";
400  m_statusLog = "";
401  m_statusTitleText = "";
404  m_showSignalLock = false;
405  m_showSignalStrength = false;
406  m_showSignalNoise = false;
407  m_showRotorPos = false;
408  m_dlgMsg = "";
409  m_dlgButtons.clear();
410  m_dlgInputReq = false;
411  m_dlgButton = -1;
412  m_dlgString = "";
413 }
414 
416 {
417  stopMon();
418  ResetStatus();
419  m_cardid = cardId;
420  m_status = "RUNNING";
421  m_monitorThread = new MThread("ScanMonitor");
423  m_scanMonitor = new ScanMonitor(this);
424  m_scanMonitor->moveToThread(m_monitorThread->qthread());
425 }
426 
427 // run in an http thread to stop the scan
429 {
430  if (m_scanMonitor)
431  {
433  }
434 }
435 
436 // run in either a monitor thread when scan completes
437 // or an http thread when starting the next scan
439 {
440  if (m_monitorThread)
441  {
442  if (m_scanMonitor)
444  m_scanMonitor = nullptr;
446  if (QThread::currentThread() != m_monitorThread->qthread())
447  {
449  delete m_monitorThread;
450  m_monitorThread = nullptr;
451  }
452  }
453 }
454 
455 
456 // run in the monitor thread
458 {
459  auto type = scanEvent->type();
463  {
465  {
466  m_statusText = tr("Scan Complete");
467  }
468  else if (type == ScannerEvent::kScanShutdown)
469  {
470  m_statusText = tr("Scan Shut Down");
471  }
472  else if (type == ScannerEvent::kScanErrored)
473  {
474  m_statusText = tr("Scan Error") + " " + scanEvent->strValue();
475  }
476  if (m_sigmonScanner)
477  {
480  QString msg = tr("Found %1 Transports").arg(m_transports.size());
481  m_statusTitleText = msg;
482  }
483 
484  bool success = (m_iptvScanner != nullptr);
485 #ifdef USING_VBOX
486  success |= (m_vboxScanner != nullptr);
487 #endif
488 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
489  success |= (m_externRecScanner != nullptr);
490 #endif
491 #ifdef USING_HDHOMERUN
492  success |= (m_hdhrScanner != nullptr);
493 #endif
494  Teardown();
495 
497  {
498  ScanDTVTransportList transports = LoadScan(m_scanId);
499  ChannelImporter ci(true, true, true, true, false,
503  m_fullSearch,
506  ci.Process(transports, get_on_input("sourceid", m_cardid).toUInt());
507  }
508  else if (type != ScannerEvent::kScanErrored)
509  {
510  Process(m_transports, success);
511  }
512  stopMon();
513  m_status = "IDLE";
514 
515  }
517  {
518  log(scanEvent->strValue());
519  }
521  {
522  m_statusText = scanEvent->strValue();
523  }
525  {
526  m_statusProgress = scanEvent->intValue();
527  }
529  {
530  m_statusLock = scanEvent->boolValue();
531  }
533  {
534  m_statusSnr = scanEvent->intValue() * 100 / 65535;
535  }
537  {
538  m_statusTitleText = scanEvent->strValue();
539  }
541  {
542  m_statusRotorPosition = scanEvent->intValue();
543  }
545  {
546  m_statusSignalStrength = scanEvent->intValue() * 100 / 65535;
547  }
548 
549  QString msg;
550  if (VERBOSE_LEVEL_NONE() || VERBOSE_LEVEL_CHECK(VB_CHANSCAN, LOG_INFO))
551  {
552  msg = QString("%1% S/N %2 %3 : %4 (%5) %6")
553  .arg(m_statusProgress, 3)
554  .arg(m_statusSnr)
555  .arg((m_statusLock) ? "l" : "L",
556  qPrintable(m_statusText),
557  qPrintable(scanEvent->strValue()))
558  .arg("", 20);
559  }
560 
561  if (VERBOSE_LEVEL_CHECK(VB_CHANSCAN, LOG_INFO))
562  {
563  static QString s_oldMsg;
564  if (msg != s_oldMsg)
565  {
566  LOG(VB_CHANSCAN, LOG_INFO, LOC + msg);
567  s_oldMsg = msg;
568  }
569  }
570  else if (VERBOSE_LEVEL_NONE())
571  {
572  if (msg.length() > 80)
573  msg = msg.left(77) + "...";
574  std::cout << "\r" << msg.toLatin1().constData() << "\r";
575  std::cout << std::flush;
576  }
577 }
578 
580 {
581  LOG(VB_GENERAL, LOG_ERR, LOC + error);
582  // post_event(m_scanMonitor, ScannerEvent::ScanErrored, 0);
583  m_statusLog.append(error).append('\n');
584  m_dlgMsg = error;
585 }
586 
587 void ChannelScannerWeb::log(const QString &msg)
588 {
589  m_statusLog.append(msg).append("\n");
590 }
591 
592 // run in the monitor thread
594  bool success)
595 {
596  ChannelImporter ci(true, true, true, true, true,
599  ci.Process(_transports, m_sourceid);
600 }
601 
603  bool lock, bool strength, bool snr, bool rotorpos)
604 {
605  m_showSignalLock = lock;
606  m_showSignalStrength = strength;
607  m_showSignalNoise = snr;
608  m_showRotorPos = rotorpos;
609 }
ChannelScanner::ImportVBox
virtual bool ImportVBox(uint cardid, const QString &inputname, uint sourceid, bool ftaOnly, ServiceRequirements serviceType)
Definition: channelscanner.cpp:377
CardUtil::HDHRdoesDVBC
static bool HDHRdoesDVBC(const QString &device)
If the device is valid, check if the model does DVB-C.
Definition: cardutil.cpp:3105
ChannelScannerWeb::InformUser
void InformUser(const QString &error) override
Definition: channelscanner_web.cpp:579
ChannelScannerWeb::m_showSignalNoise
bool m_showSignalNoise
Definition: channelscanner_web.h:132
ChannelScannerWeb::m_dlgInputReq
bool m_dlgInputReq
Definition: channelscanner_web.h:125
CardUtil::INPUT_TYPES::HDHOMERUN
@ HDHOMERUN
ScanTypeSetting::FullScan_DVBT
@ FullScan_DVBT
Definition: scanwizardconfig.h:80
RemoveDuplicates
Definition: channelscanmiscsettings.h:174
MThread::start
void start(QThread::Priority p=QThread::InheritPriority)
Tell MThread to start running the thread in the near future.
Definition: mthread.cpp:283
ChannelScannerWeb::m_statusProgress
uint m_statusProgress
Definition: channelscanner_web.h:116
ChannelScannerWeb::ChannelScannerWeb
ChannelScannerWeb(void)=default
ChannelScanner::m_hdhrScanner
HDHRChannelFetcher * m_hdhrScanner
Definition: channelscanner.h:148
LOC
#define LOC
Definition: channelscanner_web.cpp:43
CompleteChannelsOnly
Definition: channelscanmiscsettings.h:139
channelimporter.h
MThread::wait
bool wait(std::chrono::milliseconds time=std::chrono::milliseconds::max())
Wait for the MThread to exit, with a maximum timeout.
Definition: mthread.cpp:300
ChannelScannerWeb::StartScan
bool StartScan(uint CardId, const QString &DesiredServices, bool FreeToAirOnly, bool ChannelNumbersOnly, bool CompleteChannelsOnly, bool FullChannelSearch, bool RemoveDuplicates, bool AddFullTS, bool TestDecryptable, const QString &ScanType, const QString &FreqTable, QString Modulation, const QString &FirstChan, const QString &LastChan, uint ScanId, bool IgnoreSignalTimeout, bool FollowNITSetting, uint MplexId, const QString &Frequency, const QString &Bandwidth, const QString &Polarity, const QString &SymbolRate, const QString &Inversion, const QString &Constellation, const QString &ModSys, const QString &CodeRate_LP, const QString &CodeRate_HP, const QString &FEC, const QString &Trans_Mode, const QString &Guard_Interval, const QString &Hierarchy, const QString &RollOff)
Definition: channelscanner_web.cpp:56
ChannelScannerWeb::m_runType
int m_runType
Definition: channelscanner_web.h:101
kRequireAudio
@ kRequireAudio
Definition: channelscantypes.h:8
CardUtil::INPUT_TYPES::DVBS2
@ DVBS2
ChannelScannerWeb::m_monitorThread
MThread * m_monitorThread
Definition: channelscanner_web.h:135
channelscan_sm.h
VERBOSE_LEVEL_CHECK
static bool VERBOSE_LEVEL_CHECK(uint64_t mask, LogLevel_t level)
Definition: mythlogging.h:29
ScanTypeSetting::NITAddScan_DVBT
@ NITAddScan_DVBT
Definition: scanwizardconfig.h:84
ScanTypeSetting::ExistingScanImport
@ ExistingScanImport
Definition: scanwizardconfig.h:102
scanwizardconfig.h
ChannelScannerWeb::HandleEvent
void HandleEvent(const ScannerEvent *scanEvent) override
Definition: channelscanner_web.cpp:457
ScannerEvent::kAppendTextToLog
static const Type kAppendTextToLog
Definition: scanmonitor.h:109
channelscanner_web.h
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
ChannelScanner::m_removeDuplicates
bool m_removeDuplicates
Remove duplicate transports and channels?
Definition: channelscanner.h:164
ChannelScannerWeb::m_cardid
uint m_cardid
Definition: channelscanner_web.h:111
ChannelScannerWeb::m_scantype
int m_scantype
Definition: channelscanner_web.h:105
ChannelScannerWeb::m_dlgString
QString m_dlgString
Definition: channelscanner_web.h:127
ScanTypeSetting::FullScan_DVBT2
@ FullScan_DVBT2
Definition: scanwizardconfig.h:81
ChannelImporter::Process
void Process(const ScanDTVTransportList &_transports, int sourceid=-1)
Definition: channelimporter.cpp:103
CardUtil::INPUT_TYPES::V4L
@ V4L
ScanMonitor::deleteLater
virtual void deleteLater(void)
Definition: scanmonitor.cpp:91
ChannelScanSM::StopScanner
void StopScanner(void)
Stops the ChannelScanSM event loop and the signal monitor, blocking until both exit.
Definition: channelscan_sm.cpp:2291
ScannerEvent::kSetStatusText
static const Type kSetStatusText
Definition: scanmonitor.h:110
ScannerEvent::boolValue
bool boolValue() const
Definition: scanmonitor.h:100
ScanTypeSetting::NITAddScan_DVBT2
@ NITAddScan_DVBT2
Definition: scanwizardconfig.h:85
CardUtil::ProbeSubTypeName
static QString ProbeSubTypeName(uint inputid)
Definition: cardutil.cpp:982
IgnoreSignalTimeout
Definition: channelscanmiscsettings.h:52
ScannerEvent::kScanShutdown
static const Type kScanShutdown
Definition: scanmonitor.h:107
satiputils.h
ScannerEvent::kScanComplete
static const Type kScanComplete
Definition: scanmonitor.h:106
ChannelScanner::m_freeToAirOnly
bool m_freeToAirOnly
Only fta channels desired post scan?
Definition: channelscanner.h:152
mythlogging.h
ScanTypeSetting::IPTVImportMPTS
@ IPTVImportMPTS
Definition: scanwizardconfig.h:98
ChannelScannerWeb::m_interactive
bool m_interactive
Definition: channelscanner_web.h:103
ChannelScannerWeb::stopMon
void stopMon(void)
Definition: channelscanner_web.cpp:438
ChannelScanner::m_sigmonScanner
ChannelScanSM * m_sigmonScanner
Definition: channelscanner.h:132
ChannelScanner::m_sourceid
int m_sourceid
Definition: channelscanner.h:169
ScannerEvent::intValue
int intValue() const
Definition: scanmonitor.h:97
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
ChannelScannerWeb::m_dlgButton
int m_dlgButton
Definition: channelscanner_web.h:126
CardUtil::INPUT_TYPES::DVBC
@ DVBC
ScannerEvent::kSetStatusRotorPosition
static const Type kSetStatusRotorPosition
Definition: scanmonitor.h:113
ChannelScannerWeb::s_Instance
static ChannelScannerWeb * s_Instance
Definition: channelscanner_web.h:100
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
CardUtil::INPUT_TYPES::MPEG
@ MPEG
ScannerEvent::kSetStatusSignalToNoise
static const Type kSetStatusSignalToNoise
Definition: scanmonitor.h:114
ChannelScannerWeb::m_statusSnr
int m_statusSnr
Definition: channelscanner_web.h:117
ServiceRequirements
ServiceRequirements
Definition: channelscantypes.h:4
FreqTable
static GlobalComboBoxSetting * FreqTable()
Definition: backendsettings.cpp:251
ChannelScanner::m_fullSearch
bool m_fullSearch
Extended search for old channels post scan?
Definition: channelscanner.h:161
MThread::qthread
QThread * qthread(void)
Returns the thread, this will always return the same pointer no matter how often you restart the thre...
Definition: mthread.cpp:233
SatIP::toDVBInputType
static CardUtil::INPUT_TYPES toDVBInputType(const QString &deviceid)
Definition: satiputils.cpp:171
ChannelScanner::Teardown
virtual void Teardown(void)
Definition: channelscanner.cpp:65
ChannelScannerWeb::m_statusLock
bool m_statusLock
Definition: channelscanner_web.h:115
ChannelScannerWeb::m_transports
ScanDTVTransportList m_transports
Definition: channelscanner_web.h:104
ChannelScannerWeb::Process
void Process(const ScanDTVTransportList &_transports, bool success=false)
Definition: channelscanner_web.cpp:593
ScannerEvent::kSetStatusSignalLock
static const Type kSetStatusSignalLock
Definition: scanmonitor.h:116
CardUtil::INPUT_TYPES::ATSC
@ ATSC
ChannelScannerWeb::m_showRotorPos
bool m_showRotorPos
Definition: channelscanner_web.h:133
kRequireVideo
@ kRequireVideo
Definition: channelscantypes.h:7
ScanTypeSetting::HDHRImport
@ HDHRImport
Definition: scanwizardconfig.h:108
ScanDTVTransportList
std::vector< ScanDTVTransport > ScanDTVTransportList
Definition: dtvmultiplex.h:143
FullChannelSearch
Definition: channelscanmiscsettings.h:157
ScannerEvent::kSetStatusSignalStrength
static const Type kSetStatusSignalStrength
Definition: scanmonitor.h:115
ChannelScannerWeb::m_dlgMsg
QString m_dlgMsg
Definition: channelscanner_web.h:123
ChannelScannerWeb::ResetStatus
void ResetStatus()
Definition: channelscanner_web.cpp:389
ChannelScanner::m_channelNumbersOnly
bool m_channelNumbersOnly
Only channels with logical channel numbers desired post scan?
Definition: channelscanner.h:155
ChannelScanner::m_iptvScanner
IPTVChannelFetcher * m_iptvScanner
Definition: channelscanner.h:133
ScannerEvent
Definition: scanmonitor.h:86
ScanTypeSetting::NITAddScan_DVBS
@ NITAddScan_DVBS
Definition: scanwizardconfig.h:86
ChannelScannerWeb
Definition: channelscanner_web.h:46
hardwareprofile.smolt.error
def error(message)
Definition: smolt.py:409
CardUtil::INPUT_TYPES::DVBS
@ DVBS
ChannelScanner::m_addFullTS
bool m_addFullTS
Add MPTS "full transport stream" channels.
Definition: channelscanner.h:167
FollowNITSetting
Definition: channelscanmiscsettings.h:65
ChannelScannerWeb::m_statusText
QString m_statusText
Definition: channelscanner_web.h:118
ChannelScannerWeb::m_status
QString m_status
Definition: channelscanner_web.h:114
ChannelScannerWeb::m_statusRotorPosition
int m_statusRotorPosition
Definition: channelscanner_web.h:121
ChannelScanner::ScanMonitor
friend class ScanMonitor
Definition: channelscanner.h:71
ChannelScanner::m_serviceRequirements
ServiceRequirements m_serviceRequirements
Services desired post scan.
Definition: channelscanner.h:172
ScannerEvent::strValue
QString strValue() const
Definition: scanmonitor.h:94
ChannelScannerWeb::m_showSignalLock
bool m_showSignalLock
Definition: channelscanner_web.h:130
ScanTypeSetting::ExternRecImport
@ ExternRecImport
Definition: scanwizardconfig.h:106
ChannelScanner::m_scanMonitor
ScanMonitor * m_scanMonitor
Definition: channelscanner.h:128
ChannelNumbersOnly
Definition: channelscanmiscsettings.h:123
ChannelScannerWeb::m_showSignalStrength
bool m_showSignalStrength
Definition: channelscanner_web.h:131
ScanTypeSetting::NITAddScan_DVBC
@ NITAddScan_DVBC
Definition: scanwizardconfig.h:88
ScanTypeSetting::IPTVImport
@ IPTVImport
Definition: scanwizardconfig.h:96
cardutil.h
ScannerEvent::kSetStatusTitleText
static const Type kSetStatusTitleText
Definition: scanmonitor.h:111
DesiredServices
Definition: channelscanmiscsettings.h:79
ChannelScannerWeb::setupScan
void setupScan(int CardId)
Definition: channelscanner_web.cpp:415
ChannelImporter
Definition: channelimporter.h:71
CardUtil::INPUT_TYPES::DVBT2
@ DVBT2
CardUtil::HDHRdoesDVB
static bool HDHRdoesDVB(const QString &device)
If the device is valid, check if the model does DVB.
Definition: cardutil.cpp:3079
ScannerEvent::kSetPercentComplete
static const Type kSetPercentComplete
Definition: scanmonitor.h:112
ScannerEvent::kScanErrored
static const Type kScanErrored
Definition: scanmonitor.h:108
ScanTypeSetting::FullScan_ATSC
@ FullScan_ATSC
Definition: scanwizardconfig.h:78
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:48
LoadScan
ScanDTVTransportList LoadScan(uint scanid)
Definition: scaninfo.cpp:77
ChannelScannerWeb::m_statusLog
QString m_statusLog
Definition: channelscanner_web.h:119
ChannelScannerWeb::m_statusTitleText
QString m_statusTitleText
Definition: channelscanner_web.h:120
kRequireNothing
@ kRequireNothing
Definition: channelscantypes.h:6
MThread::exit
void exit(int retcode=0)
Use this to exit from the thread if you are using a Qt event loop.
Definition: mthread.cpp:278
VERBOSE_LEVEL_NONE
static bool VERBOSE_LEVEL_NONE()
Definition: mythlogging.h:28
ChannelScannerWeb::getInstance
static ChannelScannerWeb * getInstance()
Definition: channelscanner_web.cpp:47
ScanTypeSetting::FullScan_DVBC
@ FullScan_DVBC
Definition: scanwizardconfig.h:79
get_on_input
QString get_on_input(const QString &to_get, uint inputid)
Definition: cardutil.cpp:1257
ScanTypeSetting::VBoxImport
@ VBoxImport
Definition: scanwizardconfig.h:104
ChannelScannerWeb::m_onlysavescan
bool m_onlysavescan
Definition: channelscanner_web.h:102
ScanTypeSetting::TransportScan
@ TransportScan
Definition: scanwizardconfig.h:92
ChannelScannerWeb::log
void log(const QString &msg)
Definition: channelscanner_web.cpp:587
ChannelScannerWeb::stopScan
void stopScan()
Definition: channelscanner_web.cpp:428
ScanTypeSetting::NITAddScan_DVBS2
@ NITAddScan_DVBS2
Definition: scanwizardconfig.h:87
CardUtil::INPUT_TYPES
INPUT_TYPES
all the different inputs
Definition: cardutil.h:49
ChannelScanSM::GetChannelList
chan_info_map_t GetChannelList(transport_scan_items_it_t trans_info, ScannedChannelInfo *scan_info) const
Definition: channelscan_sm.cpp:1374
ScanTypeSetting::FullTransportScan
@ FullTransportScan
Definition: scanwizardconfig.h:90
ChannelScannerWeb::m_scanId
int m_scanId
Definition: channelscanner_web.h:106
ChannelScannerWeb::MonitorProgress
void MonitorProgress(bool lock, bool strength, bool snr, bool rotor) override
Definition: channelscanner_web.cpp:602
ScanTypeSetting::FullScan_Analog
@ FullScan_Analog
Definition: scanwizardconfig.h:77
post_event
void post_event(QObject *dest, QEvent::Type type, int val)
Percentage to set to after the first tune.
Definition: scanmonitor.cpp:68
ChannelScannerWeb::m_statusSignalStrength
int m_statusSignalStrength
Definition: channelscanner_web.h:122
ChannelScanner::ImportM3U
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
Definition: channelscanner.cpp:353
ChannelScannerWeb::m_dlgButtons
QStringList m_dlgButtons
Definition: channelscanner_web.h:124
ChannelScanner::m_completeOnly
bool m_completeOnly
Only complete channels desired post scan?
Definition: channelscanner.h:158
CardUtil::INPUT_TYPES::SATIP
@ SATIP
CardUtil::GetVideoDevice
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:294
uint
unsigned int uint
Definition: freesurround.h:24
CardUtil::toInputType
static INPUT_TYPES toInputType(const QString &name)
Definition: cardutil.h:78
CardUtil::INPUT_TYPES::DVBT
@ DVBT
AddFullTS
Definition: channelscanmiscsettings.h:190
ChannelScanner::ImportExternRecorder
virtual bool ImportExternRecorder(uint cardid, const QString &inputname, uint sourceid)
Definition: channelscanner.cpp:401