MythTV  master
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScanStreamData Class Reference

#include <scanstreamdata.h>

Inheritance diagram for ScanStreamData:
Inheritance graph
[legend]
Collaboration diagram for ScanStreamData:
Collaboration graph
[legend]

Public Member Functions

 ScanStreamData (bool no_default_pid=false)
 
 ~ScanStreamData () override
 
bool IsRedundant (uint pid, const PSIPTable &psip) const override
 Returns true if table already seen. More...
 
bool HandleTables (uint pid, const PSIPTable &psip) override
 Processes PSIP tables. More...
 
void AddAllListeningPIDs (void)
 
void Reset (void) override
 
void Reset (uint desired_netid, uint desired_tsid, int desired_serviceid) override
 
bool HasEITPIDChanges (const uint_vec_t &) const override
 
bool GetEITPIDChanges (const uint_vec_t &, uint_vec_t &, uint_vec_t &) const override
 
QString GetSIStandard (const QString &guess="mpeg") const
 
void SetFreesatAdditionalSI (bool freesat_si)
 
void Reset (void) override
 
virtual void Reset (uint desired_netid, uint desired_tsid, int desired_serviceid)
 
virtual void Reset (void)
 
virtual void Reset (int desiredProgram)
 
- Public Member Functions inherited from MPEGStreamData
 MPEGStreamData (int desiredProgram, int cardnum, bool cacheTables)
 Initializes MPEGStreamData. More...
 
 ~MPEGStreamData () override
 
void SetCaching (bool cacheTables)
 
void SetListeningDisabled (bool lt)
 
double TimeOffset (void) const
 Current Offset from computer time to DVB time in seconds. More...
 
void SetEITHelper (EITHelper *eit_helper) override
 
void SetEITRate (float rate) override
 
void SetIgnoreCRC (bool haveCRCbug)
 
virtual void HandleTSTables (const TSPacket *tspacket)
 Assembles PSIP packets and processes them. More...
 
virtual bool ProcessTSPacket (const TSPacket &tspacket)
 
virtual int ProcessData (const unsigned char *buffer, int len)
 
void HandleAdaptationFieldControl (const TSPacket *tspacket)
 
virtual void AddListeningPID (uint pid, PIDPriority priority=kPIDPriorityNormal)
 
virtual void AddNotListeningPID (uint pid)
 
virtual void AddWritingPID (uint pid, PIDPriority priority=kPIDPriorityHigh)
 
virtual void AddAudioPID (uint pid, PIDPriority priority=kPIDPriorityHigh)
 
virtual void RemoveListeningPID (uint pid)
 
virtual void RemoveNotListeningPID (uint pid)
 
virtual void RemoveWritingPID (uint pid)
 
virtual void RemoveAudioPID (uint pid)
 
virtual bool IsListeningPID (uint pid) const
 
virtual bool IsNotListeningPID (uint pid) const
 
virtual bool IsWritingPID (uint pid) const
 
bool IsVideoPID (uint pid) const
 
virtual bool IsAudioPID (uint pid) const
 
const pid_map_tListeningPIDs (void) const
 
const pid_map_tAudioPIDs (void) const
 
const pid_map_tWritingPIDs (void) const
 
uint GetPIDs (pid_map_t &pids) const
 
PIDPriority GetPIDPriority (uint pid) const
 
void SetVersionPAT (uint tsid, int version, uint last_section)
 
void SetVersionPMT (uint pnum, int version, uint last_section)
 
bool HasAllPATSections (uint tsid) const
 
bool HasAllCATSections (uint tsid) const
 
bool HasAllPMTSections (uint prog_num) const
 
bool HasProgram (uint progNum) const
 
bool HasCachedAllPAT (uint tsid) const
 
bool HasCachedAnyPAT (uint tsid) const
 
bool HasCachedAnyPAT (void) const
 
bool HasCachedAllCAT (uint tsid) const
 
bool HasCachedAnyCAT (uint tsid) const
 
bool HasCachedAnyCAT (void) const
 
bool HasCachedAllPMT (uint pnum) const
 
bool HasCachedAnyPMT (uint pnum) const
 
bool HasCachedAllPMTs (void) const
 
bool HasCachedAnyPMTs (void) const
 
pat_const_ptr_t GetCachedPAT (uint tsid, uint section_num) const
 
pat_vec_t GetCachedPATs (uint tsid) const
 
