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")
163 else if (ScanType ==
"HDHRIMPORT")
165 else if (ScanType ==
"MPTSIMPORT")
167 else if (ScanType ==
"M3UIMPORT")
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")
180 if (nScanType == -99)
182 m_dlgMsg = QObject::tr(
"This scan type is not supported");
225 modulation =
"analog";
232 QMap<QString,QString> startChan;
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;
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;
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;
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;
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;
301 int sourceid =
get_on_input(
"sourceid", cardid).toUInt();
318 ImportM3U(cardid, inputname, sourceid,
false);
324 service_requirements);
329 service_requirements);
336 ImportM3U(cardid, inputname, sourceid,
true);
353 service_requirements,
436 auto type = scanEvent->type();
457 QString msg = tr(
"Found %1 Transports").arg(
m_transports.size());
505 msg = QString(
"%1% S/N %2 %3 : %4 (%5) %6")
516 static QString s_oldMsg;
519 LOG(VB_CHANSCAN, LOG_INFO,
LOC + msg);
525 if (msg.length() > 80)
526 msg = msg.left(77) +
"...";
527 std::cout <<
"\r" << msg.toLatin1().constData() <<
"\r";
528 std::cout << std::flush;
556 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
static enum INPUT_TYPES toInputType(const QString &name)
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
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
@ CurrentTransportScan
Scans the transport when there is no tuner (for ASI)
std::vector< ScanDTVTransport > ScanDTVTransportList
static const Type kSetStatusSignalStrength
bool m_channelNumbersOnly
Only channels with logical channel numbers desired post scan?
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)
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)
INPUT_TYPES
all the different inputs
virtual bool ImportExternRecorder(uint cardid, const QString &inputname, uint sourceid)