MythTV  master
channelscan_sm.h
Go to the documentation of this file.
1 /* -*- Mode: c++ -*-
2  * vim: set expandtab tabstop=4 shiftwidth=4:
3  *
4  * Original Project
5  * MythTV http://www.mythtv.org
6  *
7  * Copyright (c) 2004, 2005 John Pullan <john@pullan.org>
8  * Copyright (c) 2005 - 2007 Daniel Kristjansson
9  *
10  * Description:
11  * Collection of classes to provide channel scanning functionallity
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
26  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
27  *
28  */
29 
30 #ifndef SISCAN_H
31 #define SISCAN_H
32 
33 // Qt includes
34 #include <QElapsedTimer>
35 #include <QList>
36 #include <QMap>
37 #include <QMutex>
38 #include <QPair>
39 #include <QRunnable>
40 #include <QSet>
41 #include <QString>
42 
43 // MythTV includes
44 #include "dtvconfparserhelpers.h" // for DTVTunerType
45 #include "frequencytables.h"
46 #include "iptvchannelfetcher.h"
47 #include "mpeg/streamlisteners.h"
48 #include "scanmonitor.h"
49 #include "signalmonitorlistener.h"
50 
51 class MThread;
52 class MSqlQuery;
53 
54 class ChannelBase;
55 class DTVChannel;
56 class V4LChannel;
57 class DVBChannel;
58 class HDHRChannel;
59 
60 class SignalMonitor;
61 class DTVSignalMonitor;
62 class DVBSignalMonitor;
63 
64 using pmt_vec_t = std::vector<const ProgramMapTable*>;
65 using pmt_map_t = QMap<uint, pmt_vec_t>;
66 class ScannedChannelInfo;
67 using ChannelListItem = QPair<transport_scan_items_it_t, ScannedChannelInfo*>;
68 using ChannelList = QList<ChannelListItem>;
69 
70 class ChannelScanSM;
72 {
73  public:
74  explicit AnalogSignalHandler(ChannelScanSM *_siscan) : m_siScan(_siscan) { }
75 
76  public:
77  inline void AllGood(void) override; // SignalMonitorListener
78  void StatusSignalLock(const SignalMonitorValue &/*val*/) override { } // SignalMonitorListener
79  void StatusChannelTuned(const SignalMonitorValue &/*val*/) override { } // SignalMonitorListener
80  void StatusSignalStrength(const SignalMonitorValue &/*val*/) override { } // SignalMonitorListener
81 
82  private:
84 };
85 
88  public DVBMainStreamListener,
90  public QRunnable
91 {
92  friend class AnalogSignalHandler;
93 
94  public:
95  ChannelScanSM(ScanMonitor *scan_monitor,
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);
99  ~ChannelScanSM() override;
100 
101  void StartScanner(void);
102  void StopScanner(void);
103 
104  bool ScanTransports(
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);
110  bool ScanTransport(uint mplexid, bool follow_nit);
111  bool ScanCurrentTransport(const QString &sistandard);
112  bool ScanForChannels(
113  uint sourceid, const QString &std, const QString &cardtype,
114  const DTVChannelList &channels);
115  bool ScanIPTVChannels(uint sourceid, const fbox_chan_map_t &iptv_channels);
116 
117  bool ScanExistingTransports(uint sourceid, bool follow_nit);
118 
119  void SetAnalog(bool is_analog);
121  void SetSignalTimeout(std::chrono::milliseconds val) { m_signalTimeout = val; }
122  void SetChannelTimeout(std::chrono::milliseconds val) { m_channelTimeout = val; }
125 
126  std::chrono::milliseconds GetSignalTimeout(void) const { return m_signalTimeout; }
127  std::chrono::milliseconds GetChannelTimeout(void) const { return m_channelTimeout; }
128 
132 
133  using chan_info_map_t = QMap<uint,ChannelInsertInfo>;
135  ScannedChannelInfo *scan_info) const;
136  uint GetCurrentTransportInfo(QString &chan, QString &chan_tr) const;
137  ScanDTVTransportList GetChannelList(bool addFullTS) const;
138 
139  // MPEG
140  void HandlePAT(const ProgramAssociationTable *pat) override; // MPEGStreamListener
141  void HandleCAT(const ConditionalAccessTable *cat) override; // MPEGStreamListener
142  void HandlePMT(uint program_num, const ProgramMapTable *pmt) override; // MPEGStreamListener
143  void HandleEncryptionStatus(uint pnum, bool encrypted) override; // MPEGStreamListener
144 
145  // ATSC Main
146  void HandleSTT(const SystemTimeTable */*stt*/) override {} // ATSCMainStreamListener
147  void HandleMGT(const MasterGuideTable *mgt) override; // ATSCMainStreamListener
148  void HandleVCT(uint tsid, const VirtualChannelTable *vct) override; // ATSCMainStreamListener
149 
150  // DVB Main
151  void HandleNIT(const NetworkInformationTable *nit) override; // DVBMainStreamListener
152  void HandleSDT(uint tsid, const ServiceDescriptionTable *sdt) override; // DVBMainStreamListener
153  void HandleTDT(const TimeDateTable */*tdt*/) override {} // DVBMainStreamListener
154 
155  // DVB Other
156  void HandleNITo(const NetworkInformationTable */*nit*/) override {} // DVBOtherStreamListener
157  void HandleSDTo(uint tsid, const ServiceDescriptionTable *sdt) override; // DVBOtherStreamListener
158  void HandleBAT(const BouquetAssociationTable *bat) override; // DVBOtherStreamListener
159 
160  private:
161  // Gets
162  DTVChannel *GetDTVChannel(void);
163  const DTVChannel *GetDTVChannel(void) const;
164  V4LChannel *GetV4LChannel(void);
166  DVBChannel *GetDVBChannel(void);
167  const DVBChannel *GetDVBChannel(void) const;
168 
169  void run(void) override; // QRunnable
170 
171  bool HasTimedOut(void);
172  void HandleActiveScan(void);
173  bool Tune(transport_scan_items_it_t transport);
176  static void LogLines(const QString& string);
177 
178  // Updates Transport Scan progress bar
179  inline void UpdateScanPercentCompleted(void);
180 
181  bool CheckImportedList(const DTVChannelInfoList &channels,
182  uint mpeg_program_num,
183  QString &service_name,
184  QString &callsign,
185  QString &common_status_info);
186 
187  void IgnoreDataOnlyMsg( const QString &name, int aux_num);
188  void IgnoreEmptyChanMsg(const QString &name, int aux_num);
189  void IgnoreAudioOnlyMsg(const QString &name, int aux_num);
190  void IgnoreEncryptedMsg(const QString &name, int aux_num);
191 
192  bool TestNextProgramEncryption(void);
193  void UpdateScanTransports(uint frequency, const NetworkInformationTable *nit);
194  bool UpdateChannelInfo(bool wait_until_complete);
195 
196  void HandleAllGood(void); // used for analog scanner
197 
198  bool AddToList(uint mplexid);
199 
200  static QString loc(const ChannelScanSM *siscan);
201 
202  static const std::chrono::milliseconds kDVBTableTimeout;
203  static const std::chrono::milliseconds kATSCTableTimeout;
204  static const std::chrono::milliseconds kMPEGTableTimeout;
205 
206  private:
207  // Set in constructor
212  std::chrono::milliseconds m_signalTimeout;
213  std::chrono::milliseconds m_channelTimeout;
214  std::chrono::milliseconds m_otherTableTimeout {0ms};
215  std::chrono::milliseconds m_otherTableTime {0ms};
216  bool m_setOtherTables {false};
217  QString m_inputName;
219  bool m_extendScanList {false};
220 
221  // Scanning parameters
227 
228  // Optional info
230 
232  mutable QMutex m_lock;
233 
234  // State
235  bool m_scanning {false};
236  volatile bool m_threadExit {false};
237  bool m_waitingForTables {false};
238  QElapsedTimer m_timer;
239 
240  // Transports List
242  QSet<uint32_t> m_tsScanned;
243  QMap<uint32_t,DTVMultiplex> m_extendTransports;
248  QMap<uint, uint> m_currentEncryptionStatus;
250  QMap<uint64_t, QString> m_defAuthorities;
251  bool m_dvbt2Tried {false};
252 
257 
258  // Analog Info
260 
261  // Scanner thread, runs ChannelScanSM::run()
263 
264  // Protect UpdateChannelInfo
265  QMutex m_mutex;
266 };
267 
269 {
270  int tmp = (m_transportsScanned * 100) /
271  (m_scanTransports.size() + m_extendTransports.size());
273 }
274 
276 {
278 }
279 
280 #endif // SISCAN_H
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:127
VirtualChannelTable
This table contains information about the channels transmitted on this multiplex.
Definition: atsctables.h:193
ChannelScanSM::HandleSDT
void HandleSDT(uint tsid, const ServiceDescriptionTable *sdt) override
Definition: channelscan_sm.cpp:458
ATSCMainStreamListener
Definition: streamlisteners.h:112
ChannelScanSM::m_frequency
uint m_frequency
Definition: channelscan_sm.h:222
ChannelScanSM::HandleSDTo
void HandleSDTo(uint tsid, const ServiceDescriptionTable *sdt) override
Definition: channelscan_sm.cpp:570
ChannelScanSM::m_tsScanned
QSet< uint32_t > m_tsScanned
Definition: channelscan_sm.h:242
ChannelScanSM::m_scannerThread
MThread * m_scannerThread
Definition: channelscan_sm.h:262
ChannelScanSM::IgnoreDataOnlyMsg
void IgnoreDataOnlyMsg(const QString &name, int aux_num)
TimeDateTable
This table gives the current DVB stream time.
Definition: dvbtables.h:381
ChannelScanSM::m_lock
QMutex m_lock
The big lock.
Definition: channelscan_sm.h:232
ChannelScanSM::kMPEGTableTimeout
static const std::chrono::milliseconds kMPEGTableTimeout
No logic here, lets just wait at least 15 seconds.
Definition: channelscan_sm.h:204
ChannelScanSM::m_current
transport_scan_items_it_t m_current
Definition: channelscan_sm.h:245
AnalogSignalHandler::AllGood
void AllGood(void) override
Signal to be sent when you have a lock on all values.
Definition: channelscan_sm.h:275
hardwareprofile.devicelist.cat
def cat(file_name)
Definition: devicelist.py:95
ProgramMapTable
A PMT table maps a program described in the ProgramAssociationTable to various PID's which describe t...
Definition: mpegtables.h:694
ChannelScanSM::m_scanning
bool m_scanning
Definition: channelscan_sm.h:235
ChannelScanSM::HandleNITo
void HandleNITo(const NetworkInformationTable *) override
Definition: channelscan_sm.h:156
ScanMonitor::ScanPercentComplete
void ScanPercentComplete(int pct)
Definition: scanmonitor.cpp:103
DVBSignalMonitor
Definition: dvbsignalmonitor.h:17
ChannelScanSM::GetHDHRChannel
HDHRChannel * GetHDHRChannel(void)
Definition: channelscan_sm.cpp:1936
ChannelScanSM::m_currentTestingDecryption
bool m_currentTestingDecryption
Definition: channelscan_sm.h:247
ChannelScanSM::m_scanTransports
transport_scan_items_t m_scanTransports
Definition: channelscan_sm.h:244
ChannelScanSM::SetAnalog
void SetAnalog(bool is_analog)
Definition: channelscan_sm.cpp:251
AnalogSignalHandler::AnalogSignalHandler
AnalogSignalHandler(ChannelScanSM *_siscan)
Definition: channelscan_sm.h:74
ChannelScanSM::m_nitId
uint m_nitId
Definition: channelscan_sm.h:225
SourceID
Definition: videosource.cpp:2867
ChannelScanSM::m_otherTableTimeout
std::chrono::milliseconds m_otherTableTimeout
Definition: channelscan_sm.h:214
ChannelScanSM::m_dvbt2Tried
bool m_dvbt2Tried
Definition: channelscan_sm.h:251
ChannelScanSM::Tune
bool Tune(transport_scan_items_it_t transport)
Definition: channelscan_sm.cpp:2166
ChannelScanSM::run
void run(void) override
This runs the event loop for ChannelScanSM until 'm_threadExit' is true.
Definition: channelscan_sm.cpp:1994
ChannelScanSM::m_signalTimeout
std::chrono::milliseconds m_signalTimeout
Definition: channelscan_sm.h:212
streamlisteners.h
ScannedChannelInfo
Definition: channelscan_sm.cpp:95
ChannelScanSM::HandleSTT
void HandleSTT(const SystemTimeTable *) override
Definition: channelscan_sm.h:146
ChannelScanSM::m_sourceID
int m_sourceID
Definition: channelscan_sm.h:211
ChannelScanSM::m_bouquetId
uint m_bouquetId
Definition: channelscan_sm.h:223
ChannelScanSM::m_scanMonitor
ScanMonitor * m_scanMonitor
Definition: channelscan_sm.h:208
SignalMonitorListener
Definition: signalmonitorlistener.h:21
ChannelScanSM::StopScanner
void StopScanner(void)
Stops the ChannelScanSM event loop and the signal monitor, blocking until both exit.
Definition: channelscan_sm.cpp:2272
ChannelScanSM::m_otherTableTime
std::chrono::milliseconds m_otherTableTime
Definition: channelscan_sm.h:215
HDHRChannel
Definition: hdhrchannel.h:20
tmp
static guint32 * tmp
Definition: goom_core.cpp:26
ChannelScanSM::m_extendScanList
bool m_extendScanList
Definition: channelscan_sm.h:219
ChannelScanSM::ScanTransports
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...
Definition: channelscan_sm.cpp:2294
DTVTunerType
Definition: dtvconfparserhelpers.h:76
ChannelScanSM::GetV4LChannel
V4LChannel * GetV4LChannel(void)
Definition: channelscan_sm.cpp:1963
pmt_vec_t
std::vector< const ProgramMapTable * > pmt_vec_t
Definition: channelscan_sm.h:64
ChannelScanSM::m_mutex
QMutex m_mutex
Definition: channelscan_sm.h:265
ChannelScanSM::kDVBTableTimeout
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,...
Definition: channelscan_sm.h:202
ChannelScanSM::m_setOtherTables
bool m_setOtherTables
Definition: channelscan_sm.h:216
ChannelScanSM::StartScanner
void StartScanner(void)
Starts the ChannelScanSM event loop.
Definition: channelscan_sm.cpp:1975
scanmonitor.h
DTVChannelList
std::vector< DTVTransport > DTVChannelList
Definition: dtvconfparser.h:68
ChannelScanSM::m_timer
QElapsedTimer m_timer
Definition: channelscan_sm.h:238
ChannelScanSM::HandleActiveScan
void HandleActiveScan(void)
Handles the TRANSPORT_LIST ChannelScanSM mode.
Definition: channelscan_sm.cpp:2091
ChannelScanSM::HandleNIT
void HandleNIT(const NetworkInformationTable *nit) override
Definition: channelscan_sm.cpp:507
signalmonitorlistener.h
ChannelBase
Abstract class providing a generic interface to tuning hardware.
Definition: channelbase.h:31
ChannelScanSM::m_analogSignalHandler
AnalogSignalHandler * m_analogSignalHandler
Definition: channelscan_sm.h:259
AnalogSignalHandler
Definition: channelscan_sm.h:71
ChannelScanSM::IgnoreEncryptedMsg
void IgnoreEncryptedMsg(const QString &name, int aux_num)
ChannelScanSM::m_extendTransports
QMap< uint32_t, DTVMultiplex > m_extendTransports
Definition: channelscan_sm.h:243
ChannelScanSM::HandleTDT
void HandleTDT(const TimeDateTable *) override
Definition: channelscan_sm.h:153
DTVTunerType::kTunerTypeUnknown
static const int kTunerTypeUnknown
Definition: dtvconfparserhelpers.h:103
MPEGStreamListener
Definition: streamlisteners.h:81
hardwareprofile.i18n.t
t
Definition: i18n.py:36
AnalogSignalHandler::StatusSignalLock
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 ...
Definition: channelscan_sm.h:78
DTVChannelInfoList
std::vector< DTVChannelInfo > DTVChannelInfoList
Definition: dtvconfparser.h:58
ChannelScanSM::HandlePAT
void HandlePAT(const ProgramAssociationTable *pat) override
Definition: channelscan_sm.cpp:377
ChannelScanSM::HandleEncryptionStatus
void HandleEncryptionStatus(uint pnum, bool encrypted) override
Definition: channelscan_sm.cpp:609
ChannelScanSM::m_channelsFound
uint m_channelsFound
Definition: channelscan_sm.h:255
ServiceDescriptionTable
This table tells the decoder on which PIDs to find A/V data.
Definition: dvbtables.h:108
ChannelScanSM::ChannelScanSM
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)
Definition: channelscan_sm.cpp:148
ChannelScanSM::SetSignalTimeout
void SetSignalTimeout(std::chrono::milliseconds val)
Definition: channelscan_sm.h:121
ChannelScanSM::HandleBAT
void HandleBAT(const BouquetAssociationTable *bat) override
Definition: channelscan_sm.cpp:520
ChannelScanSM::GetSignalTimeout
std::chrono::milliseconds GetSignalTimeout(void) const
Definition: channelscan_sm.h:126
ChannelScanSM::UpdateChannelInfo
bool UpdateChannelInfo(bool wait_until_complete)
Definition: channelscan_sm.cpp:826
SignalMonitorValue
Definition: signalmonitorvalue.h:13
ChannelScanSM::IgnoreAudioOnlyMsg
void IgnoreAudioOnlyMsg(const QString &name, int aux_num)
ChannelScanSM::UpdateScanTransports
void UpdateScanTransports(uint frequency, const NetworkInformationTable *nit)
Definition: channelscan_sm.cpp:730
ChannelScanSM::m_nextIt
transport_scan_items_it_t m_nextIt
Definition: channelscan_sm.h:246
ChannelScanSM::m_waitingForTables
bool m_waitingForTables
Definition: channelscan_sm.h:237
transport_scan_items_it_t
Definition: frequencytables.h:201
ChannelScanSM
Scanning class for cards that support a SignalMonitor class.
Definition: channelscan_sm.h:86
ChannelScanSM::GetCurrentTransportInfo
uint GetCurrentTransportInfo(QString &chan, QString &chan_tr) const
Definition: channelscan_sm.cpp:1320
uint
unsigned int uint
Definition: compat.h:81
ScanDTVTransportList
std::vector< ScanDTVTransport > ScanDTVTransportList
Definition: dtvmultiplex.h:143
ChannelScanSM::m_scanDTVTunerType
DTVTunerType m_scanDTVTunerType
Definition: channelscan_sm.h:229
ChannelScanSM::HandlePMT
void HandlePMT(uint program_num, const ProgramMapTable *pmt) override
Definition: channelscan_sm.cpp:404
ProgramAssociationTable
The Program Association Table lists all the programs in a stream, and is always found on PID 0.
Definition: mpegtables.h:617
ChannelScanSM::GetDVBSignalMonitor
DVBSignalMonitor * GetDVBSignalMonitor(void)
Definition: channelscan_sm.cpp:1917
ChannelScanSM::loc
static QString loc(const ChannelScanSM *siscan)
Definition: channelscan_sm.cpp:82
SignalMonitor
Signal monitoring base class.
Definition: signalmonitor.h:30
ChannelScanSM::SetScanDTVTunerType
void SetScanDTVTunerType(int t)
Definition: channelscan_sm.h:124
ChannelScanSM::m_transportsScanned
int m_transportsScanned
Definition: channelscan_sm.h:241
ChannelScanSM::HandleMGT
void HandleMGT(const MasterGuideTable *mgt) override
Definition: channelscan_sm.cpp:440
ChannelScanSM::GetChannelTimeout
std::chrono::milliseconds GetChannelTimeout(void) const
Definition: channelscan_sm.h:127
ChannelScanSM::m_threadExit
volatile bool m_threadExit
Definition: channelscan_sm.h:236
ChannelScanSM::ScanIPTVChannels
bool ScanIPTVChannels(uint sourceid, const fbox_chan_map_t &iptv_channels)
Definition: channelscan_sm.cpp:2425
ChannelScanSM::SetSourceID
void SetSourceID(int SourceID)
Definition: channelscan_sm.h:120
ChannelScanSM::GetDTVSignalMonitor
DTVSignalMonitor * GetDTVSignalMonitor(void)
Definition: channelscan_sm.cpp:1912
MasterGuideTable
This table tells the decoder on which PIDs to find other tables, and their sizes and each table's cur...
Definition: atsctables.h:79
ChannelScanSM::GuessDTVTunerType
DTVTunerType GuessDTVTunerType(DTVTunerType type) const
Definition: channelscan_sm.cpp:706
DVBChannel
Provides interface to the tuning hardware when using DVB drivers.
Definition: dvbchannel.h:31
ChannelScanSM::AddToList
bool AddToList(uint mplexid)
Definition: channelscan_sm.cpp:2526
ChannelScanSM::m_channelTimeout
std::chrono::milliseconds m_channelTimeout
Definition: channelscan_sm.h:213
DVBMainStreamListener
Definition: streamlisteners.h:172
ChannelScanSM::GetDVBChannel
DVBChannel * GetDVBChannel(void)
Definition: channelscan_sm.cpp:1945
BouquetAssociationTable
Tells what channels can be found on each transponder for one bouquet (a bunch of channels from one pr...
Definition: dvbtables.h:187
ChannelScanSM::m_currentInfo
ScannedChannelInfo * m_currentInfo
Definition: channelscan_sm.h:256
ChannelScanSM::IgnoreEmptyChanMsg
void IgnoreEmptyChanMsg(const QString &name, int aux_num)
ChannelScanSM::HandleVCT
void HandleVCT(uint tsid, const VirtualChannelTable *vct) override
Definition: channelscan_sm.cpp:420
frequencytables.h
AnalogSignalHandler::m_siScan
ChannelScanSM * m_siScan
Definition: channelscan_sm.h:83
ChannelScanSM::m_defAuthorities
QMap< uint64_t, QString > m_defAuthorities
Definition: channelscan_sm.h:250
ChannelScanSM::kATSCTableTimeout
static const std::chrono::milliseconds kATSCTableTimeout
No logic here, lets just wait at least 10 seconds.
Definition: channelscan_sm.h:203
ChannelScanSM::m_signalMonitor
SignalMonitor * m_signalMonitor
Definition: channelscan_sm.h:210
ChannelScanSM::m_channelList
ChannelList m_channelList
Found Channel Info.
Definition: channelscan_sm.h:254
pmt_map_t
QMap< uint, pmt_vec_t > pmt_map_t
Definition: channelscan_sm.h:65
ChannelScanSM::m_channel
ChannelBase * m_channel
Definition: channelscan_sm.h:209
ChannelScanSM::chan_info_map_t
QMap< uint, ChannelInsertInfo > chan_info_map_t
Definition: channelscan_sm.h:133
ChannelScanSM::ScanCurrentTransport
bool ScanCurrentTransport(const QString &sistandard)
Definition: channelscan_sm.cpp:2616
ConditionalAccessTable
The CAT is used to transmit additional ConditionalAccessDescriptor instances, in addition to the ones...
Definition: mpegtables.h:857
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:48
AnalogSignalHandler::StatusSignalStrength
void StatusSignalStrength(const SignalMonitorValue &) override
Signal to be sent with an actual signal value.
Definition: channelscan_sm.h:80
DTVSignalMonitor
This class is intended to detect the presence of needed tables.
Definition: dtvsignalmonitor.h:14
ChannelScanSM::TestNextProgramEncryption
bool TestNextProgramEncryption(void)
Definition: channelscan_sm.cpp:621
ChannelScanSM::HandleAllGood
void HandleAllGood(void)
Definition: channelscan_sm.cpp:259
ChannelList
QList< ChannelListItem > ChannelList
Definition: channelscan_sm.h:68
DVBOtherStreamListener
Definition: streamlisteners.h:182
SystemTimeTable
This table contains the GPS time at the time of transmission.
Definition: atsctables.h:684
ChannelScanSM::LogLines
static void LogLines(const QString &string)
Definition: channelscan_sm.cpp:367
ChannelScanSM::SetChannelTimeout
void SetChannelTimeout(std::chrono::milliseconds val)
Definition: channelscan_sm.h:122
DTVChannel
Class providing a generic interface to digital tuning hardware.
Definition: dtvchannel.h:33
ChannelScanSM::HandleCAT
void HandleCAT(const ConditionalAccessTable *cat) override
Definition: channelscan_sm.cpp:394
ChannelScanSM::ScanTransportsStartingOn
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...
Definition: channelscan_sm.cpp:2464
ChannelScanSM::m_lcnOffset
uint m_lcnOffset
Definition: channelscan_sm.h:226
ChannelScanSM::m_inputName
QString m_inputName
Definition: channelscan_sm.h:217
ChannelScanSM::GetChannelList
chan_info_map_t GetChannelList(transport_scan_items_it_t trans_info, ScannedChannelInfo *scan_info) const
Definition: channelscan_sm.cpp:1356
ChannelScanSM::GetDTVChannel
DTVChannel * GetDTVChannel(void)
Definition: channelscan_sm.cpp:1926
ChannelScanSM::ScanTransport
bool ScanTransport(uint mplexid, bool follow_nit)
Definition: channelscan_sm.cpp:2594
ChannelScanSM::m_testDecryption
bool m_testDecryption
Definition: channelscan_sm.h:218
V4LChannel
Implements tuning for TV cards using the V4L driver API, both versions 1 and 2.
Definition: v4lchannel.h:30
ChannelScanSM::SetScanDTVTunerType
void SetScanDTVTunerType(DTVTunerType t)
Definition: channelscan_sm.h:123
AnalogSignalHandler::StatusChannelTuned
void StatusChannelTuned(const SignalMonitorValue &) override
Signal to be sent with change change status.
Definition: channelscan_sm.h:79
ChannelScanSM::ScanExistingTransports
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...
Definition: channelscan_sm.cpp:322
iptvchannelfetcher.h
fbox_chan_map_t
QMap< QString, IPTVChannelInfo > fbox_chan_map_t
Definition: iptvchannelfetcher.h:62
ChannelScanSM::~ChannelScanSM
~ChannelScanSM() override
Definition: channelscan_sm.cpp:222
dtvconfparserhelpers.h
ChannelScanSM::m_currentEncryptionStatus
QMap< uint, uint > m_currentEncryptionStatus
Definition: channelscan_sm.h:248
ChannelScanSM::CheckImportedList
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.
Definition: channelscan_sm.cpp:2638
ChannelListItem
QPair< transport_scan_items_it_t, ScannedChannelInfo * > ChannelListItem
Definition: channelscan_sm.h:67
transport_scan_items_t
std::list< TransportScanItem > transport_scan_items_t
Definition: frequencytables.h:298
ChannelScanSM::m_currentEncryptionStatusChecked
QMap< uint, bool > m_currentEncryptionStatusChecked
Definition: channelscan_sm.h:249
ScanMonitor
Definition: scanmonitor.h:44
ChannelScanSM::UpdateScanPercentCompleted
void UpdateScanPercentCompleted(void)
Definition: channelscan_sm.h:268
ChannelScanSM::HasTimedOut
bool HasTimedOut(void)
Definition: channelscan_sm.cpp:2010
ChannelScanSM::m_regionId
uint m_regionId
Definition: channelscan_sm.h:224
ChannelScanSM::ScanForChannels
bool ScanForChannels(uint sourceid, const QString &std, const QString &cardtype, const DTVChannelList &channels)
Definition: channelscan_sm.cpp:2385
ChannelScanSM::GetSignalMonitor
SignalMonitor * GetSignalMonitor(void)
Definition: channelscan_sm.h:129
NetworkInformationTable
This table tells the decoder on which PIDs to find other tables.
Definition: dvbtables.h:28