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 #include "channelscan_sm.h"
33 #include "channelimporter.h"
34 #include "libmythtv/cardutil.h"
36 #ifdef USING_SATIP
37 #include "recorders/satiputils.h"
38 #endif // USING_SATIP
39 
40 #define LOC QString("ChScanWeb: ")
41 
43 
45 {
46  if (s_Instance == nullptr)
48  return s_Instance;
49 }
50 
51 // Called from Web Service API
52 // Run in http thread
54  const QString &DesiredServices,
55  bool freeToAirOnly,
56  bool ChannelNumbersOnly,
58  bool FullChannelSearch,
59  bool RemoveDuplicates,
60  bool AddFullTS,
61  bool TestDecryptable,
62  const QString &ScanType,
63  const QString &FreqTable,
64  QString modulation,
65  const QString &FirstChan,
66  const QString &LastChan,
67  uint ScanId,
69  bool FollowNITSetting,
70  uint MplexId,
71  const QString &frequency,
72  const QString &bandwidth,
73  const QString &polarity,
74  const QString &symbolrate,
75  const QString &inversion,
76  const QString &constellation,
77  const QString &modsys,
78  const QString &coderate_lp,
79  const QString &coderate_hp,
80  const QString &fec,
81  const QString &trans_mode,
82  const QString &guard_interval,
83  const QString &hierarchy,
84  const QString &rolloff)
85 {
86 
87  ResetStatus();
88  m_cardid = cardid;
89  m_scanId = ScanId;
90 
91  QString subType = CardUtil::ProbeSubTypeName(cardid);
92  CardUtil::INPUT_TYPES inputType = CardUtil::toInputType(subType);
93 
94 #ifdef USING_SATIP
95  if (inputType == CardUtil::INPUT_TYPES::SATIP)
96  {
98  }
99 #endif // USING_SATIP
100 
101  int nScanType = -99;
102  if (ScanType == "FULL")
103  {
104  switch(inputType) {
106  nScanType = ScanTypeSetting::FullScan_ATSC;
107  break;
109  nScanType = ScanTypeSetting::FullScan_DVBT;
110  break;
114  break;
117  break;
119  nScanType = ScanTypeSetting::FullScan_DVBC;
120  break;
123  nScanType = ScanTypeSetting::FullScan_DVBC;
125  nScanType = ScanTypeSetting::FullScan_DVBT;
126  else
127  nScanType = ScanTypeSetting::FullScan_ATSC;
128  break;
129  default:
130  break;
131  }
132  }
133  else if (ScanType == "FULLTUNED")
134  {
135  switch(inputType) {
138  break;
141  break;
144  break;
147  break;
150  break;
156  break;
157  default:
158  break;
159  }
160  }
161  else if (ScanType == "VBOXIMPORT")
162  {
163  nScanType = ScanTypeSetting::VBoxImport;
164  }
165  else if (ScanType == "HDHRIMPORT")
166  {
167  nScanType = ScanTypeSetting::HDHRImport;
168  }
169  else if (ScanType == "MPTSIMPORT")
170  {
172  }
173  else if (ScanType == "M3UIMPORT")
174  {
175  nScanType = ScanTypeSetting::IPTVImport;
176  }
177  else if (ScanType == "ASI" || ScanType == "MPTS")
178  {
180  }
181  else if (ScanType == "EXTIMPORT")
182  {
184  }
185  else if (ScanType == "IMPORT")
186  {
188  }
189  else if (ScanType == "ALLTRANSPORT")
190  {
192  }
193  else if (ScanType == "ONETRANSPORT")
194  {
195  nScanType = ScanTypeSetting::TransportScan;
196  }
197 
198  if (nScanType == -99)
199  {
200  m_dlgMsg = QObject::tr("This scan type is not supported");
201  return false;
202  }
203  ServiceRequirements service_requirements
205  if (DesiredServices == "tv")
206  service_requirements = static_cast<ServiceRequirements> (kRequireVideo | kRequireAudio);
207  else if (DesiredServices == "audio")
208  service_requirements = kRequireAudio;
209  else if (DesiredServices == "all")
210  service_requirements = kRequireNothing;
211  QString freq_std;
212  switch(nScanType)
213  {
215  freq_std = "atsc";
216  break;
218  freq_std = "dvbc";
219  break;
222  freq_std = "dvbt";
223  break;
225  freq_std = "analog";
226  break;
227  }
228 
229  switch (nScanType)
230  {
232  // in this case the modulation is supplied in the
233  // scan call so it is not changed here
234  break;
236  modulation = "qam";
237  break;
240  modulation = "ofdm";
241  break;
243  modulation = "analog";
244  break;
245  }
246 
247  m_scantype = nScanType;
248 
249  // Get startChan. Logic copied from ScanOptionalConfig::GetStartChan(void)
250  QMap<QString,QString> startChan;
251  if (ScanTypeSetting::NITAddScan_DVBT == nScanType)
252  {
253  startChan["std"] = "dvb";
254  startChan["type"] = "OFDM";
255  startChan["frequency"] = frequency;
256  startChan["inversion"] = inversion;
257  startChan["bandwidth"] = bandwidth;
258  startChan["coderate_hp"] = coderate_hp;
259  startChan["coderate_lp"] = coderate_lp;
260  startChan["constellation"] = constellation;
261  startChan["trans_mode"] = trans_mode;
262  startChan["guard_interval"] = guard_interval;
263  startChan["hierarchy"] = hierarchy;
264  }
265  else if (ScanTypeSetting::NITAddScan_DVBT2 == nScanType)
266  {
267  startChan["std"] = "dvb";
268  startChan["type"] = "DVB_T2";
269  startChan["frequency"] = frequency;
270  startChan["inversion"] = inversion;
271  startChan["bandwidth"] = bandwidth;
272  startChan["coderate_hp"] = coderate_hp;
273  startChan["coderate_lp"] = coderate_lp;
274  startChan["constellation"] = constellation;
275  startChan["trans_mode"] = trans_mode;
276  startChan["guard_interval"] = guard_interval;
277  startChan["hierarchy"] = hierarchy;
278  startChan["mod_sys"] = modsys;
279  }
280  else if (ScanTypeSetting::NITAddScan_DVBS == nScanType)
281  {
282  startChan["std"] = "dvb";
283  startChan["type"] = "QPSK";
284  startChan["modulation"] = "qpsk";
285  startChan["frequency"] = frequency;
286  startChan["inversion"] = inversion;
287  startChan["symbolrate"] = symbolrate;
288  startChan["fec"] = fec;
289  startChan["polarity"] = polarity;
290  }
291  else if (ScanTypeSetting::NITAddScan_DVBC == nScanType)
292  {
293  startChan["std"] = "dvb";
294  startChan["type"] = "QAM";
295  startChan["frequency"] = frequency;
296  startChan["symbolrate"] = symbolrate;
297  startChan["modulation"] = modulation;
298  startChan["mod_sys"] = modsys;
299  startChan["inversion"] = inversion;
300  startChan["fec"] = fec;
301  }
302  else if (ScanTypeSetting::NITAddScan_DVBS2 == nScanType)
303  {
304  startChan["std"] = "dvb";
305  startChan["type"] = "DVB_S2";
306  startChan["frequency"] = frequency;
307  startChan["inversion"] = inversion;
308  startChan["symbolrate"] = symbolrate;
309  startChan["fec"] = fec;
310  startChan["modulation"] = modulation;
311  startChan["polarity"] = polarity;
312  startChan["mod_sys"] = modsys;
313  startChan["rolloff"] = rolloff;
314  }
315 
316  setupScan(cardid);
317 
318  QString inputname = get_on_input("inputname", cardid);
319  int sourceid = get_on_input("sourceid", cardid).toUInt();
320 
321  if (ScanTypeSetting::ExistingScanImport == nScanType)
322  {
323  m_freeToAirOnly = freeToAirOnly;
329  m_serviceRequirements = service_requirements;
330  m_sourceid = sourceid;
331  // The import is handled by the monitor thread after the complete event
333  }
334  else if (nScanType == ScanTypeSetting::IPTVImport)
335  {
336  ImportM3U(cardid, inputname, sourceid, false);
337  }
338  else if (nScanType == ScanTypeSetting::VBoxImport)
339  {
340  ImportVBox(cardid, inputname, sourceid,
341  freeToAirOnly,
342  service_requirements);
343  }
344  else if (nScanType == ScanTypeSetting::HDHRImport)
345  {
346  ImportHDHR(cardid, inputname, sourceid,
347  service_requirements);
348  }
349  else if (nScanType == ScanTypeSetting::ExternRecImport)
350  {
351  ImportExternRecorder(cardid, inputname, sourceid);
352  }
353  else if (nScanType == ScanTypeSetting::IPTVImportMPTS)
354  {
355  ImportM3U(cardid, inputname, sourceid, true);
356  }
357  else
358  {
359  Scan(
360  nScanType,
361  cardid,
362  inputname,
363  sourceid,
364  IgnoreSignalTimeout, // do_ignore_signal_timeout,
365  FollowNITSetting, // do_follow_nit,
366  TestDecryptable,
367  freeToAirOnly,
372  AddFullTS,
373  service_requirements,
374  MplexId,
375  startChan,
376  freq_std,
377  modulation,
378  FreqTable,
379  FirstChan,
380  LastChan);
381  }
382 
383  return true;
384 }
385 
387 {
388  m_runType = 0;
389  m_onlysavescan = false;
390  m_interactive = false;
391  m_cardid = 0;
392  m_status = "IDLE";
393  m_statusLock = false;
394  m_statusProgress = 0;
395  m_statusSnr = 0;
396  m_statusText = "";
397  m_statusLog = "";
398  m_statusTitleText = "";
401  m_showSignalLock = false;
402  m_showSignalStrength = false;
403  m_showSignalNoise = false;
404  m_showRotorPos = false;
405  m_dlgMsg = "";
406  m_dlgButtons.clear();
407  m_dlgInputReq = false;
408  m_dlgButton = -1;
409  m_dlgString = "";
410 }
411 
413 {
414  stopMon();
415  ResetStatus();
416  m_cardid = cardId;
417  m_status = "RUNNING";
418  m_monitorThread = new MThread("ScanMonitor");
420  m_scanMonitor = new ScanMonitor(this);
421  m_scanMonitor->moveToThread(m_monitorThread->qthread());
422 }
423 
424 // run in an http thread to stop the scan
426 {
427  if (m_scanMonitor)
428  {
430  }
431 }
432 
433 // run in either a monitor thread when scan completes
434 // or an http thread when starting the next scan
436 {
437  if (m_monitorThread)
438  {
439  if (m_scanMonitor)
441  m_scanMonitor = nullptr;
443  if (QThread::currentThread() != m_monitorThread->qthread())
444  {
446  delete m_monitorThread;
447  m_monitorThread = nullptr;
448  }
449  }
450 }
451 
452 
453 // run in the monitor thread
455 {
456  auto type = scanEvent->type();
460  {
462  {
463  m_statusText = tr("Scan Complete");
464  }
465  else if (type == ScannerEvent::kScanShutdown)
466  {
467  m_statusText = tr("Scan Shut Down");
468  }
469  else if (type == ScannerEvent::kScanErrored)
470  {
471  m_statusText = tr("Scan Error") + " " + scanEvent->strValue();
472  }
473  if (m_sigmonScanner)
474  {
477  QString msg = tr("Found %1 Transports").arg(m_transports.size());
478  m_statusTitleText = msg;
479  }
480 
481  bool success = (m_iptvScanner != nullptr);
482 #ifdef USING_VBOX
483  success |= (m_vboxScanner != nullptr);
484 #endif
485 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
486  success |= (m_externRecScanner != nullptr);
487 #endif
488 #ifdef USING_HDHOMERUN
489  success |= (m_hdhrScanner != nullptr);
490 #endif
491  Teardown();
492 
494  {
495  ScanDTVTransportList transports = LoadScan(m_scanId);
496  ChannelImporter ci(true, true, true, true, false,
500  m_fullSearch,
503  ci.Process(transports, get_on_input("sourceid", m_cardid).toUInt());
504  }
505  else if (type != ScannerEvent::kScanErrored)
506  {
507  Process(m_transports, success);
508  }
509  stopMon();
510  m_status = "IDLE";
511 
512  }
514  {
515  log(scanEvent->strValue());
516  }
518  {
519  m_statusText = scanEvent->strValue();
520  }
522  {
523  m_statusProgress = scanEvent->intValue();
524  }
526  {
527  m_statusLock = scanEvent->boolValue();
528  }
530  {
531  m_statusSnr = scanEvent->intValue() * 100 / 65535;
532  }
534  {
535  m_statusTitleText = scanEvent->strValue();
536  }
538  {
539  m_statusRotorPosition = scanEvent->intValue();
540  }
542  {
543  m_statusSignalStrength = scanEvent->intValue() * 100 / 65535;
544  }
545 
546  QString msg;
547  if (VERBOSE_LEVEL_NONE() || VERBOSE_LEVEL_CHECK(VB_CHANSCAN, LOG_INFO))
548  {
549  msg = QString("%1% S/N %2 %3 : %4 (%5) %6")
550  .arg(m_statusProgress, 3)
551  .arg(m_statusSnr)
552  .arg((m_statusLock) ? "l" : "L",
553  qPrintable(m_statusText),
554  qPrintable(scanEvent->strValue()))
555  .arg("", 20);
556  }
557 
558  if (VERBOSE_LEVEL_CHECK(VB_CHANSCAN, LOG_INFO))
559  {
560  static QString s_oldMsg;
561  if (msg != s_oldMsg)
562  {
563  LOG(VB_CHANSCAN, LOG_INFO, LOC + msg);
564  s_oldMsg = msg;
565  }
566  }
567  else if (VERBOSE_LEVEL_NONE())
568  {
569  if (msg.length() > 80)
570  msg = msg.left(77) + "...";
571  std::cout << "\r" << msg.toLatin1().constData() << "\r";
572  std::cout << std::flush;
573  }
574 }
575 
577 {
578  LOG(VB_GENERAL, LOG_ERR, LOC + error);
579  // post_event(m_scanMonitor, ScannerEvent::ScanErrored, 0);
580  m_statusLog.append(error).append('\n');
581  m_dlgMsg = error;
582 }
583 
584 void ChannelScannerWeb::log(const QString &msg)
585 {
586  m_statusLog.append(msg).append("\n");
587 }
588 
589 // run in the monitor thread
591  bool success)
592 {
593  ChannelImporter ci(true, true, true, true, true,
596  ci.Process(_transports, m_sourceid);
597 }
598 
600  bool lock, bool strength, bool snr, bool rotorpos)
601 {
602  m_showSignalLock = lock;
603  m_showSignalStrength = strength;
604  m_showSignalNoise = snr;
605  m_showRotorPos = rotorpos;
606 }
ChannelScanner::ImportVBox
virtual bool ImportVBox(uint cardid, const QString &inputname, uint sourceid, bool ftaOnly, ServiceRequirements serviceType)
Definition: channelscanner.cpp:375
CardUtil::HDHRdoesDVBC
static bool HDHRdoesDVBC(const QString &device)
If the device is valid, check if the model does DVB-C.
Definition: cardutil.cpp:3104
ChannelScannerWeb::InformUser
void InformUser(const QString &error) override
Definition: channelscanner_web.cpp:576
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
error
static void error(const char *str,...)
Definition: vbi.cpp:37
ChannelScannerWeb::ChannelScannerWeb
ChannelScannerWeb(void)=default
ChannelScanner::m_hdhrScanner
HDHRChannelFetcher * m_hdhrScanner
Definition: channelscanner.h:148
LOC
#define LOC
Definition: channelscanner_web.cpp:40
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:53
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:454
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:101
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:981
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
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:435
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:109
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:424
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:169
ChannelScanner::Teardown
virtual void Teardown(void)
Definition: channelscanner.cpp:63
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:590
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:386
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
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:412
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:3078
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:44
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:1256
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:584
ChannelScannerWeb::stopScan
void stopScan()
Definition: channelscanner_web.cpp:425
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:599
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:351
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:399