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::SATIP)
96  {
98  }
99 #endif // USING_SATIP
100 
101  int nScanType = -99;
102  if (ScanType == "FULL")
103  {
104  switch(inputType) {
105  case CardUtil::ATSC:
106  nScanType = ScanTypeSetting::FullScan_ATSC;
107  break;
108  case CardUtil::DVBT:
109  nScanType = ScanTypeSetting::FullScan_DVBT;
110  break;
111  case CardUtil::V4L:
112  case CardUtil::MPEG:
114  break;
115  case CardUtil::DVBT2:
117  break;
118  case CardUtil::DVBC:
119  nScanType = ScanTypeSetting::FullScan_DVBC;
120  break;
121  case CardUtil::HDHOMERUN:
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) {
136  case CardUtil::DVBT:
138  break;
139  case CardUtil::DVBT2:
141  break;
142  case CardUtil::DVBS:
144  break;
145  case CardUtil::DVBS2:
147  break;
148  case CardUtil::DVBC:
150  break;
151  case CardUtil::HDHOMERUN:
156  break;
157  default:
158  break;
159  }
160  }
161  else if (ScanType == "VBOXIMPORT")
162  nScanType = ScanTypeSetting::VBoxImport;
163  else if (ScanType == "HDHRIMPORT")
164  nScanType = ScanTypeSetting::HDHRImport;
165  else if (ScanType == "MPTSIMPORT")
167  else if (ScanType == "M3UIMPORT")
168  nScanType = ScanTypeSetting::IPTVImport;
169  else if (ScanType == "ASI" || ScanType == "MPTS")
171  else if (ScanType == "EXTIMPORT")
173  else if (ScanType == "IMPORT")
175  else if (ScanType == "ALLTRANSPORT")
177  else if (ScanType == "ONETRANSPORT")
178  nScanType = ScanTypeSetting::TransportScan;
179 
180  if (nScanType == -99)
181  {
182  m_dlgMsg = QObject::tr("This scan type is not supported");
183  return false;
184  }
185  ServiceRequirements service_requirements
187  if (DesiredServices == "tv")
188  service_requirements = static_cast<ServiceRequirements> (kRequireVideo | kRequireAudio);
189  else if (DesiredServices == "audio")
190  service_requirements = kRequireAudio;
191  else if (DesiredServices == "all")
192  service_requirements = kRequireNothing;
193  QString freq_std;
194  switch(nScanType)
195  {
197  freq_std = "atsc";
198  break;
200  freq_std = "dvbc";
201  break;
204  freq_std = "dvbt";
205  break;
207  freq_std = "analog";
208  break;
209  }
210 
211  switch (nScanType)
212  {
214  // in this case the modulation is supplied in the
215  // scan call so it is not changed here
216  break;
218  modulation = "qam";
219  break;
222  modulation = "ofdm";
223  break;
225  modulation = "analog";
226  break;
227  }
228 
229  m_scantype = nScanType;
230 
231  // Get startChan. Logic copied from ScanOptionalConfig::GetStartChan(void)
232  QMap<QString,QString> startChan;
233  if (ScanTypeSetting::NITAddScan_DVBT == nScanType)
234  {
235  startChan["std"] = "dvb";
236  startChan["type"] = "OFDM";
237  startChan["frequency"] = frequency;
238  startChan["inversion"] = inversion;
239  startChan["bandwidth"] = bandwidth;
240  startChan["coderate_hp"] = coderate_hp;
241  startChan["coderate_lp"] = coderate_lp;
242  startChan["constellation"] = constellation;
243  startChan["trans_mode"] = trans_mode;
244  startChan["guard_interval"] = guard_interval;
245  startChan["hierarchy"] = hierarchy;
246  }
247  else if (ScanTypeSetting::NITAddScan_DVBT2 == nScanType)
248  {
249  startChan["std"] = "dvb";
250  startChan["type"] = "DVB_T2";
251  startChan["frequency"] = frequency;
252  startChan["inversion"] = inversion;
253  startChan["bandwidth"] = bandwidth;
254  startChan["coderate_hp"] = coderate_hp;
255  startChan["coderate_lp"] = coderate_lp;
256  startChan["constellation"] = constellation;
257  startChan["trans_mode"] = trans_mode;
258  startChan["guard_interval"] = guard_interval;
259  startChan["hierarchy"] = hierarchy;
260  startChan["mod_sys"] = modsys;
261  }
262  else if (ScanTypeSetting::NITAddScan_DVBS == nScanType)
263  {
264  startChan["std"] = "dvb";
265  startChan["type"] = "QPSK";
266  startChan["modulation"] = "qpsk";
267  startChan["frequency"] = frequency;
268  startChan["inversion"] = inversion;
269  startChan["symbolrate"] = symbolrate;
270  startChan["fec"] = fec;
271  startChan["polarity"] = polarity;
272  }
273  else if (ScanTypeSetting::NITAddScan_DVBC == nScanType)
274  {
275  startChan["std"] = "dvb";
276  startChan["type"] = "QAM";
277  startChan["frequency"] = frequency;
278  startChan["symbolrate"] = symbolrate;
279  startChan["modulation"] = modulation;
280  startChan["mod_sys"] = modsys;
281  startChan["inversion"] = inversion;
282  startChan["fec"] = fec;
283  }
284  else if (ScanTypeSetting::NITAddScan_DVBS2 == nScanType)
285  {
286  startChan["std"] = "dvb";
287  startChan["type"] = "DVB_S2";
288  startChan["frequency"] = frequency;
289  startChan["inversion"] = inversion;
290  startChan["symbolrate"] = symbolrate;
291  startChan["fec"] = fec;
292  startChan["modulation"] = modulation;
293  startChan["polarity"] = polarity;
294  startChan["mod_sys"] = modsys;
295  startChan["rolloff"] = rolloff;
296  }
297 
298  setupScan(cardid);
299 
300  QString inputname = get_on_input("inputname", cardid);
301  int sourceid = get_on_input("sourceid", cardid).toUInt();
302 
303  if (ScanTypeSetting::ExistingScanImport == nScanType)
304  {
305  m_freeToAirOnly = freeToAirOnly;
311  m_serviceRequirements = service_requirements;
312  m_sourceid = sourceid;
313  // The import is handled by the monitor thread after the complete event
315  }
316  else if (nScanType == ScanTypeSetting::IPTVImport)
317  {
318  ImportM3U(cardid, inputname, sourceid, false);
319  }
320  else if (nScanType == ScanTypeSetting::VBoxImport)
321  {
322  ImportVBox(cardid, inputname, sourceid,
323  freeToAirOnly,
324  service_requirements);
325  }
326  else if (nScanType == ScanTypeSetting::HDHRImport)
327  {
328  ImportHDHR(cardid, inputname, sourceid,
329  service_requirements);
330  }
331  else if (nScanType == ScanTypeSetting::ExternRecImport)
332  {
333  ImportExternRecorder(cardid, inputname, sourceid);
334  }
335  else if (nScanType == ScanTypeSetting::IPTVImportMPTS)
336  ImportM3U(cardid, inputname, sourceid, true);
337  else
338  {
339  Scan(
340  nScanType,
341  cardid,
342  inputname,
343  sourceid,
344  IgnoreSignalTimeout, // do_ignore_signal_timeout,
345  FollowNITSetting, // do_follow_nit,
346  TestDecryptable,
347  freeToAirOnly,
352  AddFullTS,
353  service_requirements,
354  MplexId,
355  startChan,
356  freq_std,
357  modulation,
358  FreqTable,
359  FirstChan,
360  LastChan);
361  }
362 
363  return true;
364 }
365 
367 {
368  m_runType = 0;
369  m_onlysavescan = false;
370  m_interactive = false;
371  m_cardid = 0;
372  m_status = "IDLE";
373  m_statusLock = false;
374  m_statusProgress = 0;
375  m_statusSnr = 0;
376  m_statusText = "";
377  m_statusLog = "";
378  m_statusTitleText = "";
381  m_showSignalLock = false;
382  m_showSignalStrength = false;
383  m_showSignalNoise = false;
384  m_showRotorPos = false;
385  m_dlgMsg = "";
386  m_dlgButtons.clear();
387  m_dlgInputReq = false;
388  m_dlgButton = -1;
389  m_dlgString = "";
390 }
391 
393 {
394  stopMon();
395  ResetStatus();
396  m_cardid = cardId;
397  m_status = "RUNNING";
398  m_monitorThread = new MThread("ScanMonitor");
400  m_scanMonitor = new ScanMonitor(this);
401  m_scanMonitor->moveToThread(m_monitorThread->qthread());
402 }
403 
404 // run in an http thread to stop the scan
406 {
407  if (m_scanMonitor)
408  {
410  }
411 }
412 
413 // run in either a monitor thread when scan completes
414 // or an http thread when starting the next scan
416 {
417  if (m_monitorThread)
418  {
419  if (m_scanMonitor)
421  m_scanMonitor = nullptr;
423  if (QThread::currentThread() != m_monitorThread->qthread())
424  {
426  delete m_monitorThread;
427  m_monitorThread = nullptr;
428  }
429  }
430 }
431 
432 
433 // run in the monitor thread
435 {
436  auto type = scanEvent->type();
440  {
442  {
443  m_statusText = tr("Scan Complete");
444  }
445  else if (type == ScannerEvent::kScanShutdown)
446  {
447  m_statusText = tr("Scan Shut Down");
448  }
449  else if (type == ScannerEvent::kScanErrored)
450  {
451  m_statusText = tr("Scan Error") + " " + scanEvent->strValue();
452  }
453  if (m_sigmonScanner)
454  {
457  QString msg = tr("Found %1 Transports").arg(m_transports.size());
458  m_statusTitleText = msg;
459  }
460 
461  bool success = (m_iptvScanner != nullptr);
462 #ifdef USING_VBOX
463  success |= (m_vboxScanner != nullptr);
464 #endif
465 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
466  success |= (m_externRecScanner != nullptr);
467 #endif
468 #ifdef USING_HDHOMERUN
469  success |= (m_hdhrScanner != nullptr);
470 #endif
471  Teardown();
472 
474  {
475  ScanDTVTransportList transports = LoadScan(m_scanId);
476  ChannelImporter ci(true, true, true, true, false,
480  m_fullSearch,
483  ci.Process(transports, get_on_input("sourceid", m_cardid).toUInt());
484  }
485  else if (type != ScannerEvent::kScanErrored)
486  {
487  Process(m_transports, success);
488  }
489  stopMon();
490  m_status = "IDLE";
491 
492  }
494  log(scanEvent->strValue());
496  m_statusText = scanEvent->strValue();
498  m_statusProgress = scanEvent->intValue();
500  m_statusLock = scanEvent->boolValue();
502  m_statusSnr = scanEvent->intValue() * 100 / 65535;
504  m_statusTitleText = scanEvent->strValue();
506  m_statusRotorPosition = scanEvent->intValue();
508  m_statusSignalStrength = scanEvent->intValue() * 100 / 65535;
509 
510  QString msg;
511  if (VERBOSE_LEVEL_NONE() || VERBOSE_LEVEL_CHECK(VB_CHANSCAN, LOG_INFO))
512  {
513  msg = QString("%1% S/N %2 %3 : %4 (%5) %6")
514  .arg(m_statusProgress, 3)
515  .arg(m_statusSnr)
516  .arg((m_statusLock) ? "l" : "L",
517  qPrintable(m_statusText),
518  qPrintable(scanEvent->strValue()))
519  .arg("", 20);
520  }
521 
522  if (VERBOSE_LEVEL_CHECK(VB_CHANSCAN, LOG_INFO))
523  {
524  static QString s_oldMsg;
525  if (msg != s_oldMsg)
526  {
527  LOG(VB_CHANSCAN, LOG_INFO, LOC + msg);
528  s_oldMsg = msg;
529  }
530  }
531  else if (VERBOSE_LEVEL_NONE())
532  {
533  if (msg.length() > 80)
534  msg = msg.left(77) + "...";
535  std::cout << "\r" << msg.toLatin1().constData() << "\r";
536  std::cout << std::flush;
537  }
538 }
539 
541 {
542  LOG(VB_GENERAL, LOG_ERR, LOC + error);
543  // post_event(m_scanMonitor, ScannerEvent::ScanErrored, 0);
544  m_statusLog.append(error).append('\n');
545  m_dlgMsg = error;
546 }
547 
548 void ChannelScannerWeb::log(const QString &msg)
549 {
550  m_statusLog.append(msg).append("\n");
551 }
552 
553 // run in the monitor thread
555  bool success)
556 {
557  ChannelImporter ci(true, true, true, true, true,
560  ci.Process(_transports, m_sourceid);
561 }
562 
564  bool lock, bool strength, bool snr, bool rotorpos)
565 {
566  m_showSignalLock = lock;
567  m_showSignalStrength = strength;
568  m_showSignalNoise = snr;
569  m_showRotorPos = rotorpos;
570 }
ChannelScanner::ImportVBox
virtual bool ImportVBox(uint cardid, const QString &inputname, uint sourceid, bool ftaOnly, ServiceRequirements serviceType)
Definition: channelscanner.cpp:358
CardUtil::HDHRdoesDVBC
static bool HDHRdoesDVBC(const QString &device)
If the device is valid, check if the model does DVB-C.
Definition: cardutil.cpp:3093
ChannelScannerWeb::InformUser
void InformUser(const QString &error) override
Definition: channelscanner_web.cpp:540
ChannelScannerWeb::m_showSignalNoise
bool m_showSignalNoise
Definition: channelscanner_web.h:132
CardUtil::DVBS
@ DVBS
Definition: cardutil.h:54
ChannelScannerWeb::m_dlgInputReq
bool m_dlgInputReq
Definition: channelscanner_web.h:125
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:36
ChannelScannerWeb::ChannelScannerWeb
ChannelScannerWeb(void)=default
ChannelScanner::m_hdhrScanner
HDHRChannelFetcher * m_hdhrScanner
Definition: channelscanner.h:147
ScanTypeSetting::FullTransportScan
@ FullTransportScan
Definition: scanwizardconfig.h:90
LOC
#define LOC
Definition: channelscanner_web.cpp:40
CompleteChannelsOnly
Definition: channelscanmiscsettings.h:139
CardUtil::SATIP
@ SATIP
Definition: cardutil.h:73
ScanTypeSetting::FullScan_DVBT
@ FullScan_DVBT
Definition: scanwizardconfig.h:80
CardUtil::toInputType
static enum INPUT_TYPES toInputType(const QString &name)
Definition: cardutil.h:78
channelimporter.h
CardUtil::DVBT2
@ DVBT2
Definition: cardutil.h:71
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
ScanTypeSetting::NITAddScan_DVBS
@ NITAddScan_DVBS
Definition: scanwizardconfig.h:86
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
scanwizardconfig.h
ChannelScannerWeb::HandleEvent
void HandleEvent(const ScannerEvent *scanEvent) override
Definition: channelscanner_web.cpp:434
ScannerEvent::kAppendTextToLog
static const Type kAppendTextToLog
Definition: scanmonitor.h:109
ScanTypeSetting::FullScan_ATSC
@ FullScan_ATSC
Definition: scanwizardconfig.h:78
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:163
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
ChannelImporter::Process
void Process(const ScanDTVTransportList &_transports, int sourceid=-1)
Definition: channelimporter.cpp:101
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:2270
kRequireAudio
@ kRequireAudio
Definition: channelscantypes.h:8
ScannerEvent::kSetStatusText
static const Type kSetStatusText
Definition: scanmonitor.h:110
ScannerEvent::boolValue
bool boolValue() const
Definition: scanmonitor.h:100
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:151
CardUtil::DVBS2
@ DVBS2
Definition: cardutil.h:64
ScanTypeSetting::NITAddScan_DVBT
@ NITAddScan_DVBT
Definition: scanwizardconfig.h:84
ChannelScannerWeb::m_interactive
bool m_interactive
Definition: channelscanner_web.h:103
ChannelScannerWeb::stopMon
void stopMon(void)
Definition: channelscanner_web.cpp:415
ChannelScanner::m_sigmonScanner
ChannelScanSM * m_sigmonScanner
Definition: channelscanner.h:131
ScanTypeSetting::VBoxImport
@ VBoxImport
Definition: scanwizardconfig.h:104
ChannelScanner::m_sourceid
int m_sourceid
Definition: channelscanner.h:168
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
ScanTypeSetting::FullScan_Analog
@ FullScan_Analog
Definition: scanwizardconfig.h:77
ChannelScannerWeb::m_dlgButton
int m_dlgButton
Definition: channelscanner_web.h:126
ScanTypeSetting::IPTVImportMPTS
@ IPTVImportMPTS
Definition: scanwizardconfig.h:98
ScannerEvent::kSetStatusRotorPosition
static const Type kSetStatusRotorPosition
Definition: scanmonitor.h:113
ChannelScannerWeb::s_Instance
static ChannelScannerWeb * s_Instance
Definition: channelscanner_web.h:100
ScanTypeSetting::ExistingScanImport
@ ExistingScanImport
Definition: scanwizardconfig.h:102
ChannelScanner::ImportHDHR
virtual bool ImportHDHR(uint cardid, const QString &inputname, uint sourceid, ServiceRequirements serviceType)
Definition: channelscanner.cpp:407
ScannerEvent::kSetStatusSignalToNoise
static const Type kSetStatusSignalToNoise
Definition: scanmonitor.h:114
CardUtil::HDHOMERUN
@ HDHOMERUN
Definition: cardutil.h:61
ChannelScannerWeb::m_statusSnr
int m_statusSnr
Definition: channelscanner_web.h:117
ScanTypeSetting::FullScan_DVBC
@ FullScan_DVBC
Definition: scanwizardconfig.h:79
FreqTable
static GlobalComboBoxSetting * FreqTable()
Definition: backendsettings.cpp:251
ChannelScanner::m_fullSearch
bool m_fullSearch
Extended search for old channels post scan?
Definition: channelscanner.h:160
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
ScanTypeSetting::NITAddScan_DVBT2
@ NITAddScan_DVBT2
Definition: scanwizardconfig.h:85
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:554
ScannerEvent::kSetStatusSignalLock
static const Type kSetStatusSignalLock
Definition: scanmonitor.h:116
ScanTypeSetting::NITAddScan_DVBC
@ NITAddScan_DVBC
Definition: scanwizardconfig.h:88
CardUtil::V4L
@ V4L
Definition: cardutil.h:58
ChannelScannerWeb::m_showRotorPos
bool m_showRotorPos
Definition: channelscanner_web.h:133
kRequireVideo
@ kRequireVideo
Definition: channelscantypes.h:7
uint
unsigned int uint
Definition: compat.h:81
ScanTypeSetting::CurrentTransportScan
@ CurrentTransportScan
Scans the transport when there is no tuner (for ASI)
Definition: scanwizardconfig.h:94
ScanTypeSetting::IPTVImport
@ IPTVImport
Definition: scanwizardconfig.h:96
ScanDTVTransportList
std::vector< ScanDTVTransport > ScanDTVTransportList
Definition: dtvmultiplex.h:143
FullChannelSearch
Definition: channelscanmiscsettings.h:157
ScannerEvent::kSetStatusSignalStrength
static const Type kSetStatusSignalStrength
Definition: scanmonitor.h:115
kRequireNothing
@ kRequireNothing
Definition: channelscantypes.h:6
CardUtil::DVBC
@ DVBC
Definition: cardutil.h:55
ChannelScannerWeb::m_dlgMsg
QString m_dlgMsg
Definition: channelscanner_web.h:123
ChannelScannerWeb::ResetStatus
void ResetStatus()
Definition: channelscanner_web.cpp:366
ChannelScanner::m_channelNumbersOnly
bool m_channelNumbersOnly
Only channels with logical channel numbers desired post scan?
Definition: channelscanner.h:154
ChannelScanner::m_iptvScanner
IPTVChannelFetcher * m_iptvScanner
Definition: channelscanner.h:132
ScannerEvent
Definition: scanmonitor.h:86
ChannelScannerWeb
Definition: channelscanner_web.h:46
ChannelScanner::m_addFullTS
bool m_addFullTS
Add MPTS "full transport stream" channels.
Definition: channelscanner.h:166
FollowNITSetting
Definition: channelscanmiscsettings.h:65
ChannelScannerWeb::m_statusText
QString m_statusText
Definition: channelscanner_web.h:118
ScanTypeSetting::TransportScan
@ TransportScan
Definition: scanwizardconfig.h:92
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:70
ChannelScanner::m_serviceRequirements
ServiceRequirements m_serviceRequirements
Services desired post scan.
Definition: channelscanner.h:171
ScannerEvent::strValue
QString strValue() const
Definition: scanmonitor.h:94
ScanTypeSetting::HDHRImport
@ HDHRImport
Definition: scanwizardconfig.h:108
ChannelScannerWeb::m_showSignalLock
bool m_showSignalLock
Definition: channelscanner_web.h:130
ChannelScanner::m_scanMonitor
ScanMonitor * m_scanMonitor
Definition: channelscanner.h:127
ChannelNumbersOnly
Definition: channelscanmiscsettings.h:123
ChannelScannerWeb::m_showSignalStrength
bool m_showSignalStrength
Definition: channelscanner_web.h:131
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:392
ChannelImporter
Definition: channelimporter.h:71
ScanTypeSetting::ExternRecImport
@ ExternRecImport
Definition: scanwizardconfig.h:106
CardUtil::HDHRdoesDVB
static bool HDHRdoesDVB(const QString &device)
If the device is valid, check if the model does DVB.
Definition: cardutil.cpp:3067
ScannerEvent::kSetPercentComplete
static const Type kSetPercentComplete
Definition: scanmonitor.h:112
ScannerEvent::kScanErrored
static const Type kScanErrored
Definition: scanmonitor.h:108
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
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
get_on_input
QString get_on_input(const QString &to_get, uint inputid)
Definition: cardutil.cpp:1256
ChannelScannerWeb::m_onlysavescan
bool m_onlysavescan
Definition: channelscanner_web.h:102
ChannelScannerWeb::log
void log(const QString &msg)
Definition: channelscanner_web.cpp:548
ChannelScannerWeb::stopScan
void stopScan()
Definition: channelscanner_web.cpp:405
CardUtil::MPEG
@ MPEG
Definition: cardutil.h:59
CardUtil::ATSC
@ ATSC
Definition: cardutil.h:57
ChannelScanSM::GetChannelList
chan_info_map_t GetChannelList(transport_scan_items_it_t trans_info, ScannedChannelInfo *scan_info) const
Definition: channelscan_sm.cpp:1354
ChannelScannerWeb::m_scanId
int m_scanId
Definition: channelscanner_web.h:106
ServiceRequirements
ServiceRequirements
Definition: channelscantypes.h:4
ChannelScannerWeb::MonitorProgress
void MonitorProgress(bool lock, bool strength, bool snr, bool rotor) override
Definition: channelscanner_web.cpp:563
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
ScanTypeSetting::NITAddScan_DVBS2
@ NITAddScan_DVBS2
Definition: scanwizardconfig.h:87
ScanTypeSetting::FullScan_DVBT2
@ FullScan_DVBT2
Definition: scanwizardconfig.h:81
ChannelScanner::ImportM3U
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
Definition: channelscanner.cpp:334
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:157
CardUtil::DVBT
@ DVBT
Definition: cardutil.h:56
CardUtil::GetVideoDevice
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:294
CardUtil::INPUT_TYPES
INPUT_TYPES
all the different inputs
Definition: cardutil.h:49
AddFullTS
Definition: channelscanmiscsettings.h:190
ChannelScanner::ImportExternRecorder
virtual bool ImportExternRecorder(uint cardid, const QString &inputname, uint sourceid)
Definition: channelscanner.cpp:382