MythTV  master
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
MPEGStreamData Class Reference

Encapsulates data about MPEG stream and emits events for each table. More...

#include <mpegstreamdata.h>

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

Public Member Functions

 MPEGStreamData (int desiredProgram, int cardnum, bool cacheTables)
 Initializes MPEGStreamData. More...
 
virtual ~MPEGStreamData ()
 
void SetCaching (bool cacheTables)
 
void SetListeningDisabled (bool lt)
 
virtual void Reset (void)
 
virtual void Reset (int desiredProgram)
 
double TimeOffset (void) const
 Current Offset from computer time to DVB time in seconds. More...
 
virtual void SetEITHelper (EITHelper *eit_helper)
 
virtual void SetEITRate (float rate)
 
virtual bool HasEITPIDChanges (const uint_vec_t &) const
 
virtual bool GetEITPIDChanges (const uint_vec_t &, uint_vec_t &, uint_vec_t &) const
 
void SetIgnoreCRC (bool haveCRCbug)
 
virtual bool IsRedundant (uint pid, const PSIPTable &) const
 Returns true if table already seen. More...
 
virtual bool HandleTables (uint pid, const PSIPTable &psip)
 Assembles PSIP packets and processes them. More...
 
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 &) 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 program_num) const
 
bool HasCachedAnyPMT (uint program_num) 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 &) const
 
virtual void ReturnCachedPATTables (pat_map_t &) const
 
virtual void ReturnCachedCATTables (cat_vec_t &) const
 
virtual void ReturnCachedCATTables (cat_map_t &) const
 
virtual void ReturnCachedPMTTables (pmt_vec_t &) const
 
virtual void ReturnCachedPMTTables (pmt_map_t &) 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 *)
 
void RemoveMPEGListener (MPEGStreamListener *)
 
void UpdatePAT (const ProgramAssociationTable *)
 
void UpdateCAT (const ConditionalAccessTable *)
 
void UpdatePMT (uint program_num, const ProgramMapTable *)
 
void AddWritingListener (TSPacketListener *)
 
void RemoveWritingListener (TSPacketListener *)
 
void AddMPEGSPListener (MPEGSingleProgramStreamListener *)
 
void RemoveMPEGSPListener (MPEGSingleProgramStreamListener *)
 
void AddAVListener (TSPacketListenerAV *)
 
void RemoveAVListener (TSPacketListenerAV *)
 
void UpdatePATSingleProgram (ProgramAssociationTable *)
 
void UpdatePMTSingleProgram (ProgramMapTable *)
 
void AddPSStreamListener (PSStreamListener *val)
 
void RemovePSStreamListener (PSStreamListener *val)
 
void SetDesiredProgram (int p)
 
void SetPATSingleProgram (ProgramAssociationTable *)
 
void SetPMTSingleProgram (ProgramMapTable *)
 
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 &)
 
bool CreatePMTSingleProgram (const ProgramMapTable &)
 

Protected Member Functions

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 &)
 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
 
virtual bool DeleteCachedTable (PSIPTable *psip) const
 
void CachePAT (const ProgramAssociationTable *pat)
 
void CacheCAT (const ConditionalAccessTable *pat)
 
void CachePMT (const ProgramMapTable *pmt)
 
- Protected Member Functions inherited from EITSource
virtual ~EITSource ()
 

Static Protected Member Functions

static int ResyncStream (const unsigned char *buffer, int curr_pos, int len)
 

Protected Attributes

int _cardid
 
QString _sistandard
 
bool _have_CRC_bug
 
QMutex _si_time_lock
 
uint _si_time_offset_cnt
 
uint _si_time_offset_indx
 
double _si_time_offsets [16]
 
EITHelper_eit_helper
 
float _eit_rate
 
pid_map_t _pids_listening
 
pid_map_t _pids_notlistening
 
pid_map_t _pids_writing
 
pid_map_t _pids_audio
 
bool _listening_disabled
 
QMutex _encryption_lock
 
QMap< uint, CryptInfo_encryption_pid_to_info
 
QMap< uint, uint_vec_t_encryption_pnum_to_pids
 
QMap< uint, uint_vec_t_encryption_pid_to_pnums
 
QMap< uint, CryptStatus_encryption_pnum_to_status
 
QMutex _listener_lock
 
mpeg_listener_vec_t _mpeg_listeners
 
mpeg_sp_listener_vec_t _mpeg_sp_listeners
 
ts_listener_vec_t _ts_writing_listeners
 
ts_av_listener_vec_t _ts_av_listeners
 
ps_listener_vec_t _ps_listeners
 
TableStatusMap _pat_status
 
TableStatusMap _cat_status
 
TableStatusMap _pmt_status
 
pid_psip_map_t _partial_psip_packet_cache
 
bool _cache_tables
 
QMutex _cache_lock
 
pat_cache_t _cached_pats
 
cat_cache_t _cached_cats
 
