3#ifndef ATSCSTREAMDATA_H_
4#define ATSCSTREAMDATA_H_
16using tvct_vec_t = std::vector<const TerrestrialVirtualChannelTable *>;
17using cvct_vec_t = std::vector<const CableVirtualChannelTable *>;
33 int desiredMinorChannel,
34 int cardnum,
bool cacheTables =
false);
38 void Reset(
int desiredProgram)
override;
39 void Reset(
int desiredMajorChannel,
int desiredMinorChannel);
40 void SetDesiredChannel(
int major,
int minor);
49 inline uint GetATSCMajorMinor(
uint eit_sourceid)
const;
50 inline bool HasATSCMajorMinorMap(
void)
const;
60 { m_tvctVersion[tsid] =
version; }
62 { m_cvctVersion[tsid] =
version; }
64 { m_rrtVersion[region&0xff] =
version; }
67 inline int VersionTVCT(
uint tsid)
const;
68 inline int VersionCVCT(
uint tsid)
const;
69 inline int VersionRRT(
uint region)
const;
72 bool HasCachedMGT(
bool current =
true)
const;
73 bool HasCachedTVCT(
uint pid,
bool current =
true)
const;
74 bool HasCachedCVCT(
uint pid,
bool current =
true)
const;
76 bool HasCachedAllTVCTs(
bool current =
true)
const;
77 bool HasCachedAllCVCTs(
bool current =
true)
const;
79 {
return HasCachedAllTVCTs(
current) && HasCachedAllCVCTs(
current); }
81 bool HasCachedAnyTVCTs(
bool current =
true)
const;
82 bool HasCachedAnyCVCTs(
bool current =
true)
const;
84 {
return HasCachedAnyTVCTs(
current) || HasCachedAnyCVCTs(
current); }
93 void ReturnCachedTVCTTables(
tvct_vec_t &tvcts)
const;
94 void ReturnCachedCVCTTables(
cvct_vec_t &cvcts)
const;
129 mutable bool m_atscEitReset {
false };
144 int m_mgtVersion { -1 };
175 const QMap<uint, int>::const_iterator it =
m_tvctVersion.find(tsid);
183 const QMap<uint, int>::const_iterator it =
m_cvctVersion.find(tsid);
191 const QMap<uint, int>::const_iterator it =
m_rrtVersion.find(region&0xff);
std::vector< ATSCMainStreamListener * > atsc_main_listener_vec_t
std::vector< ATSCAuxStreamListener * > atsc_aux_listener_vec_t
std::vector< const TerrestrialVirtualChannelTable * > tvct_vec_t
QMap< uint, uint > atsc_eit_pid_map_t
QMap< uint, uint_vec_t > pid_tsid_vec_t
QMap< uint, cvct_ptr_t > cvct_cache_t
std::vector< SCTEMainStreamListener * > scte_main_listener_vec_t
QMap< uint, uint > atsc_ett_pid_map_t
QMap< uint, tvct_ptr_t > tvct_cache_t
std::vector< ATSC81EITStreamListener * > atsc81_eit_listener_vec_t
std::vector< ATSCEITStreamListener * > atsc_eit_listener_vec_t
std::vector< const CableVirtualChannelTable * > cvct_vec_t
Encapsulates data about ATSC stream and emits events for most tables.
QMap< uint, int > m_cvctVersion
bool HasCachedAllVCTs(bool current=true) const
atsc_eit_listener_vec_t m_atscEitListeners
void SetVersionTVCT(uint tsid, int version)
bool HasATSCMajorMinorMap(void) const
void SetVersionCVCT(uint tsid, int version)
atsc_ett_pid_map_t m_atscEttPids
void SetVersionMGT(int version)
int DesiredMajorChannel(void) const
atsc81_eit_listener_vec_t m_atsc81EitListeners
void Reset(void) override
bool HasCachedAnyVCTs(bool current=true) const
uint GPSOffset(void) const
Current UTC to GPS time offset in seconds.
QMap< uint, int > m_rrtVersion
tvct_cache_t m_cachedTvcts
void SetVersionRRT(uint region, int version)
atsc_eit_pid_map_t m_atscEitPids
TableStatusMap m_eitStatus
uint GetATSCMajorMinor(uint eit_sourceid) const
cvct_cache_t m_cachedCvcts
int DesiredMinorChannel(void) const
int VersionCVCT(uint tsid) const
atsc_main_listener_vec_t m_atscMainListeners
int VersionTVCT(uint tsid) const
int m_desiredMinorChannel
int m_desiredMajorChannel
scte_main_listener_vec_t m_scteMainlisteners
QMap< uint, int > m_tvctVersion
int VersionRRT(uint region) const
atsc_aux_listener_vec_t m_atscAuxListeners
QMap< uint, uint > m_sourceIdToAtscMajMin
This table contains information about the cable channels transmitted on this multiplex.
Encapsulates data about MPEG stream and emits events for each table.
QRecursiveMutex m_listenerLock
virtual bool GetEITPIDChanges(const uint_vec_t &, uint_vec_t &, uint_vec_t &) const
virtual bool DeleteCachedTable(const PSIPTable *psip) const
virtual bool IsRedundant(uint pid, const PSIPTable &psip) const
Returns true if table already seen.
virtual bool HasEITPIDChanges(const uint_vec_t &) const
virtual bool HandleTables(uint pid, const PSIPTable &psip)
Process PSIP packets.
This table tells the decoder on which PIDs to find other tables, and their sizes and each table's cur...
A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table.
This table contains information about the terrestrial channels transmitted on this multiplex.
This table contains information about the channels transmitted on this multiplex.
std::vector< uint > uint_vec_t
static constexpr uint8_t GPS_LEAP_SECONDS
Leap seconds as of June 30th, 2022.
QDateTime current(bool stripped)
Returns current Date and Time in UTC.