pat_vec_t GetCachedPATs (void) const
 
pat_map_t GetCachedPATMap (void) const
 
cat_const_ptr_t GetCachedCAT (uint tsid, uint section_num) const
 
cat_vec_t GetCachedCATs (uint tsid) const
 
cat_vec_t GetCachedCATs (void) const
 
cat_map_t GetCachedCATMap (void) const
 
pmt_const_ptr_t GetCachedPMT (uint program_num, uint section_num) const
 
pmt_vec_t GetCachedPMTs (void) const
 
pmt_map_t GetCachedPMTMap (void) const
 
virtual void ReturnCachedTable (const PSIPTable *psip) const
 
virtual void ReturnCachedPATTables (pat_vec_t &pats) const
 
virtual void ReturnCachedPATTables (pat_map_t &pats) const
 
virtual void ReturnCachedCATTables (cat_vec_t &cats) const
 
virtual void ReturnCachedCATTables (cat_map_t &cats) const
 
virtual void ReturnCachedPMTTables (pmt_vec_t &pmts) const
 
virtual void ReturnCachedPMTTables (pmt_map_t &pmts) const
 
void AddEncryptionTestPID (uint pnum, uint pid, bool isvideo)
 
void RemoveEncryptionTestPIDs (uint pnum)
 
bool IsEncryptionTestPID (uint pid) const
 
void TestDecryption (const ProgramMapTable *pmt)
 
void ResetDecryptionMonitoringState (void)
 
bool IsProgramDecrypted (uint pnum) const
 
bool IsProgramEncrypted (uint pnum) const
 
void AddMPEGListener (MPEGStreamListener *val)
 
void RemoveMPEGListener (MPEGStreamListener *val)
 
void AddWritingListener (TSPacketListener *val)
 
void RemoveWritingListener (TSPacketListener *val)
 
void AddMPEGSPListener (MPEGSingleProgramStreamListener *val)
 
void RemoveMPEGSPListener (MPEGSingleProgramStreamListener *val)
 
void AddAVListener (TSPacketListenerAV *val)
 
void RemoveAVListener (TSPacketListenerAV *val)
 
void AddPSStreamListener (PSStreamListener *val)
 
void RemovePSStreamListener (PSStreamListener *val)
 
void SetDesiredProgram (int p)
 
void SetPATSingleProgram (ProgramAssociationTable *pat)
 
void SetPMTSingleProgram (ProgramMapTable *pmt)
 
void SetVideoStreamsRequired (uint num)
 
uint GetVideoStreamsRequired () const
 
void SetAudioStreamsRequired (uint num)
 
uint GetAudioStreamsRequired () const
 
void SetRecordingType (const QString &recording_type)
 
int DesiredProgram (void) const
 
uint VideoPIDSingleProgram (void) const
 
QString GetRecordingType (void) const
 
const ProgramAssociationTablePATSingleProgram (void) const
 
const ProgramMapTablePMTSingleProgram (void) const
 
ProgramAssociationTablePATSingleProgram (void)
 
ProgramMapTablePMTSingleProgram (void)
 
int VersionPATSingleProgram (void) const
 
int VersionPMTSingleProgram (void) const
 
bool CreatePATSingleProgram (const ProgramAssociationTable &pat)
 
bool CreatePMTSingleProgram (const ProgramMapTable &pmt)
 
- Public Member Functions inherited from ATSCStreamData
 ATSCStreamData (int desiredMajorChannel, int desiredMinorChannel, int cardnum, bool cacheTables=false)
 Initializes ATSCStreamData. More...
 
 ~ATSCStreamData () override
 
void Reset (int desiredProgram) override
 
void Reset (int desiredMajorChannel, int desiredMinorChannel)
 
void SetDesiredChannel (int major, int minor)
 
uint GPSOffset (void) const
 Current UTC to GPS time offset in seconds. More...
 
uint GetATSCMajorMinor (uint eit_sourceid) const
 
bool HasATSCMajorMinorMap (void) const
 
void SetVersionMGT (int version)
 
void SetVersionTVCT (uint tsid, int version)
 
void SetVersionCVCT (uint tsid, int version)
 
void SetVersionRRT (uint region, int version)
 
int VersionMGT () const
 
int VersionTVCT (uint tsid) const
 
int VersionCVCT (uint tsid) const
 
int VersionRRT (uint region) const
 