pmt_cache_t _cached_pmts
 
psip_refcnt_map_t _cached_ref_cnt
 
psip_refcnt_map_t _cached_slated_for_deletion
 
int _desired_program
 
QString _recording_type
 
bool _strip_pmt_descriptors
 
bool _normalize_stream_type
 
uint _pid_video_single_program
 
uint _pid_pmt_single_program
 
uint _pmt_single_program_num_video
 
uint _pmt_single_program_num_audio
 
ProgramAssociationTable_pat_single_program
 
ProgramMapTable_pmt_single_program
 

Private Attributes

bool _invalid_pat_seen
 
bool _invalid_pat_warning
 
MythTimer _invalid_pat_timer
 

Detailed Description

Encapsulates data about MPEG stream and emits events for each table.

Definition at line 92 of file mpegstreamdata.h.

Constructor & Destructor Documentation

◆ MPEGStreamData()

MPEGStreamData::MPEGStreamData ( int  desiredProgram,
int  cardnum,
bool  cacheTables 
)

Initializes MPEGStreamData.

This adds the PID of the PAT table to "_pids_listening"

Parameters
desiredProgramIf you want rewritten PAT and PMTs, for a desired program set this to a value > -1
cardnumThe card number that this stream is on. Currently only used for differentiating streams in log messages.
cacheTablesIf true PAT and PMT tables will be cached

Definition at line 41 of file mpegstreamdata.cpp.

◆ ~MPEGStreamData()

MPEGStreamData::~MPEGStreamData ( )
virtual

Definition at line 70 of file mpegstreamdata.cpp.

Member Function Documentation

◆ SetCaching()

void MPEGStreamData::SetCaching ( bool  cacheTables)
inline

Definition at line 98 of file mpegstreamdata.h.

Referenced by TVRec::SetupDTVSignalMonitor().

◆ SetListeningDisabled()

void MPEGStreamData::SetListeningDisabled ( bool  lt)
inline

Definition at line 99 of file mpegstreamdata.h.

Referenced by ASIRecorder::ASIRecorder().

◆ Reset() [1/2]

virtual void MPEGStreamData::Reset ( void  )
inlinevirtual

◆ Reset() [2/2]

void MPEGStreamData::Reset ( int  desiredProgram)
virtual

Reimplemented in ATSCStreamData.

Definition at line 149 of file mpegstreamdata.cpp.

◆ TimeOffset()

double MPEGStreamData::TimeOffset ( void  ) const

Current Offset from computer time to DVB time in seconds.

Definition at line 846 of file mpegstreamdata.cpp.

◆ SetEITHelper()

void MPEGStreamData::SetEITHelper ( EITHelper eit_helper)
virtual

Implements EITSource.

Definition at line 137 of file mpegstreamdata.cpp.

◆ SetEITRate()

void MPEGStreamData::SetEITRate ( float  rate)
virtual

Implements EITSource.

Definition at line 143 of file mpegstreamdata.cpp.

◆ HasEITPIDChanges()

virtual bool MPEGStreamData::HasEITPIDChanges ( const uint_vec_t ) const
inlinevirtual

◆ GetEITPIDChanges()

virtual bool MPEGStreamData::GetEITPIDChanges ( const uint_vec_t ,
uint_vec_t ,
uint_vec_t  
) const
inlinevirtual

◆ SetIgnoreCRC()

void MPEGStreamData::SetIgnoreCRC ( bool  haveCRCbug)
inline

Definition at line 118 of file mpegstreamdata.h.

Referenced by apply_broken_dvb_driver_crc_hack().

◆ IsRedundant()

bool MPEGStreamData::IsRedundant ( uint  pid,
const PSIPTable psip 
) const
virtual

◆ HandleTables()

bool MPEGStreamData::HandleTables ( uint  pid,
const PSIPTable psip 
)
virtual

◆ HandleTSTables()

void MPEGStreamData::HandleTSTables ( const TSPacket tspacket)
virtual

Assembles PSIP packets and processes them.

Definition at line 885 of file mpegstreamdata.cpp.

Referenced by FirewireRecorder::ProcessTSPacket(), and ProcessTSPacket().

◆ ProcessTSPacket()

bool MPEGStreamData::ProcessTSPacket ( const TSPacket tspacket)
virtual

Definition at line 1022 of file mpegstreamdata.cpp.

Referenced by ProcessData().

◆ ProcessData()

int MPEGStreamData::ProcessData ( const unsigned char *  buffer,
int  len 
)
virtual

◆ HandleAdaptationFieldControl()

void MPEGStreamData::HandleAdaptationFieldControl ( const TSPacket tspacket)
inline

Definition at line 414 of file mpegstreamdata.h.

Referenced by FirewireRecorder::ProcessTSPacket().

◆ AddListeningPID()

virtual void MPEGStreamData::AddListeningPID ( uint  pid,
PIDPriority  priority = kPIDPriorityNormal 
)
inlinevirtual

