34#include <QElapsedTimer>
64using pmt_vec_t = std::vector<const ProgramMapTable*>;
77 inline void AllGood(
void)
override;
96 const QString &cardtype,
ChannelBase* channel,
int sourceID,
97 std::chrono::milliseconds signal_timeout, std::chrono::milliseconds channel_timeout,
98 QString inputname,
bool test_decryption);
105 int SourceID,
const QString &
std,
const QString &mod,
const QString &country,
106 const QString &table_start = QString(),
107 const QString &table_end = QString());
109 int sourceid,
const QMap<QString,QString> &startChan);
113 uint sourceid,
const QString &
std,
const QString &cardtype,
169 void run(
void)
override;
176 static void LogLines(
const QString&
string);
182 uint mpeg_program_num,
183 QString &service_name,
185 QString &common_status_info);
QList< ChannelListItem > ChannelList
QMap< uint, pmt_vec_t > pmt_map_t
std::vector< const ProgramMapTable * > pmt_vec_t
QPair< transport_scan_items_it_t, ScannedChannelInfo * > ChannelListItem
void StatusChannelTuned(const SignalMonitorValue &) override
Signal to be sent with change change status.
void AllGood(void) override
Signal to be sent when you have a lock on all values.
void StatusSignalStrength(const SignalMonitorValue &) override
Signal to be sent with an actual signal value.
AnalogSignalHandler(ChannelScanSM *_siscan)
void StatusSignalLock(const SignalMonitorValue &) override
Signal to be sent as true when it is safe to begin or continue recording, and false if it may not be ...
Tells what channels can be found on each transponder for one bouquet (a bunch of channels from one pr...
Abstract class providing a generic interface to tuning hardware.
Scanning class for cards that support a SignalMonitor class.
bool ScanTransportsStartingOn(int sourceid, const QMap< QString, QString > &startChan)
Generates a list of frequencies to scan and adds it to the scanTransport list, and then sets the scan...
QMutex m_lock
The big lock.
DTVTunerType GuessDTVTunerType(DTVTunerType type) const
void UpdateScanPercentCompleted(void)
void run(void) override
This runs the event loop for ChannelScanSM until 'm_threadExit' is true.
void HandleTDT(const TimeDateTable *) override
void UpdateScanTransports(uint frequency, const NetworkInformationTable *nit)
void IgnoreAudioOnlyMsg(const QString &name, int aux_num)
QSet< uint32_t > m_tsScanned
std::chrono::milliseconds m_otherTableTimeout
void HandleMGT(const MasterGuideTable *mgt) override
QMap< uint32_t, DTVMultiplex > m_extendTransports
std::chrono::milliseconds m_otherTableTime
void SetSourceID(int SourceID)
DTVTunerType m_scanDTVTunerType
ChannelList m_channelList
Found Channel Info.
DTVChannel * GetDTVChannel(void)
void HandleActiveScan(void)
Handles the TRANSPORT_LIST ChannelScanSM mode.
bool ScanForChannels(uint sourceid, const QString &std, const QString &cardtype, const DTVChannelList &channels)
void HandleEncryptionStatus(uint pnum, bool encrypted) override
void IgnoreDataOnlyMsg(const QString &name, int aux_num)
transport_scan_items_t m_scanTransports
static const std::chrono::milliseconds kMPEGTableTimeout
No logic here, lets just wait at least 15 seconds.
bool ScanTransport(uint mplexid, bool follow_nit)
void HandleSDTo(uint tsid, const ServiceDescriptionTable *sdt) override
void IgnoreEmptyChanMsg(const QString &name, int aux_num)
static const std::chrono::milliseconds kATSCTableTimeout
No logic here, lets just wait at least 10 seconds.
void SetAnalog(bool is_analog)
void HandleVCT(uint tsid, const VirtualChannelTable *vct) override
void HandleNIT(const NetworkInformationTable *nit) override
std::chrono::milliseconds m_signalTimeout
static QString loc(const ChannelScanSM *siscan)
void HandleSDT(uint tsid, const ServiceDescriptionTable *sdt) override
uint GetCurrentTransportInfo(QString &chan, QString &chan_tr) const
DVBSignalMonitor * GetDVBSignalMonitor(void)
void SetSignalTimeout(std::chrono::milliseconds val)
QMap< uint64_t, QString > m_defAuthorities
DTVSignalMonitor * GetDTVSignalMonitor(void)
MThread * m_scannerThread
static const std::chrono::milliseconds kDVBTableTimeout
SDT's should be sent every 2 seconds and NIT's every 10 seconds, so lets wait at least 30 seconds,...
QMap< uint, bool > m_currentEncryptionStatusChecked
SignalMonitor * GetSignalMonitor(void)
bool UpdateChannelInfo(bool wait_until_complete)
bool ScanTransports(int SourceID, const QString &std, const QString &mod, const QString &country, const QString &table_start=QString(), const QString &table_end=QString())
Generates a list of frequencies to scan and adds it to the scanTransport list, and then sets the scan...
bool Tune(transport_scan_items_it_t transport)
AnalogSignalHandler * m_analogSignalHandler
V4LChannel * GetV4LChannel(void)
chan_info_map_t GetChannelList(transport_scan_items_it_t trans_info, ScannedChannelInfo *scan_info) const
void HandlePMT(uint program_num, const ProgramMapTable *pmt) override
void HandleSTT(const SystemTimeTable *) override
void HandlePAT(const ProgramAssociationTable *pat) override
HDHRChannel * GetHDHRChannel(void)
~ChannelScanSM() override
bool m_currentTestingDecryption
ChannelScanSM(ScanMonitor *scan_monitor, const QString &cardtype, ChannelBase *channel, int sourceID, std::chrono::milliseconds signal_timeout, std::chrono::milliseconds channel_timeout, QString inputname, bool test_decryption)
static void LogLines(const QString &string)
std::chrono::milliseconds GetSignalTimeout(void) const
void HandleCAT(const ConditionalAccessTable *cat) override
void SetScanDTVTunerType(int t)
QMap< uint, uint > m_currentEncryptionStatus
bool ScanExistingTransports(uint sourceid, bool follow_nit)
If we are not already scanning a frequency table, this creates a new frequency table from database an...
void IgnoreEncryptedMsg(const QString &name, int aux_num)
ScannedChannelInfo * m_currentInfo
transport_scan_items_it_t m_current
std::chrono::milliseconds m_channelTimeout
SignalMonitor * m_signalMonitor
void SetChannelTimeout(std::chrono::milliseconds val)
void StopScanner(void)
Stops the ChannelScanSM event loop and the signal monitor, blocking until both exit.
bool ScanCurrentTransport(const QString &sistandard)
void HandleBAT(const BouquetAssociationTable *bat) override
void StartScanner(void)
Starts the ChannelScanSM event loop.
transport_scan_items_it_t m_nextIt
std::chrono::milliseconds GetChannelTimeout(void) const
void HandleNITo(const NetworkInformationTable *) override
DVBChannel * GetDVBChannel(void)
ScanMonitor * m_scanMonitor
QMap< uint, ChannelInsertInfo > chan_info_map_t
bool CheckImportedList(const DTVChannelInfoList &channels, uint mpeg_program_num, QString &service_name, QString &callsign, QString &common_status_info)
If we are scanning a dvb-utils import verify channel is in list.
bool TestNextProgramEncryption(void)
bool AddToList(uint mplexid)
bool ScanIPTVChannels(uint sourceid, const fbox_chan_map_t &iptv_channels)
void SetScanDTVTunerType(DTVTunerType t)
volatile bool m_threadExit
The CAT is used to transmit additional ConditionalAccessDescriptor instances, in addition to the ones...
Class providing a generic interface to digital tuning hardware.
This class is intended to detect the presence of needed tables.
static const int kTunerTypeUnknown
Provides interface to the tuning hardware when using DVB drivers.
QSqlQuery wrapper that fetches a DB connection from the connection pool.
This is a wrapper around QThread that does several additional things.
This table tells the decoder on which PIDs to find other tables, and their sizes and each table's cur...
The Program Association Table lists all the programs in a stream, and is always found on PID 0.
A PMT table maps a program described in the ProgramAssociationTable to various PID's which describe t...
void ScanPercentComplete(int pct)
This table tells the decoder on which PIDs to find A/V data.
Signal monitoring base class.
This table gives the current DVB stream time.
Implements tuning for TV cards using the V4L driver API, both versions 1 and 2.
This table contains information about the channels transmitted on this multiplex.
std::vector< DTVChannelInfo > DTVChannelInfoList
std::vector< DTVTransport > DTVChannelList
std::vector< ScanDTVTransport > ScanDTVTransportList
std::list< TransportScanItem > transport_scan_items_t
QMap< QString, IPTVChannelInfo > fbox_chan_map_t