bool HasCachedMGT (bool current=true) const
 
bool HasCachedTVCT (uint pid, bool current=true) const
 
bool HasCachedCVCT (uint pid, bool current=true) const
 
bool HasCachedAllTVCTs (bool current=true) const
 
bool HasCachedAllCVCTs (bool current=true) const
 
bool HasCachedAllVCTs (bool current=true) const
 
bool HasCachedAnyTVCTs (bool current=true) const
 
bool HasCachedAnyCVCTs (bool current=true) const
 
bool HasCachedAnyVCTs (bool current=true) const
 
const MasterGuideTableGetCachedMGT (bool current=true) const
 
tvct_const_ptr_t GetCachedTVCT (uint pid, bool current=true) const
 
cvct_const_ptr_t GetCachedCVCT (uint pid, bool current=true) const
 
tvct_vec_t GetCachedTVCTs (bool current=true) const
 
cvct_vec_t GetCachedCVCTs (bool current=true) const
 
void ReturnCachedTVCTTables (tvct_vec_t &tvcts) const
 
void ReturnCachedCVCTTables (cvct_vec_t &cvcts) const
 
bool HasChannel (uint major, uint minor) const
 
int DesiredMajorChannel (void) const
 
int DesiredMinorChannel (void) const
 
void AddATSCMainListener (ATSCMainStreamListener *val)
 
void AddSCTEMainListener (SCTEMainStreamListener *val)
 
void AddATSCAuxListener (ATSCAuxStreamListener *val)
 
void AddATSCEITListener (ATSCEITStreamListener *val)
 
void AddATSC81EITListener (ATSC81EITStreamListener *val)
 
void RemoveATSCMainListener (ATSCMainStreamListener *val)
 
void RemoveSCTEMainListener (SCTEMainStreamListener *val)
 
void RemoveATSCAuxListener (ATSCAuxStreamListener *val)
 
void RemoveATSCEITListener (ATSCEITStreamListener *val)
 
void RemoveATSC81EITListener (ATSC81EITStreamListener *val)
 
- Public Member Functions inherited from DVBStreamData
 DVBStreamData (uint desired_netid, uint desired_tsid, int desired_program, int cardnum, bool cacheTables=false)
 
 ~DVBStreamData () override
 
void SetDesiredService (uint netid, uint tsid, int serviceid)
 
uint DesiredNetworkID (void) const
 
uint DesiredTransportID (void) const
 
void ProcessSDT (uint tsid, const ServiceDescriptionTable *sdt)
 
void SetRealNetworkID (int real_network_id)
 
void SetDishNetEIT (bool use_dishnet_eit)
 
bool HasAnyEIT (void) const
 
bool HasEIT (uint serviceid) const
 
void SetVersionSDT (uint tsid, int version, uint last_section)
 
void SetVersionSDTo (uint tsid, int version, uint last_section)
 
bool HasAllNITSections (void) const
 
bool HasAllNIToSections (void) const
 
bool HasAllSDTSections (uint tsid) const
 
bool HasAllSDToSections (uint tsid) const
 
bool HasAllBATSections (uint bid) const
 
bool HasCachedAnyNIT (bool current=true) const
 
bool HasCachedAllNIT (bool current=true) const
 
bool HasCachedAnySDT (uint tsid, bool current=true) const
 
bool HasCachedAllSDT (uint tsid, bool current=true) const
 
bool HasCachedSDT (bool current=true) const
 
bool HasCachedAnySDTs (bool current=true) const
 
bool HasCachedAllSDTs (bool current=true) const
 
bool HasCachedAnyBAT (uint batid, bool current=true) const
 
bool HasCachedAllBAT (uint batid, bool current=true) const
 
bool HasCachedAnyBATs (bool current=true) const
 
bool HasCachedAllBATs (bool current=true) const
 
nit_const_ptr_t GetCachedNIT (uint section_num, bool current=true) const
 
nit_vec_t GetCachedNIT (bool current=true) const
 
sdt_const_ptr_t GetCachedSDT (uint tsid, uint section_num, bool current=true) const
 
sdt_vec_t GetCachedSDTSections (uint tsid, bool current=true) const
 
sdt_vec_t GetCachedSDTs (bool current=true) const
 
void ReturnCachedSDTTables (sdt_vec_t &sdts) const
 
bat_const_ptr_t GetCachedBAT (uint batid, uint section_num, bool current=true) const
 