◆ AddNotListeningPID()

virtual void MPEGStreamData::AddNotListeningPID ( uint  pid)
inlinevirtual

Definition at line 130 of file mpegstreamdata.h.

◆ AddWritingPID()

virtual void MPEGStreamData::AddWritingPID ( uint  pid,
PIDPriority  priority = kPIDPriorityHigh 
)
inlinevirtual

Definition at line 132 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram(), and pid_printer().

◆ AddAudioPID()

virtual void MPEGStreamData::AddAudioPID ( uint  pid,
PIDPriority  priority = kPIDPriorityHigh 
)
inlinevirtual

Definition at line 135 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram().

◆ RemoveListeningPID()

virtual void MPEGStreamData::RemoveListeningPID ( uint  pid)
inlinevirtual

◆ RemoveNotListeningPID()

virtual void MPEGStreamData::RemoveNotListeningPID ( uint  pid)
inlinevirtual

Definition at line 140 of file mpegstreamdata.h.

◆ RemoveWritingPID()

virtual void MPEGStreamData::RemoveWritingPID ( uint  pid)
inlinevirtual

Definition at line 142 of file mpegstreamdata.h.

◆ RemoveAudioPID()

virtual void MPEGStreamData::RemoveAudioPID ( uint  pid)
inlinevirtual

Definition at line 143 of file mpegstreamdata.h.

◆ IsListeningPID()

bool MPEGStreamData::IsListeningPID ( uint  pid) const
virtual

Definition at line 1087 of file mpegstreamdata.cpp.

Referenced by DTVRecorder::HandlePAT(), and ProcessTSPacket().

◆ IsNotListeningPID()

bool MPEGStreamData::IsNotListeningPID ( uint  pid) const
virtual

Definition at line 1095 of file mpegstreamdata.cpp.

Referenced by IsListeningPID().

◆ IsWritingPID()

bool MPEGStreamData::IsWritingPID ( uint  pid) const
virtual

Definition at line 1101 of file mpegstreamdata.cpp.

Referenced by ProcessTSPacket().

◆ IsVideoPID()

bool MPEGStreamData::IsVideoPID ( uint  pid) const
inline

Definition at line 148 of file mpegstreamdata.h.

Referenced by ProcessTSPacket().

◆ IsAudioPID()

bool MPEGStreamData::IsAudioPID ( uint  pid) const
virtual

Definition at line 1107 of file mpegstreamdata.cpp.

Referenced by ProcessTSPacket().

◆ ListeningPIDs()

const pid_map_t& MPEGStreamData::ListeningPIDs ( void  ) const
inline

Definition at line 152 of file mpegstreamdata.h.

◆ AudioPIDs()

const pid_map_t& MPEGStreamData::AudioPIDs ( void  ) const
inline

Definition at line 154 of file mpegstreamdata.h.

◆ WritingPIDs()

const pid_map_t& MPEGStreamData::WritingPIDs ( void  ) const
inline

Definition at line 156 of file mpegstreamdata.h.

◆ GetPIDs()

uint MPEGStreamData::GetPIDs ( pid_map_t pids) const

Definition at line 1113 of file mpegstreamdata.cpp.

◆ GetPIDPriority()

PIDPriority MPEGStreamData::GetPIDPriority ( uint  pid) const

Definition at line 1135 of file mpegstreamdata.cpp.

◆ SetVersionPAT()

void MPEGStreamData::SetVersionPAT ( uint  tsid,
int  version,
uint  last_section 
)
inline

◆ SetVersionPMT()

void MPEGStreamData::SetVersionPMT ( uint  pnum,
int  version,
uint  last_section 
)
inline

Definition at line 169 of file mpegstreamdata.h.

Referenced by FirewireSignalMonitor::HandlePMT().

◆ HasAllPATSections()

bool MPEGStreamData::HasAllPATSections ( uint  tsid) const

Definition at line 1171 of file mpegstreamdata.cpp.

◆ HasAllCATSections()

bool MPEGStreamData::HasAllCATSections ( uint  tsid) const

Definition at line 1176 of file mpegstreamdata.cpp.

◆ HasAllPMTSections()

bool MPEGStreamData::HasAllPMTSections ( uint  prog_num) const

Definition at line 1181 of file mpegstreamdata.cpp.

◆ HasProgram()

bool MPEGStreamData::HasProgram ( uint  progNum) const

◆ HasCachedAllPAT()

bool MPEGStreamData::HasCachedAllPAT ( uint  tsid) const

Definition at line 1195 of file mpegstreamdata.cpp.

Referenced by HasCachedAllPMTs(), and ChannelScanSM::UpdateChannelInfo().

◆ HasCachedAnyPAT() [1/2]

bool MPEGStreamData::HasCachedAnyPAT ( uint  tsid) const

Definition at line 1214 of file mpegstreamdata.cpp.

Referenced by ChannelScanSM::HasTimedOut().

