Go to the documentation of this file.
27 #include <QCoreApplication>
40 #define LOC QString("ChScanWeb: ")
62 const QString &ScanType,
65 const QString &FirstChan,
66 const QString &LastChan,
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,
81 const QString &trans_mode,
82 const QString &guard_interval,
83 const QString &hierarchy,
84 const QString &rolloff)
102 if (ScanType ==
"FULL")
133 else if (ScanType ==
"FULLTUNED")
161 else if (ScanType ==
"VBOXIMPORT")
165 else if (ScanType ==
"HDHRIMPORT")
169 else if (ScanType ==
"MPTSIMPORT")
173 else if (ScanType ==
"M3UIMPORT")
177 else if (ScanType ==
"ASI" || ScanType ==
"MPTS")
181 else if (ScanType ==
"EXTIMPORT")
185 else if (ScanType ==
"IMPORT")
189 else if (ScanType ==
"ALLTRANSPORT")
193 else if (ScanType ==
"ONETRANSPORT")
198 if (nScanType == -99)
200 m_dlgMsg = QObject::tr(
"This scan type is not supported");
243 modulation =
"analog";
250 QMap<QString,QString> startChan;
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;
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;
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;
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;
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;
319 int sourceid =
get_on_input(
"sourceid", cardid).toUInt();
336 ImportM3U(cardid, inputname, sourceid,
false);
342 service_requirements);
347 service_requirements);
355 ImportM3U(cardid, inputname, sourceid,
true);
373 service_requirements,
456 auto type = scanEvent->type();
477 QString msg = tr(
"Found %1 Transports").arg(
m_transports.size());
483 success |= (m_vboxScanner !=
nullptr);
485 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
486 success |= (m_externRecScanner !=
nullptr);
488 #ifdef USING_HDHOMERUN
549 msg = QString(
"%1% S/N %2 %3 : %4 (%5) %6")
560 static QString s_oldMsg;
563 LOG(VB_CHANSCAN, LOG_INFO,
LOC + msg);
569 if (msg.length() > 80)
570 msg = msg.left(77) +
"...";
571 std::cout <<
"\r" << msg.toLatin1().constData() <<
"\r";
572 std::cout << std::flush;
600 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.
static void error(const char *str,...)
ChannelScannerWeb(void)=default
HDHRChannelFetcher * m_hdhrScanner
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)