bat_vec_t GetCachedBATs (bool current=true) const
 
void AddDVBMainListener (DVBMainStreamListener *val)
 
void AddDVBOtherListener (DVBOtherStreamListener *val)
 
void AddDVBEITListener (DVBEITStreamListener *val)
 
void RemoveDVBMainListener (DVBMainStreamListener *val)
 
void RemoveDVBOtherListener (DVBOtherStreamListener *val)
 
void RemoveDVBEITListener (DVBEITStreamListener *val)
 
virtual void Reset (void)
 
virtual void Reset (int desiredProgram)
 

Private Member Functions

bool DeleteCachedTable (const PSIPTable *psip) const override
 

Private Attributes

bool m_dvbUkFreesatSi {false}
 listen for additional Freesat service information More...
 
bool m_noDefaultPid
 

Additional Inherited Members

- Protected Member Functions inherited from MPEGStreamData
PSIPTableAssemblePSIP (const TSPacket *tspacket, bool &moreTablePackets)
 PSIP packet assembler. More...
 
bool AssemblePSIP (PSIPTable &psip, TSPacket *tspacket)
 
void SavePartialPSIP (uint pid, PSIPTable *packet)
 
PSIPTableGetPartialPSIP (uint pid)
 
void ClearPartialPSIP (uint pid)
 
void DeletePartialPSIP (uint pid)
 
void ProcessPAT (const ProgramAssociationTable *pat)
 
void ProcessCAT (const ConditionalAccessTable *cat)
 
void ProcessPMT (const ProgramMapTable *pmt)
 
void ProcessEncryptedPacket (const TSPacket &tspacket)
 counts en/decrypted packets to decide if a stream is en/decrypted More...
 
void UpdateTimeOffset (uint64_t si_utc_time)
 
void IncrementRefCnt (const PSIPTable *psip) const
 
void CachePAT (const ProgramAssociationTable *pat)
 
void CacheCAT (const ConditionalAccessTable *_cat)
 
void CachePMT (const ProgramMapTable *pmt)
 
- Protected Member Functions inherited from EITSource
virtual ~EITSource ()=default
 
- Static Protected Member Functions inherited from MPEGStreamData
static int ResyncStream (const unsigned char *buffer, int curr_pos, int len)
 
- Protected Attributes inherited from MPEGStreamData
int m_cardId
 
QString m_siStandard {"mpeg"}
 
bool m_haveCrcBug {false}
 
QMutex m_siTimeLock
 
uint m_siTimeOffsetCnt {0}
 
uint m_siTimeOffsetIndx {0}
 
std::array< double, 16 > m_siTimeOffsets {0.0}
 
EITHelperm_eitHelper {nullptr}
 
float m_eitRate {0.0F}
 
pid_map_t m_pidsListening
 
pid_map_t m_pidsNotListening
 
pid_map_t m_pidsWriting
 
pid_map_t m_pidsAudio
 
bool m_listeningDisabled {false}
 
QMutex m_encryptionLock {QMutex::Recursive}
 
QMap< uint, CryptInfom_encryptionPidToInfo
 
QMap< uint, uint_vec_tm_encryptionPnumToPids
 
QMap< uint, uint_vec_tm_encryptionPidToPnums
 
QMap< uint, CryptStatusm_encryptionPnumToStatus
 
QMutex m_listenerLock {QMutex::Recursive}
 
mpeg_listener_vec_t m_mpegListeners
 
mpeg_sp_listener_vec_t m_mpegSpListeners
 
ts_listener_vec_t m_tsWritingListeners
 
ts_av_listener_vec_t m_tsAvListeners
 
ps_listener_vec_t m_psListeners
 
TableStatusMap m_patStatus
 
TableStatusMap m_catStatus
 
TableStatusMap m_pmtStatus
 
pid_psip_map_t m_partialPsipPacketCache
 
bool m_cacheTables
 
QMutex m_cacheLock {QMutex::Recursive}
 
pat_cache_t m_cachedPats
 
cat_cache_t m_cachedCats
 
pmt_cache_t m_cachedPmts
 
psip_refcnt_map_t m_cachedRefCnt
 
psip_refcnt_map_t m_cachedSlatedForDeletion
 
int m_desiredProgram
 
QString m_recordingType {"all"}
 
bool m_stripPmtDescriptors {false}
 