◆ HasCachedAnyPAT() [2/2]

bool MPEGStreamData::HasCachedAnyPAT ( void  ) const

Definition at line 1225 of file mpegstreamdata.cpp.

◆ HasCachedAllCAT()

bool MPEGStreamData::HasCachedAllCAT ( uint  tsid) const

Definition at line 1231 of file mpegstreamdata.cpp.

◆ HasCachedAnyCAT() [1/2]

bool MPEGStreamData::HasCachedAnyCAT ( uint  tsid) const

Definition at line 1250 of file mpegstreamdata.cpp.

◆ HasCachedAnyCAT() [2/2]

bool MPEGStreamData::HasCachedAnyCAT ( void  ) const

Definition at line 1261 of file mpegstreamdata.cpp.

◆ HasCachedAllPMT()

bool MPEGStreamData::HasCachedAllPMT ( uint  program_num) const

Definition at line 1267 of file mpegstreamdata.cpp.

Referenced by HasCachedAllPMTs().

◆ HasCachedAnyPMT()

bool MPEGStreamData::HasCachedAnyPMT ( uint  program_num) const

Definition at line 1286 of file mpegstreamdata.cpp.

◆ HasCachedAllPMTs()

bool MPEGStreamData::HasCachedAllPMTs ( void  ) const

Definition at line 1297 of file mpegstreamdata.cpp.

Referenced by ChannelScanSM::UpdateChannelInfo().

◆ HasCachedAnyPMTs()

bool MPEGStreamData::HasCachedAnyPMTs ( void  ) const

Definition at line 1319 of file mpegstreamdata.cpp.

Referenced by ChannelScanSM::HasTimedOut().

◆ GetCachedPAT()

pat_const_ptr_t MPEGStreamData::GetCachedPAT ( uint  tsid,
uint  section_num 
) const

Definition at line 1325 of file mpegstreamdata.cpp.

Referenced by GetCachedPATs().

◆ GetCachedPATs() [1/2]

pat_vec_t MPEGStreamData::GetCachedPATs ( uint  tsid) const

Definition at line 1338 of file mpegstreamdata.cpp.

Referenced by ChannelScanSM::UpdateChannelInfo().

◆ GetCachedPATs() [2/2]

pat_vec_t MPEGStreamData::GetCachedPATs ( void  ) const

Definition at line 1353 of file mpegstreamdata.cpp.

Referenced by SetDesiredProgram().

◆ GetCachedPATMap()

pat_map_t MPEGStreamData::GetCachedPATMap ( void  ) const

◆ GetCachedCAT()

cat_const_ptr_t MPEGStreamData::GetCachedCAT ( uint  tsid,
uint  section_num 
) const

Definition at line 1369 of file mpegstreamdata.cpp.

Referenced by GetCachedCATs().

◆ GetCachedCATs() [1/2]

cat_vec_t MPEGStreamData::GetCachedCATs ( uint  tsid) const

Definition at line 1382 of file mpegstreamdata.cpp.

◆ GetCachedCATs() [2/2]

cat_vec_t MPEGStreamData::GetCachedCATs ( void  ) const

Definition at line 1397 of file mpegstreamdata.cpp.

◆ GetCachedCATMap()

cat_map_t MPEGStreamData::GetCachedCATMap ( void  ) const

◆ GetCachedPMT()

pmt_const_ptr_t MPEGStreamData::GetCachedPMT ( uint  program_num,
uint  section_num 
) const

Definition at line 1413 of file mpegstreamdata.cpp.

Referenced by HasProgram().

◆ GetCachedPMTs()

pmt_vec_t MPEGStreamData::GetCachedPMTs ( void  ) const

Definition at line 1427 of file mpegstreamdata.cpp.

Referenced by SetDesiredProgram(), and ChannelScanSM::UpdateChannelInfo().

◆ GetCachedPMTMap()

pmt_map_t MPEGStreamData::GetCachedPMTMap ( void  ) const

Definition at line 1443 of file mpegstreamdata.cpp.

◆ ReturnCachedTable()

void MPEGStreamData::ReturnCachedTable ( const PSIPTable psip) const
virtual

◆ ReturnCachedPATTables() [1/2]

void MPEGStreamData::ReturnCachedPATTables ( pat_vec_t pats) const
virtual

◆ ReturnCachedPATTables() [2/2]

void MPEGStreamData::ReturnCachedPATTables ( pat_map_t pats) const
virtual

Definition at line 1483 of file mpegstreamdata.cpp.

◆ ReturnCachedCATTables() [1/2]

void MPEGStreamData::ReturnCachedCATTables ( cat_vec_t cats) const
virtual

Definition at line 1490 of file mpegstreamdata.cpp.

Referenced by ReturnCachedCATTables().

◆ ReturnCachedCATTables() [2/2]

void MPEGStreamData::ReturnCachedCATTables ( cat_map_t cats) const
virtual

