Go to the documentation of this file.
27 #include <QCoreApplication>
43 #define LOC QString("ChScanWeb: ")
65 const QString &ScanType,
68 const QString &FirstChan,
69 const QString &LastChan,
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,
84 const QString &trans_mode,
85 const QString &guard_interval,
86 const QString &hierarchy,
87 const QString &rolloff)
102 #endif // USING_SATIP
105 if (ScanType ==
"FULL")
136 else if (ScanType ==
"FULLTUNED")
164 else if (ScanType ==
"VBOXIMPORT")
168 else if (ScanType ==
"HDHRIMPORT")
172 else if (ScanType ==
"MPTSIMPORT")
176 else if (ScanType ==
"M3UIMPORT")
180 else if (ScanType ==
"ASI" || ScanType ==
"MPTS")
184 else if (ScanType ==
"EXTIMPORT")
188 else if (ScanType ==
"IMPORT")
192 else if (ScanType ==
"ALLTRANSPORT")
196 else if (ScanType ==
"ONETRANSPORT")
201 if (nScanType == -99)
203 m_dlgMsg = QObject::tr(
"This scan type is not supported");
246 modulation =
"analog";
253 QMap<QString,QString> startChan;
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;
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;
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;
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;
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;
322 int sourceid =
get_on_input(
"sourceid", cardid).toUInt();
339 ImportM3U(cardid, inputname, sourceid,
false);
345 service_requirements);
350 service_requirements);
358 ImportM3U(cardid, inputname, sourceid,
true);
376 service_requirements,
459 auto type = scanEvent->type();
480 QString msg = tr(
"Found %1 Transports").arg(
m_transports.size());
486 success |= (m_vboxScanner !=
nullptr);
488 #if !defined( USING_MINGW ) && !defined( _MSC_VER )
489 success |= (m_externRecScanner !=
nullptr);
491 #ifdef USING_HDHOMERUN
552 msg = QString(
"%1% S/N %2 %3 : %4 (%5) %6")
563 static QString s_oldMsg;
566 LOG(VB_CHANSCAN, LOG_INFO,
LOC + msg);
572 if (msg.length() > 80)
573 msg = msg.left(77) +
"...";
574 std::cout <<
"\r" << msg.toLatin1().constData() <<
"\r";
575 std::cout << std::flush;
603 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
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)