Go to the documentation of this file.
27 #include <QCoreApplication>
33 #include "libmythbase/mythconfig.h"
42 #endif // CONFIG_SATIP
44 #define LOC QString("ChScanWeb: ")
66 const QString &ScanType,
69 const QString &FirstChan,
70 const QString &LastChan,
75 const QString &frequency,
76 const QString &bandwidth,
77 const QString &polarity,
78 const QString &symbolrate,
79 const QString &inversion,
80 const QString &constellation,
81 const QString &modsys,
82 const QString &coderate_lp,
83 const QString &coderate_hp,
85 const QString &trans_mode,
86 const QString &guard_interval,
87 const QString &hierarchy,
88 const QString &rolloff)
103 #endif // CONFIG_SATIP
106 if (ScanType ==
"FULL")
137 else if (ScanType ==
"FULLTUNED")
165 else if (ScanType ==
"VBOXIMPORT")
169 else if (ScanType ==
"HDHRIMPORT")
173 else if (ScanType ==
"MPTSIMPORT")
177 else if (ScanType ==
"M3UIMPORT")
181 else if (ScanType ==
"ASI" || ScanType ==
"MPTS")
185 else if (ScanType ==
"EXTIMPORT")
189 else if (ScanType ==
"IMPORT")
193 else if (ScanType ==
"ALLTRANSPORT")
197 else if (ScanType ==
"ONETRANSPORT")
202 if (nScanType == -99)
204 m_dlgMsg = QObject::tr(
"This scan type is not supported");
247 modulation =
"analog";
254 QMap<QString,QString> startChan;
257 startChan[
"std"] =
"dvb";
258 startChan[
"type"] =
"OFDM";
259 startChan[
"frequency"] = frequency;
260 startChan[
"inversion"] = inversion;
261 startChan[
"bandwidth"] = bandwidth;
262 startChan[
"coderate_hp"] = coderate_hp;
263 startChan[
"coderate_lp"] = coderate_lp;
264 startChan[
"constellation"] = constellation;
265 startChan[
"trans_mode"] = trans_mode;
266 startChan[
"guard_interval"] = guard_interval;
267 startChan[
"hierarchy"] = hierarchy;
271 startChan[
"std"] =
"dvb";
272 startChan[
"type"] =
"DVB_T2";
273 startChan[
"frequency"] = frequency;
274 startChan[
"inversion"] = inversion;
275 startChan[
"bandwidth"] = bandwidth;
276 startChan[
"coderate_hp"] = coderate_hp;
277 startChan[
"coderate_lp"] = coderate_lp;
278 startChan[
"constellation"] = constellation;
279 startChan[
"trans_mode"] = trans_mode;
280 startChan[
"guard_interval"] = guard_interval;
281 startChan[
"hierarchy"] = hierarchy;
282 startChan[
"mod_sys"] = modsys;
286 startChan[
"std"] =
"dvb";
287 startChan[
"type"] =
"QPSK";
288 startChan[
"modulation"] =
"qpsk";
289 startChan[
"frequency"] = frequency;
290 startChan[
"inversion"] = inversion;
291 startChan[
"symbolrate"] = symbolrate;
292 startChan[
"fec"] = fec;
293 startChan[
"polarity"] = polarity;
297 startChan[
"std"] =
"dvb";
298 startChan[
"type"] =
"QAM";
299 startChan[
"frequency"] = frequency;
300 startChan[
"symbolrate"] = symbolrate;
301 startChan[
"modulation"] = modulation;
302 startChan[
"mod_sys"] = modsys;
303 startChan[
"inversion"] = inversion;
304 startChan[
"fec"] = fec;
308 startChan[
"std"] =
"dvb";
309 startChan[
"type"] =
"DVB_S2";
310 startChan[
"frequency"] = frequency;
311 startChan[
"inversion"] = inversion;
312 startChan[
"symbolrate"] = symbolrate;
313 startChan[
"fec"] = fec;
314 startChan[
"modulation"] = modulation;
315 startChan[
"polarity"] = polarity;
316 startChan[
"mod_sys"] = modsys;
317 startChan[
"rolloff"] = rolloff;
323 int sourceid =
get_on_input(
"sourceid", cardid).toUInt();
340 ImportM3U(cardid, inputname, sourceid,
false);
346 service_requirements);
351 service_requirements);
359 ImportM3U(cardid, inputname, sourceid,
true);
377 service_requirements,
460 auto type = scanEvent->type();
481 QString msg = tr(
"Found %1 Transports").arg(
m_transports.size());
487 success |= (m_vboxScanner !=
nullptr);
489 #if !defined( _WIN32 )
490 success |= (m_externRecScanner !=
nullptr);
493 success |= (m_hdhrScanner !=
nullptr);
553 msg = QString(
"%1% S/N %2 %3 : %4 (%5) %6")
564 static QString s_oldMsg;
567 LOG(VB_CHANSCAN, LOG_INFO,
LOC + msg);
573 if (msg.length() > 80)
574 msg = msg.left(77) +
"...";
575 std::cout <<
"\r" << msg.toLatin1().constData() <<
"\r";
576 std::cout << std::flush;
604 bool lock,
bool strength,
bool snr,
bool rotorpos)
virtual bool ImportVBox(uint cardid, const QString &inputname, uint sourceid, bool ftaOnly, ServiceRequirements serviceType)
static bool HDHRdoesDVBC(const QString &device)
If the device is valid, check if the model does DVB-C.
void InformUser(const QString &error) override
void start(QThread::Priority p=QThread::InheritPriority)
Tell MThread to start running the thread in the near future.
ChannelScannerWeb(void)=default
bool wait(std::chrono::milliseconds time=std::chrono::milliseconds::max())
Wait for the MThread to exit, with a maximum timeout.
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)
MThread * m_monitorThread
static bool VERBOSE_LEVEL_CHECK(uint64_t mask, LogLevel_t level)
void HandleEvent(const ScannerEvent *scanEvent) override
static const Type kAppendTextToLog
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
bool m_removeDuplicates
Remove duplicate transports and channels?
void Process(const ScanDTVTransportList &_transports, int sourceid=-1)
virtual void deleteLater(void)
void StopScanner(void)
Stops the ChannelScanSM event loop and the signal monitor, blocking until both exit.
static const Type kSetStatusText
static QString ProbeSubTypeName(uint inputid)
static const Type kScanShutdown
static const Type kScanComplete
bool m_freeToAirOnly
Only fta channels desired post scan?
ChannelScanSM * m_sigmonScanner
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())
static const Type kSetStatusRotorPosition
static ChannelScannerWeb * s_Instance
@ CurrentTransportScan
Scans the transport when there is no tuner (for ASI)
virtual bool ImportHDHR(uint cardid, const QString &inputname, uint sourceid, ServiceRequirements serviceType)
static const Type kSetStatusSignalToNoise
static GlobalComboBoxSetting * FreqTable()
bool m_fullSearch
Extended search for old channels post scan?
QThread * qthread(void)
Returns the thread, this will always return the same pointer no matter how often you restart the thre...
static CardUtil::INPUT_TYPES toDVBInputType(const QString &deviceid)
virtual void Teardown(void)
ScanDTVTransportList m_transports
void Process(const ScanDTVTransportList &_transports, bool success=false)
static const Type kSetStatusSignalLock
std::vector< ScanDTVTransport > ScanDTVTransportList
static const Type kSetStatusSignalStrength
bool m_channelNumbersOnly
Only channels with logical channel numbers desired post scan?
IPTVChannelFetcher * m_iptvScanner
bool m_addFullTS
Add MPTS "full transport stream" channels.
int m_statusRotorPosition
ServiceRequirements m_serviceRequirements
Services desired post scan.
ScanMonitor * m_scanMonitor
bool m_showSignalStrength
static const Type kSetStatusTitleText
void setupScan(int CardId)
static bool HDHRdoesDVB(const QString &device)
If the device is valid, check if the model does DVB.
static const Type kSetPercentComplete
static const Type kScanErrored
This is a wrapper around QThread that does several additional things.
ScanDTVTransportList LoadScan(uint scanid)
QString m_statusTitleText
void exit(int retcode=0)
Use this to exit from the thread if you are using a Qt event loop.
static bool VERBOSE_LEVEL_NONE()
static ChannelScannerWeb * getInstance()
QString get_on_input(const QString &to_get, uint inputid)
void log(const QString &msg)
INPUT_TYPES
all the different inputs
chan_info_map_t GetChannelList(transport_scan_items_it_t trans_info, ScannedChannelInfo *scan_info) const
void MonitorProgress(bool lock, bool strength, bool snr, bool rotor) override
void post_event(QObject *dest, QEvent::Type type, int val)
Percentage to set to after the first tune.
int m_statusSignalStrength
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
bool m_completeOnly
Only complete channels desired post scan?
static QString GetVideoDevice(uint inputid)
static INPUT_TYPES toInputType(const QString &name)
virtual bool ImportExternRecorder(uint cardid, const QString &inputname, uint sourceid)