Definition at line 1497 of file mpegstreamdata.cpp.

◆ ReturnCachedPMTTables() [1/2]

void MPEGStreamData::ReturnCachedPMTTables ( pmt_vec_t pmts) const
virtual

◆ ReturnCachedPMTTables() [2/2]

void MPEGStreamData::ReturnCachedPMTTables ( pmt_map_t pmts) const
virtual

Definition at line 1511 of file mpegstreamdata.cpp.

◆ AddEncryptionTestPID()

void MPEGStreamData::AddEncryptionTestPID ( uint  pnum,
uint  pid,
bool  isvideo 
)

Definition at line 1745 of file mpegstreamdata.cpp.

Referenced by TestDecryption().

◆ RemoveEncryptionTestPIDs()

void MPEGStreamData::RemoveEncryptionTestPIDs ( uint  pnum)

Definition at line 1763 of file mpegstreamdata.cpp.

Referenced by ProcessEncryptedPacket().

◆ IsEncryptionTestPID()

bool MPEGStreamData::IsEncryptionTestPID ( uint  pid) const

Definition at line 1807 of file mpegstreamdata.cpp.

Referenced by ProcessTSPacket().

◆ TestDecryption()

void MPEGStreamData::TestDecryption ( const ProgramMapTable pmt)

◆ ResetDecryptionMonitoringState()

void MPEGStreamData::ResetDecryptionMonitoringState ( void  )

Definition at line 1843 of file mpegstreamdata.cpp.

Referenced by Reset().

◆ IsProgramDecrypted()

bool MPEGStreamData::IsProgramDecrypted ( uint  pnum) const

Definition at line 1852 of file mpegstreamdata.cpp.

◆ IsProgramEncrypted()

bool MPEGStreamData::IsProgramEncrypted ( uint  pnum) const

Definition at line 1858 of file mpegstreamdata.cpp.

◆ AddMPEGListener()

void MPEGStreamData::AddMPEGListener ( MPEGStreamListener val)

◆ RemoveMPEGListener()

void MPEGStreamData::RemoveMPEGListener ( MPEGStreamListener val)

Definition at line 1622 of file mpegstreamdata.cpp.

Referenced by DTVSignalMonitor::SetStreamData().

◆ UpdatePAT()

void MPEGStreamData::UpdatePAT ( const ProgramAssociationTable )

◆ UpdateCAT()

void MPEGStreamData::UpdateCAT ( const ConditionalAccessTable )

◆ UpdatePMT()

void MPEGStreamData::UpdatePMT ( uint  program_num,
const ProgramMapTable  
)

◆ AddWritingListener()

void MPEGStreamData::AddWritingListener ( TSPacketListener val)

◆ RemoveWritingListener()

void MPEGStreamData::RemoveWritingListener ( TSPacketListener val)

◆ AddMPEGSPListener()

void MPEGStreamData::AddMPEGSPListener ( MPEGSingleProgramStreamListener val)

◆ RemoveMPEGSPListener()

void MPEGStreamData::RemoveMPEGSPListener ( MPEGSingleProgramStreamListener val)

Definition at line 1703 of file mpegstreamdata.cpp.

◆ AddAVListener()

void MPEGStreamData::AddAVListener ( TSPacketListenerAV val)

◆ RemoveAVListener()

void MPEGStreamData::RemoveAVListener ( TSPacketListenerAV val)

◆ UpdatePATSingleProgram()

void MPEGStreamData::UpdatePATSingleProgram ( ProgramAssociationTable )

◆ UpdatePMTSingleProgram()

void MPEGStreamData::UpdatePMTSingleProgram ( ProgramMapTable )

◆ AddPSStreamListener()

void MPEGStreamData::AddPSStreamListener ( PSStreamListener val)

Definition at line 1718 of file mpegstreamdata.cpp.

Referenced by V4L2encRecorder::run().

◆ RemovePSStreamListener()

void MPEGStreamData::RemovePSStreamListener ( PSStreamListener val)

Definition at line 1730 of file mpegstreamdata.cpp.

Referenced by V4L2encRecorder::run().

◆ SetDesiredProgram()

void MPEGStreamData::SetDesiredProgram ( int  p)

◆ SetPATSingleProgram()

void MPEGStreamData::SetPATSingleProgram ( ProgramAssociationTable pat)
inline

Definition at line 390 of file mpegstreamdata.h.

Referenced by CreatePATSingleProgram(), Reset(), and ~MPEGStreamData().

◆ SetPMTSingleProgram()

void MPEGStreamData::SetPMTSingleProgram ( ProgramMapTable pmt)
inline

Definition at line 397 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram(), Reset(), and ~MPEGStreamData().

◆ SetVideoStreamsRequired()

void MPEGStreamData::SetVideoStreamsRequired ( uint  num)
inline

Definition at line 257 of file mpegstreamdata.h.

Referenced by SetRecordingType(), and TVRec::SetupDTVSignalMonitor().