bool m_normalizeStreamType {true}
 
uint m_pidVideoSingleProgram {0xffffffff}
 
uint m_pidPmtSingleProgram {0xffffffff}
 
uint m_pmtSingleProgramNumVideo {1}
 
uint m_pmtSingleProgramNumAudio {0}
 
ProgramAssociationTablem_patSingleProgram {nullptr}
 
ProgramMapTablem_pmtSingleProgram {nullptr}
 

Detailed Description

Definition at line 10 of file scanstreamdata.h.

Constructor & Destructor Documentation

◆ ScanStreamData()

ScanStreamData::ScanStreamData ( bool  no_default_pid = false)
explicit

Definition at line 7 of file scanstreamdata.cpp.

◆ ~ScanStreamData()

ScanStreamData::~ScanStreamData ( )
override

Definition at line 17 of file scanstreamdata.cpp.

Member Function Documentation

◆ IsRedundant()

bool ScanStreamData::IsRedundant ( uint  pid,
const PSIPTable psip 
) const
overridevirtual

Returns true if table already seen.

Reimplemented from ATSCStreamData.

Definition at line 22 of file scanstreamdata.cpp.

◆ HandleTables()

bool ScanStreamData::HandleTables ( uint  pid,
const PSIPTable psip 
)
overridevirtual

Processes PSIP tables.

Reimplemented from ATSCStreamData.

Definition at line 31 of file scanstreamdata.cpp.

◆ AddAllListeningPIDs()

void ScanStreamData::AddAllListeningPIDs ( void  )

Definition at line 38 of file scanstreamdata.cpp.

Referenced by Reset().

◆ Reset() [1/6]

void ScanStreamData::Reset ( void  )
overridevirtual

Reimplemented from ATSCStreamData.

Definition at line 58 of file scanstreamdata.cpp.

Referenced by ChannelScanSM::ScanTransport().

◆ Reset() [2/6]

void ScanStreamData::Reset ( uint  desired_netid,
uint  desired_tsid,
int  desired_serviceid 
)
overridevirtual

Reimplemented from DVBStreamData.

Definition at line 73 of file scanstreamdata.cpp.

◆ HasEITPIDChanges()

bool ScanStreamData::HasEITPIDChanges ( const uint_vec_t ) const
inlineoverridevirtual

Reimplemented from ATSCStreamData.

Definition at line 27 of file scanstreamdata.h.

◆ GetEITPIDChanges()

bool ScanStreamData::GetEITPIDChanges ( const uint_vec_t ,
uint_vec_t ,
uint_vec_t  
) const
inlineoverridevirtual

Reimplemented from ATSCStreamData.

Definition at line 29 of file scanstreamdata.h.

◆ GetSIStandard()

QString ScanStreamData::GetSIStandard ( const QString &  guess = "mpeg") const

Definition at line 86 of file scanstreamdata.cpp.

◆ SetFreesatAdditionalSI()

void ScanStreamData::SetFreesatAdditionalSI ( bool  freesat_si)
inline

Definition at line 45 of file scanstreamdata.h.

◆ DeleteCachedTable()

bool ScanStreamData::DeleteCachedTable ( const PSIPTable psip) const
overrideprivatevirtual

Reimplemented from ATSCStreamData.

Definition at line 122 of file scanstreamdata.cpp.

◆ Reset() [3/6]

void DVBStreamData::Reset
inlineoverride

Definition at line 40 of file dvbstreamdata.h.

◆ Reset() [4/6]

void DVBStreamData::Reset

Definition at line 166 of file dvbstreamdata.cpp.

◆ Reset() [5/6]

virtual void MPEGStreamData::Reset
inline

Definition at line 94 of file mpegstreamdata.h.

◆ Reset() [6/6]

void MPEGStreamData::Reset

Definition at line 122 of file mpegstreamdata.cpp.

Member Data Documentation

◆ m_dvbUkFreesatSi

bool ScanStreamData::m_dvbUkFreesatSi {false}
private

listen for additional Freesat service information

Definition at line 41 of file scanstreamdata.h.

Referenced by AddAllListeningPIDs(), and SetFreesatAdditionalSI().

◆ m_noDefaultPid

bool ScanStreamData::m_noDefaultPid
private

Definition at line 42 of file scanstreamdata.h.

Referenced by Reset(), and ScanStreamData().


The documentation for this class was generated from the following files: