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