◆ GetVideoStreamsRequired()

uint MPEGStreamData::GetVideoStreamsRequired ( ) const
inline

Definition at line 259 of file mpegstreamdata.h.

◆ SetAudioStreamsRequired()

void MPEGStreamData::SetAudioStreamsRequired ( uint  num)
inline

Definition at line 261 of file mpegstreamdata.h.

Referenced by SetRecordingType().

◆ GetAudioStreamsRequired()

uint MPEGStreamData::GetAudioStreamsRequired ( ) const
inline

Definition at line 263 of file mpegstreamdata.h.

◆ SetRecordingType()

void MPEGStreamData::SetRecordingType ( const QString &  recording_type)

◆ DesiredProgram()

int MPEGStreamData::DesiredProgram ( void  ) const
inline

◆ VideoPIDSingleProgram()

uint MPEGStreamData::VideoPIDSingleProgram ( void  ) const
inline

Definition at line 269 of file mpegstreamdata.h.

◆ GetRecordingType()

QString MPEGStreamData::GetRecordingType ( void  ) const

Definition at line 130 of file mpegstreamdata.cpp.

◆ PATSingleProgram() [1/2]

const ProgramAssociationTable* MPEGStreamData::PATSingleProgram ( void  ) const
inline

◆ PMTSingleProgram() [1/2]

const ProgramMapTable* MPEGStreamData::PMTSingleProgram ( void  ) const
inline

◆ PATSingleProgram() [2/2]

ProgramAssociationTable* MPEGStreamData::PATSingleProgram ( void  )
inline

Definition at line 277 of file mpegstreamdata.h.

◆ PMTSingleProgram() [2/2]

ProgramMapTable* MPEGStreamData::PMTSingleProgram ( void  )
inline

Definition at line 279 of file mpegstreamdata.h.

◆ VersionPATSingleProgram()

int MPEGStreamData::VersionPATSingleProgram ( void  ) const
inline

Definition at line 404 of file mpegstreamdata.h.

◆ VersionPMTSingleProgram()

int MPEGStreamData::VersionPMTSingleProgram ( void  ) const
inline

Definition at line 409 of file mpegstreamdata.h.

◆ CreatePATSingleProgram()

bool MPEGStreamData::CreatePATSingleProgram ( const ProgramAssociationTable pat)

Definition at line 377 of file mpegstreamdata.cpp.

Referenced by ProcessPAT().

◆ CreatePMTSingleProgram()

bool MPEGStreamData::CreatePMTSingleProgram ( const ProgramMapTable pmt)

Definition at line 485 of file mpegstreamdata.cpp.

Referenced by ProcessPMT().

◆ AssemblePSIP() [1/2]

PSIPTable * MPEGStreamData::AssemblePSIP ( const TSPacket tspacket,
bool moreTablePackets 
)
protected

PSIP packet assembler.

This is not a general purpose TS->PSIP packet converter, it is only designed to work with MPEG tables which comply with certain restrictions that simplify the conversion.

DVB TSPackets may contain multiple segments of the PSI stream. (see ISO 13818-1 section 2.4.3.3, particularly the definition of payload_unit_start_indicator, which indicates there is at least one segment start, but not limited to only one segment start.)

PSI stuffing bytes are 0xFF and will complete the remaining portion of the TSPacket. (Section 2.4.4)

Note
This method makes the assumption that AddTSPacket correctly handles duplicate packets.
Parameters
tspacketPointer the the TS packet data.
moreTablePacketsreturns true if we need more packets

Definition at line 236 of file mpegstreamdata.cpp.

Referenced by HandleTSTables().

◆ AssemblePSIP() [2/2]

bool MPEGStreamData::AssemblePSIP ( PSIPTable psip,
TSPacket tspacket 
)
protected

◆ SavePartialPSIP()

void MPEGStreamData::SavePartialPSIP ( uint  pid,
PSIPTable packet 
)
protected

Definition at line 1157 of file mpegstreamdata.cpp.

Referenced by AssemblePSIP().

◆ GetPartialPSIP()

PSIPTable* MPEGStreamData::GetPartialPSIP ( uint  pid)
inlineprotected

Definition at line 294 of file mpegstreamdata.h.

Referenced by AssemblePSIP().

◆ ClearPartialPSIP()

void MPEGStreamData::ClearPartialPSIP ( uint  pid)
inlineprotected

Definition at line 296 of file mpegstreamdata.h.

◆ DeletePartialPSIP()

void MPEGStreamData::DeletePartialPSIP ( uint  pid)
protected

Definition at line 203 of file mpegstreamdata.cpp.

Referenced by AssemblePSIP(), and Reset().

◆ ProcessPAT()

void MPEGStreamData::ProcessPAT ( const ProgramAssociationTable pat)
protected

Definition at line 760 of file mpegstreamdata.cpp.

Referenced by HandleTables(), and SetDesiredProgram().

◆ ProcessCAT()

void MPEGStreamData::ProcessCAT ( const ConditionalAccessTable cat)
protected

Definition at line 811 of file mpegstreamdata.cpp.

Referenced by HandleTables().

◆ ProcessPMT()

void MPEGStreamData::ProcessPMT ( const ProgramMapTable pmt)
protected

Definition at line 829 of file mpegstreamdata.cpp.

Referenced by HandleTables(), and SetDesiredProgram().

◆ ProcessEncryptedPacket()

void MPEGStreamData::ProcessEncryptedPacket ( const TSPacket tspacket)
protected

counts en/decrypted packets to decide if a stream is en/decrypted

Definition at line 1877 of file mpegstreamdata.cpp.

Referenced by ProcessTSPacket().

◆ ResyncStream()

int MPEGStreamData::ResyncStream ( const unsigned char *  buffer,
int  curr_pos,
int  len 
)
staticprotected

Definition at line 1067 of file mpegstreamdata.cpp.

Referenced by ProcessData().

◆ UpdateTimeOffset()

void MPEGStreamData::UpdateTimeOffset ( uint64_t  si_utc_time)
protected

◆ IncrementRefCnt()

void MPEGStreamData::IncrementRefCnt ( const PSIPTable psip) const
protected

◆ DeleteCachedTable()

bool MPEGStreamData::DeleteCachedTable ( PSIPTable psip) const
protectedvirtual

◆ CachePAT()

void MPEGStreamData::CachePAT ( const ProgramAssociationTable pat)
protected

Definition at line 1568 of file mpegstreamdata.cpp.

Referenced by HandleTables().

◆ CacheCAT()

void MPEGStreamData::CacheCAT ( const ConditionalAccessTable pat)
protected

Definition at line 1582 of file mpegstreamdata.cpp.

Referenced by HandleTables().

◆ CachePMT()

void MPEGStreamData::CachePMT ( const ProgramMapTable pmt)
protected

Definition at line 1596 of file mpegstreamdata.cpp.

Referenced by HandleTables().

Member Data Documentation

◆ _cardid

int MPEGStreamData::_cardid
protected

Definition at line 316 of file mpegstreamdata.h.

◆ _sistandard

QString MPEGStreamData::_sistandard
protected

Definition at line 317 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram(), and TestDecryption().

◆ _have_CRC_bug

bool MPEGStreamData::_have_CRC_bug
protected

Definition at line 319 of file mpegstreamdata.h.

Referenced by AssemblePSIP(), and HandleTSTables().

◆ _si_time_lock

QMutex MPEGStreamData::_si_time_lock
mutableprotected

Definition at line 321 of file mpegstreamdata.h.

Referenced by TimeOffset(), and UpdateTimeOffset().

◆ _si_time_offset_cnt

uint MPEGStreamData::_si_time_offset_cnt
protected

Definition at line 322 of file mpegstreamdata.h.

Referenced by TimeOffset(), and UpdateTimeOffset().

◆ _si_time_offset_indx

uint MPEGStreamData::_si_time_offset_indx
protected

Definition at line 323 of file mpegstreamdata.h.

Referenced by UpdateTimeOffset().

◆ _si_time_offsets

double MPEGStreamData::_si_time_offsets[16]
protected

Definition at line 324 of file mpegstreamdata.h.

Referenced by MPEGStreamData(), TimeOffset(), and UpdateTimeOffset().

◆ _eit_helper

EITHelper* MPEGStreamData::_eit_helper
protected

◆ _eit_rate

float MPEGStreamData::_eit_rate
protected

◆ _pids_listening

pid_map_t MPEGStreamData::_pids_listening
protected

◆ _pids_notlistening

pid_map_t MPEGStreamData::_pids_notlistening
protected

Definition at line 332 of file mpegstreamdata.h.

Referenced by GetPIDPriority(), IsNotListeningPID(), and Reset().

◆ _pids_writing

pid_map_t MPEGStreamData::_pids_writing
protected

◆ _pids_audio

pid_map_t MPEGStreamData::_pids_audio
protected

Definition at line 334 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram(), GetPIDPriority(), GetPIDs(), IsAudioPID(), and Reset().

◆ _listening_disabled

bool MPEGStreamData::_listening_disabled
protected

Definition at line 335 of file mpegstreamdata.h.

Referenced by IsListeningPID().

◆ _encryption_lock

QMutex MPEGStreamData::_encryption_lock
mutableprotected

◆ _encryption_pid_to_info

QMap<uint, CryptInfo> MPEGStreamData::_encryption_pid_to_info
protected

◆ _encryption_pnum_to_pids

QMap<uint, uint_vec_t> MPEGStreamData::_encryption_pnum_to_pids
protected

◆ _encryption_pid_to_pnums

QMap<uint, uint_vec_t> MPEGStreamData::_encryption_pid_to_pnums
protected

◆ _encryption_pnum_to_status

QMap<uint, CryptStatus> MPEGStreamData::_encryption_pnum_to_status
protected

◆ _listener_lock

QMutex MPEGStreamData::_listener_lock
mutableprotected

◆ _mpeg_listeners

mpeg_listener_vec_t MPEGStreamData::_mpeg_listeners
protected

◆ _mpeg_sp_listeners

mpeg_sp_listener_vec_t MPEGStreamData::_mpeg_sp_listeners
protected

◆ _ts_writing_listeners

ts_listener_vec_t MPEGStreamData::_ts_writing_listeners
protected

Definition at line 348 of file mpegstreamdata.h.

Referenced by AddWritingListener(), ProcessTSPacket(), and RemoveWritingListener().

◆ _ts_av_listeners

ts_av_listener_vec_t MPEGStreamData::_ts_av_listeners
protected

Definition at line 349 of file mpegstreamdata.h.

Referenced by AddAVListener(), ProcessTSPacket(), and RemoveAVListener().

◆ _ps_listeners

ps_listener_vec_t MPEGStreamData::_ps_listeners
protected

Definition at line 350 of file mpegstreamdata.h.

Referenced by AddPSStreamListener(), ProcessData(), and RemovePSStreamListener().

◆ _pat_status

TableStatusMap MPEGStreamData::_pat_status
protected

Definition at line 353 of file mpegstreamdata.h.

Referenced by HandleTables(), HasAllPATSections(), IsRedundant(), and Reset().

◆ _cat_status

TableStatusMap MPEGStreamData::_cat_status
protected

Definition at line 354 of file mpegstreamdata.h.

Referenced by HandleTables(), HasAllCATSections(), and IsRedundant().

◆ _pmt_status

TableStatusMap MPEGStreamData::_pmt_status
protected

Definition at line 355 of file mpegstreamdata.h.

Referenced by HandleTables(), HasAllPMTSections(), IsRedundant(), and Reset().

◆ _partial_psip_packet_cache

pid_psip_map_t MPEGStreamData::_partial_psip_packet_cache
protected

Definition at line 358 of file mpegstreamdata.h.

Referenced by DeletePartialPSIP(), Reset(), and SavePartialPSIP().

◆ _cache_tables

bool MPEGStreamData::_cache_tables
protected

◆ _cache_lock

QMutex MPEGStreamData::_cache_lock
mutableprotected

◆ _cached_pats

pat_cache_t MPEGStreamData::_cached_pats
mutableprotected

◆ _cached_cats

cat_cache_t MPEGStreamData::_cached_cats
mutableprotected

◆ _cached_pmts

pmt_cache_t MPEGStreamData::_cached_pmts
mutableprotected

◆ _cached_ref_cnt

psip_refcnt_map_t MPEGStreamData::_cached_ref_cnt
mutableprotected

◆ _cached_slated_for_deletion

psip_refcnt_map_t MPEGStreamData::_cached_slated_for_deletion
mutableprotected

◆ _desired_program

int MPEGStreamData::_desired_program
protected

◆ _recording_type

QString MPEGStreamData::_recording_type
protected

◆ _strip_pmt_descriptors

bool MPEGStreamData::_strip_pmt_descriptors
protected

Definition at line 372 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram(), and Reset().

◆ _normalize_stream_type

bool MPEGStreamData::_normalize_stream_type
protected

Definition at line 373 of file mpegstreamdata.h.

Referenced by Reset().

◆ _pid_video_single_program

uint MPEGStreamData::_pid_video_single_program
protected

Definition at line 374 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram(), GetPIDPriority(), GetPIDs(), and Reset().

◆ _pid_pmt_single_program

uint MPEGStreamData::_pid_pmt_single_program
protected

◆ _pmt_single_program_num_video

uint MPEGStreamData::_pmt_single_program_num_video
protected

Definition at line 376 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram().

◆ _pmt_single_program_num_audio

uint MPEGStreamData::_pmt_single_program_num_audio
protected

Definition at line 377 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram().

◆ _pat_single_program

ProgramAssociationTable* MPEGStreamData::_pat_single_program
protected

Definition at line 378 of file mpegstreamdata.h.

◆ _pmt_single_program

ProgramMapTable* MPEGStreamData::_pmt_single_program
protected

Definition at line 379 of file mpegstreamdata.h.

◆ _invalid_pat_seen

bool MPEGStreamData::_invalid_pat_seen
private

Definition at line 383 of file mpegstreamdata.h.

Referenced by ProcessPAT(), and Reset().

◆ _invalid_pat_warning

bool MPEGStreamData::_invalid_pat_warning
private

Definition at line 384 of file mpegstreamdata.h.

Referenced by ProcessPAT().

◆ _invalid_pat_timer

MythTimer MPEGStreamData::_invalid_pat_timer
private

Definition at line 385 of file mpegstreamdata.h.

Referenced by ProcessPAT().


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