MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static 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)
 
int VersionPAT (uint tsid) const
 
void SetVersionCAT (uint tsid, int version, uint last_section)
 
int VersionCAT (uint tsid) const
 
void SetVersionPMT (uint program_num, int version, uint last_section)
 
int VersionPMT (uint prog_num) const
 
void SetPATSectionSeen (uint tsid, uint section)
 
bool PATSectionSeen (uint tsid, uint section) const
 
bool HasAllPATSections (uint tsid) const
 
void SetCATSectionSeen (uint tsid, uint section)
 
bool CATSectionSeen (uint tsid, uint section) const
 
bool HasAllCATSections (uint tsid) const
 
void SetPMTSectionSeen (uint prog_num, uint section)
 
bool PMTSectionSeen (uint prog_num, uint section) 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 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
 
QMap< uint, int_pat_version
 
QMap< uint, int_cat_version
 
QMap< uint, int_pmt_version
 
sections_map_t _pat_section_seen
 
sections_map_t _cat_section_seen
 
sections_map_t _pmt_section_seen
 
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
 

Static Protected Attributes

static const unsigned char bit_sel [8]
 

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 94 of file mpegstreamdata.h.

Constructor & Destructor Documentation

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
cacheTablesIf true PAT and PMT tables will be cached

Definition at line 66 of file mpegstreamdata.cpp.

MPEGStreamData::~MPEGStreamData ( )
virtual

Definition at line 95 of file mpegstreamdata.cpp.

Member Function Documentation

void MPEGStreamData::SetCaching ( bool  cacheTables)
inline

Definition at line 100 of file mpegstreamdata.h.

Referenced by TVRec::SetupDTVSignalMonitor().

void MPEGStreamData::SetListeningDisabled ( bool  lt)
inline

Definition at line 101 of file mpegstreamdata.h.

Referenced by ASIRecorder::ASIRecorder().

virtual void MPEGStreamData::Reset ( void  )
inlinevirtual
void MPEGStreamData::Reset ( int  desiredProgram)
virtual

Reimplemented in ATSCStreamData.

Definition at line 175 of file mpegstreamdata.cpp.

double MPEGStreamData::TimeOffset ( void  ) const

Current Offset from computer time to DVB time in seconds.

Definition at line 873 of file mpegstreamdata.cpp.

void MPEGStreamData::SetEITHelper ( EITHelper eit_helper)
virtual

Implements EITSource.

Definition at line 163 of file mpegstreamdata.cpp.

void MPEGStreamData::SetEITRate ( float  rate)
virtual

Implements EITSource.

Definition at line 169 of file mpegstreamdata.cpp.

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

Reimplemented in DVBStreamData, ATSCStreamData, and ScanStreamData.

Definition at line 112 of file mpegstreamdata.h.

Referenced by StreamHandler::UpdateListeningForEIT().

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

Reimplemented in DVBStreamData, ATSCStreamData, and ScanStreamData.

Definition at line 114 of file mpegstreamdata.h.

Referenced by StreamHandler::UpdateListeningForEIT().

void MPEGStreamData::SetIgnoreCRC ( bool  haveCRCbug)
inline

Definition at line 120 of file mpegstreamdata.h.

Referenced by apply_broken_dvb_driver_crc_hack().

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

Returns true if table already seen.

Reimplemented in DVBStreamData, ATSCStreamData, and ScanStreamData.

Definition at line 685 of file mpegstreamdata.cpp.

Referenced by HandleTables(), HandleTSTables(), ATSCStreamData::IsRedundant(), and DVBStreamData::IsRedundant().

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

Assembles PSIP packets and processes them.

Reimplemented in DVBStreamData, ATSCStreamData, and ScanStreamData.

Definition at line 718 of file mpegstreamdata.cpp.

Referenced by ATSCStreamData::HandleTables(), DVBStreamData::HandleTables(), HandleTSTables(), and ASIRecorder::run().

void MPEGStreamData::HandleTSTables ( const TSPacket tspacket)
virtual

Assembles PSIP packets and processes them.

Definition at line 912 of file mpegstreamdata.cpp.

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

bool MPEGStreamData::ProcessTSPacket ( const TSPacket tspacket)
virtual

Definition at line 1040 of file mpegstreamdata.cpp.

Referenced by ProcessData().

int MPEGStreamData::ProcessData ( const unsigned char *  buffer,
int  len 
)
virtual
void MPEGStreamData::HandleAdaptationFieldControl ( const TSPacket tspacket)
inline

Definition at line 460 of file mpegstreamdata.h.

Referenced by FirewireRecorder::ProcessTSPacket().

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

Definition at line 132 of file mpegstreamdata.h.

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

Definition at line 137 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram().

virtual void MPEGStreamData::RemoveListeningPID ( uint  pid)
inlinevirtual
virtual void MPEGStreamData::RemoveNotListeningPID ( uint  pid)
inlinevirtual

Definition at line 142 of file mpegstreamdata.h.

virtual void MPEGStreamData::RemoveWritingPID ( uint  pid)
inlinevirtual

Definition at line 144 of file mpegstreamdata.h.

virtual void MPEGStreamData::RemoveAudioPID ( uint  pid)
inlinevirtual

Definition at line 145 of file mpegstreamdata.h.

bool MPEGStreamData::IsListeningPID ( uint  pid) const
virtual

Definition at line 1105 of file mpegstreamdata.cpp.

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

bool MPEGStreamData::IsNotListeningPID ( uint  pid) const
virtual

Definition at line 1113 of file mpegstreamdata.cpp.

Referenced by IsListeningPID().

bool MPEGStreamData::IsWritingPID ( uint  pid) const
virtual

Definition at line 1119 of file mpegstreamdata.cpp.

Referenced by ProcessTSPacket().

bool MPEGStreamData::IsVideoPID ( uint  pid) const
inline

Definition at line 150 of file mpegstreamdata.h.

Referenced by ProcessTSPacket().

bool MPEGStreamData::IsAudioPID ( uint  pid) const
virtual

Definition at line 1125 of file mpegstreamdata.cpp.

Referenced by ProcessTSPacket().

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

Definition at line 154 of file mpegstreamdata.h.

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

Definition at line 156 of file mpegstreamdata.h.

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

Definition at line 158 of file mpegstreamdata.h.

uint MPEGStreamData::GetPIDs ( pid_map_t pids) const

Definition at line 1131 of file mpegstreamdata.cpp.

PIDPriority MPEGStreamData::GetPIDPriority ( uint  pid) const

Definition at line 1153 of file mpegstreamdata.cpp.

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

Definition at line 174 of file mpegstreamdata.h.

Referenced by IsRedundant().

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

Definition at line 182 of file mpegstreamdata.h.

Referenced by HandleTables().

int MPEGStreamData::VersionCAT ( uint  tsid) const
inline

Definition at line 189 of file mpegstreamdata.h.

Referenced by IsRedundant().

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

Definition at line 197 of file mpegstreamdata.h.

Referenced by FirewireSignalMonitor::HandlePMT(), and HandleTables().

int MPEGStreamData::VersionPMT ( uint  prog_num) const
inline

Definition at line 204 of file mpegstreamdata.h.

Referenced by IsRedundant().

void MPEGStreamData::SetPATSectionSeen ( uint  tsid,
uint  section 
)

Definition at line 1189 of file mpegstreamdata.cpp.

Referenced by HandleTables().

bool MPEGStreamData::PATSectionSeen ( uint  tsid,
uint  section 
) const

Definition at line 1200 of file mpegstreamdata.cpp.

Referenced by IsRedundant().

bool MPEGStreamData::HasAllPATSections ( uint  tsid) const

Definition at line 1208 of file mpegstreamdata.cpp.

void MPEGStreamData::SetCATSectionSeen ( uint  tsid,
uint  section 
)

Definition at line 1219 of file mpegstreamdata.cpp.

Referenced by HandleTables().

bool MPEGStreamData::CATSectionSeen ( uint  tsid,
uint  section 
) const

Definition at line 1230 of file mpegstreamdata.cpp.

Referenced by IsRedundant().

bool MPEGStreamData::HasAllCATSections ( uint  tsid) const

Definition at line 1238 of file mpegstreamdata.cpp.

void MPEGStreamData::SetPMTSectionSeen ( uint  prog_num,
uint  section 
)

Definition at line 1249 of file mpegstreamdata.cpp.

Referenced by HandleTables().

bool MPEGStreamData::PMTSectionSeen ( uint  prog_num,
uint  section 
) const

Definition at line 1260 of file mpegstreamdata.cpp.

Referenced by IsRedundant().

bool MPEGStreamData::HasAllPMTSections ( uint  prog_num) const

Definition at line 1268 of file mpegstreamdata.cpp.

bool MPEGStreamData::HasProgram ( uint  progNum) const
bool MPEGStreamData::HasCachedAllPAT ( uint  tsid) const

Definition at line 1288 of file mpegstreamdata.cpp.

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

bool MPEGStreamData::HasCachedAnyPAT ( uint  tsid) const

Definition at line 1307 of file mpegstreamdata.cpp.

Referenced by ChannelScanSM::HasTimedOut().

bool MPEGStreamData::HasCachedAnyPAT ( void  ) const

Definition at line 1318 of file mpegstreamdata.cpp.

bool MPEGStreamData::HasCachedAllCAT ( uint  tsid) const

Definition at line 1324 of file mpegstreamdata.cpp.

bool MPEGStreamData::HasCachedAnyCAT ( uint  tsid) const

Definition at line 1343 of file mpegstreamdata.cpp.

bool MPEGStreamData::HasCachedAnyCAT ( void  ) const

Definition at line 1354 of file mpegstreamdata.cpp.

bool MPEGStreamData::HasCachedAllPMT ( uint  program_num) const

Definition at line 1360 of file mpegstreamdata.cpp.

Referenced by HasCachedAllPMTs().

bool MPEGStreamData::HasCachedAnyPMT ( uint  program_num) const

Definition at line 1379 of file mpegstreamdata.cpp.

bool MPEGStreamData::HasCachedAllPMTs ( void  ) const

Definition at line 1390 of file mpegstreamdata.cpp.

Referenced by ChannelScanSM::UpdateChannelInfo().

bool MPEGStreamData::HasCachedAnyPMTs ( void  ) const

Definition at line 1412 of file mpegstreamdata.cpp.

Referenced by ChannelScanSM::HasTimedOut().

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

Definition at line 1418 of file mpegstreamdata.cpp.

Referenced by GetCachedPATs().

pat_vec_t MPEGStreamData::GetCachedPATs ( uint  tsid) const

Definition at line 1431 of file mpegstreamdata.cpp.

Referenced by ChannelScanSM::UpdateChannelInfo().

pat_vec_t MPEGStreamData::GetCachedPATs ( void  ) const

Definition at line 1446 of file mpegstreamdata.cpp.

Referenced by SetDesiredProgram().

pat_map_t MPEGStreamData::GetCachedPATMap ( void  ) const
cat_const_ptr_t MPEGStreamData::GetCachedCAT ( uint  tsid,
uint  section_num 
) const

Definition at line 1462 of file mpegstreamdata.cpp.

Referenced by GetCachedCATs().

cat_vec_t MPEGStreamData::GetCachedCATs ( uint  tsid) const

Definition at line 1475 of file mpegstreamdata.cpp.

cat_vec_t MPEGStreamData::GetCachedCATs ( void  ) const

Definition at line 1490 of file mpegstreamdata.cpp.

cat_map_t MPEGStreamData::GetCachedCATMap ( void  ) const
pmt_const_ptr_t MPEGStreamData::GetCachedPMT ( uint  program_num,
uint  section_num 
) const

Definition at line 1506 of file mpegstreamdata.cpp.

Referenced by HasProgram().

pmt_vec_t MPEGStreamData::GetCachedPMTs ( void  ) const

Definition at line 1520 of file mpegstreamdata.cpp.

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

pmt_map_t MPEGStreamData::GetCachedPMTMap ( void  ) const

Definition at line 1536 of file mpegstreamdata.cpp.

void MPEGStreamData::ReturnCachedTable ( const PSIPTable psip) const
virtual
void MPEGStreamData::ReturnCachedPATTables ( pat_vec_t pats) const
virtual
void MPEGStreamData::ReturnCachedPATTables ( pat_map_t pats) const
virtual

Definition at line 1576 of file mpegstreamdata.cpp.

void MPEGStreamData::ReturnCachedCATTables ( cat_vec_t cats) const
virtual

Definition at line 1583 of file mpegstreamdata.cpp.

Referenced by ReturnCachedCATTables().

void MPEGStreamData::ReturnCachedCATTables ( cat_map_t cats) const
virtual

Definition at line 1590 of file mpegstreamdata.cpp.

void MPEGStreamData::ReturnCachedPMTTables ( pmt_vec_t pmts) const
virtual
void MPEGStreamData::ReturnCachedPMTTables ( pmt_map_t pmts) const
virtual

Definition at line 1604 of file mpegstreamdata.cpp.

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

Definition at line 1811 of file mpegstreamdata.cpp.

Referenced by TestDecryption().

void MPEGStreamData::RemoveEncryptionTestPIDs ( uint  pnum)

Definition at line 1829 of file mpegstreamdata.cpp.

Referenced by ProcessEncryptedPacket().

bool MPEGStreamData::IsEncryptionTestPID ( uint  pid) const

Definition at line 1873 of file mpegstreamdata.cpp.

Referenced by ProcessTSPacket().

void MPEGStreamData::TestDecryption ( const ProgramMapTable pmt)
void MPEGStreamData::ResetDecryptionMonitoringState ( void  )

Definition at line 1909 of file mpegstreamdata.cpp.

Referenced by Reset().

bool MPEGStreamData::IsProgramDecrypted ( uint  pnum) const

Definition at line 1918 of file mpegstreamdata.cpp.

bool MPEGStreamData::IsProgramEncrypted ( uint  pnum) const

Definition at line 1924 of file mpegstreamdata.cpp.

void MPEGStreamData::AddMPEGListener ( MPEGStreamListener val)
void MPEGStreamData::RemoveMPEGListener ( MPEGStreamListener val)

Definition at line 1715 of file mpegstreamdata.cpp.

Referenced by DTVSignalMonitor::SetStreamData().

void MPEGStreamData::UpdatePAT ( const ProgramAssociationTable )
void MPEGStreamData::UpdateCAT ( const ConditionalAccessTable )
void MPEGStreamData::UpdatePMT ( uint  program_num,
const ProgramMapTable  
)
void MPEGStreamData::AddWritingListener ( TSPacketListener val)
void MPEGStreamData::RemoveWritingListener ( TSPacketListener val)
void MPEGStreamData::AddMPEGSPListener ( MPEGSingleProgramStreamListener val)
void MPEGStreamData::RemoveMPEGSPListener ( MPEGSingleProgramStreamListener val)

Definition at line 1796 of file mpegstreamdata.cpp.

void MPEGStreamData::AddAVListener ( TSPacketListenerAV val)
void MPEGStreamData::RemoveAVListener ( TSPacketListenerAV val)
void MPEGStreamData::UpdatePATSingleProgram ( ProgramAssociationTable )
void MPEGStreamData::UpdatePMTSingleProgram ( ProgramMapTable )
void MPEGStreamData::SetDesiredProgram ( int  p)
void MPEGStreamData::SetPATSingleProgram ( ProgramAssociationTable pat)
inline

Definition at line 436 of file mpegstreamdata.h.

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

void MPEGStreamData::SetPMTSingleProgram ( ProgramMapTable pmt)
inline

Definition at line 443 of file mpegstreamdata.h.

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

void MPEGStreamData::SetVideoStreamsRequired ( uint  num)
inline

Definition at line 297 of file mpegstreamdata.h.

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

uint MPEGStreamData::GetVideoStreamsRequired ( ) const
inline

Definition at line 299 of file mpegstreamdata.h.

void MPEGStreamData::SetAudioStreamsRequired ( uint  num)
inline

Definition at line 301 of file mpegstreamdata.h.

Referenced by SetRecordingType().

uint MPEGStreamData::GetAudioStreamsRequired ( ) const
inline

Definition at line 303 of file mpegstreamdata.h.

void MPEGStreamData::SetRecordingType ( const QString &  recording_type)
int MPEGStreamData::DesiredProgram ( void  ) const
inline
uint MPEGStreamData::VideoPIDSingleProgram ( void  ) const
inline

Definition at line 309 of file mpegstreamdata.h.

QString MPEGStreamData::GetRecordingType ( void  ) const

Definition at line 156 of file mpegstreamdata.cpp.

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

Definition at line 317 of file mpegstreamdata.h.

ProgramMapTable* MPEGStreamData::PMTSingleProgram ( void  )
inline

Definition at line 319 of file mpegstreamdata.h.

int MPEGStreamData::VersionPATSingleProgram ( void  ) const
inline

Definition at line 450 of file mpegstreamdata.h.

int MPEGStreamData::VersionPMTSingleProgram ( void  ) const
inline

Definition at line 455 of file mpegstreamdata.h.

bool MPEGStreamData::CreatePATSingleProgram ( const ProgramAssociationTable pat)

Definition at line 402 of file mpegstreamdata.cpp.

Referenced by ProcessPAT().

bool MPEGStreamData::CreatePMTSingleProgram ( const ProgramMapTable pmt)

Definition at line 510 of file mpegstreamdata.cpp.

Referenced by ProcessPMT().

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
moreTablePacketsreturns true if we need more packets

Definition at line 263 of file mpegstreamdata.cpp.

Referenced by HandleTSTables().

bool MPEGStreamData::AssemblePSIP ( PSIPTable psip,
TSPacket tspacket 
)
protected
void MPEGStreamData::SavePartialPSIP ( uint  pid,
PSIPTable packet 
)
protected

Definition at line 1175 of file mpegstreamdata.cpp.

Referenced by AssemblePSIP().

PSIPTable* MPEGStreamData::GetPartialPSIP ( uint  pid)
inlineprotected

Definition at line 334 of file mpegstreamdata.h.

Referenced by AssemblePSIP().

void MPEGStreamData::ClearPartialPSIP ( uint  pid)
inlineprotected

Definition at line 336 of file mpegstreamdata.h.

void MPEGStreamData::DeletePartialPSIP ( uint  pid)
protected

Definition at line 231 of file mpegstreamdata.cpp.

Referenced by AssemblePSIP(), and Reset().

void MPEGStreamData::ProcessPAT ( const ProgramAssociationTable pat)
protected

Definition at line 787 of file mpegstreamdata.cpp.

Referenced by HandleTables(), and SetDesiredProgram().

void MPEGStreamData::ProcessCAT ( const ConditionalAccessTable cat)
protected

Definition at line 838 of file mpegstreamdata.cpp.

Referenced by HandleTables().

void MPEGStreamData::ProcessPMT ( const ProgramMapTable pmt)
protected

Definition at line 856 of file mpegstreamdata.cpp.

Referenced by HandleTables(), and SetDesiredProgram().

void MPEGStreamData::ProcessEncryptedPacket ( const TSPacket tspacket)
protected

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

Definition at line 1943 of file mpegstreamdata.cpp.

Referenced by ProcessTSPacket().

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

Definition at line 1085 of file mpegstreamdata.cpp.

Referenced by ProcessData().

void MPEGStreamData::UpdateTimeOffset ( uint64_t  si_utc_time)
protected
void MPEGStreamData::IncrementRefCnt ( const PSIPTable psip) const
protected
bool MPEGStreamData::DeleteCachedTable ( PSIPTable psip) const
protectedvirtual
void MPEGStreamData::CachePAT ( const ProgramAssociationTable pat)
protected

Definition at line 1661 of file mpegstreamdata.cpp.

Referenced by HandleTables().

void MPEGStreamData::CacheCAT ( const ConditionalAccessTable pat)
protected

Definition at line 1675 of file mpegstreamdata.cpp.

Referenced by HandleTables().

void MPEGStreamData::CachePMT ( const ProgramMapTable pmt)
protected

Definition at line 1689 of file mpegstreamdata.cpp.

Referenced by HandleTables().

Member Data Documentation

int MPEGStreamData::_cardid
protected

Definition at line 356 of file mpegstreamdata.h.

QString MPEGStreamData::_sistandard
protected

Definition at line 357 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram(), and TestDecryption().

bool MPEGStreamData::_have_CRC_bug
protected

Definition at line 359 of file mpegstreamdata.h.

Referenced by AssemblePSIP(), and HandleTSTables().

QMutex MPEGStreamData::_si_time_lock
mutableprotected

Definition at line 361 of file mpegstreamdata.h.

Referenced by TimeOffset(), and UpdateTimeOffset().

uint MPEGStreamData::_si_time_offset_cnt
protected

Definition at line 362 of file mpegstreamdata.h.

Referenced by TimeOffset(), and UpdateTimeOffset().

uint MPEGStreamData::_si_time_offset_indx
protected

Definition at line 363 of file mpegstreamdata.h.

Referenced by UpdateTimeOffset().

double MPEGStreamData::_si_time_offsets[16]
protected

Definition at line 364 of file mpegstreamdata.h.

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

EITHelper* MPEGStreamData::_eit_helper
protected
float MPEGStreamData::_eit_rate
protected
pid_map_t MPEGStreamData::_pids_listening
protected
pid_map_t MPEGStreamData::_pids_notlistening
protected

Definition at line 372 of file mpegstreamdata.h.

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

pid_map_t MPEGStreamData::_pids_writing
protected

Definition at line 373 of file mpegstreamdata.h.

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

pid_map_t MPEGStreamData::_pids_audio
protected

Definition at line 374 of file mpegstreamdata.h.

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

bool MPEGStreamData::_listening_disabled
protected

Definition at line 375 of file mpegstreamdata.h.

Referenced by IsListeningPID().

QMutex MPEGStreamData::_encryption_lock
mutableprotected
QMap<uint, CryptInfo> MPEGStreamData::_encryption_pid_to_info
protected
QMap<uint, uint_vec_t> MPEGStreamData::_encryption_pnum_to_pids
protected
QMap<uint, uint_vec_t> MPEGStreamData::_encryption_pid_to_pnums
protected
QMap<uint, CryptStatus> MPEGStreamData::_encryption_pnum_to_status
protected
QMutex MPEGStreamData::_listener_lock
mutableprotected

Definition at line 385 of file mpegstreamdata.h.

Referenced by ATSCStreamData::AddATSC81EITListener(), ATSCStreamData::AddATSCAuxListener(), ATSCStreamData::AddATSCEITListener(), ATSCStreamData::AddATSCMainListener(), AddAVListener(), DVBStreamData::AddDVBEITListener(), DVBStreamData::AddDVBMainListener(), DVBStreamData::AddDVBOtherListener(), AddMPEGListener(), AddMPEGSPListener(), ATSCStreamData::AddSCTEMainListener(), AddWritingListener(), ATSCStreamData::GetATSCMajorMinor(), ATSCStreamData::GetEITPIDChanges(), DVBStreamData::GetEITPIDChanges(), ATSCStreamData::HandleTables(), DVBStreamData::HandleTables(), HandleTables(), HandleTSTables(), DVBStreamData::HasAnyEIT(), ATSCStreamData::HasATSCMajorMinorMap(), DVBStreamData::HasEIT(), ATSCStreamData::HasEITPIDChanges(), DVBStreamData::HasEITPIDChanges(), ProcessCAT(), ATSCStreamData::ProcessCVCT(), ProcessEncryptedPacket(), ATSCStreamData::ProcessMGT(), ProcessPAT(), ProcessPMT(), DVBStreamData::ProcessSDT(), ATSCStreamData::ProcessTVCT(), ATSCStreamData::RemoveATSC81EITListener(), ATSCStreamData::RemoveATSCAuxListener(), ATSCStreamData::RemoveATSCEITListener(), ATSCStreamData::RemoveATSCMainListener(), RemoveAVListener(), DVBStreamData::RemoveDVBEITListener(), DVBStreamData::RemoveDVBMainListener(), DVBStreamData::RemoveDVBOtherListener(), RemoveMPEGListener(), RemoveMPEGSPListener(), ATSCStreamData::RemoveSCTEMainListener(), RemoveWritingListener(), DVBStreamData::SetDishNetEIT(), SetEITHelper(), SetEITRate(), ScanStreamData::SetFreesatAdditionalSI(), DVBStreamData::SetRealNetworkID(), ATSCStreamData::~ATSCStreamData(), DVBStreamData::~DVBStreamData(), and ~MPEGStreamData().

mpeg_listener_vec_t MPEGStreamData::_mpeg_listeners
protected
mpeg_sp_listener_vec_t MPEGStreamData::_mpeg_sp_listeners
protected
ts_listener_vec_t MPEGStreamData::_ts_writing_listeners
protected

Definition at line 388 of file mpegstreamdata.h.

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

ts_av_listener_vec_t MPEGStreamData::_ts_av_listeners
protected

Definition at line 389 of file mpegstreamdata.h.

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

QMap<uint, int> MPEGStreamData::_pat_version
protected

Definition at line 392 of file mpegstreamdata.h.

Referenced by Reset().

QMap<uint, int> MPEGStreamData::_cat_version
protected

Definition at line 393 of file mpegstreamdata.h.

QMap<uint, int> MPEGStreamData::_pmt_version
protected

Definition at line 394 of file mpegstreamdata.h.

Referenced by Reset().

sections_map_t MPEGStreamData::_pat_section_seen
protected

Definition at line 396 of file mpegstreamdata.h.

Referenced by HasAllPATSections(), PATSectionSeen(), Reset(), and SetPATSectionSeen().

sections_map_t MPEGStreamData::_cat_section_seen
protected

Definition at line 397 of file mpegstreamdata.h.

Referenced by CATSectionSeen(), HasAllCATSections(), and SetCATSectionSeen().

sections_map_t MPEGStreamData::_pmt_section_seen
protected

Definition at line 398 of file mpegstreamdata.h.

Referenced by HasAllPMTSections(), PMTSectionSeen(), Reset(), and SetPMTSectionSeen().

pid_psip_map_t MPEGStreamData::_partial_psip_packet_cache
protected

Definition at line 401 of file mpegstreamdata.h.

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

bool MPEGStreamData::_cache_tables
protected
QMutex MPEGStreamData::_cache_lock
mutableprotected
pat_cache_t MPEGStreamData::_cached_pats
mutableprotected
cat_cache_t MPEGStreamData::_cached_cats
mutableprotected
pmt_cache_t MPEGStreamData::_cached_pmts
mutableprotected
psip_refcnt_map_t MPEGStreamData::_cached_ref_cnt
mutableprotected
psip_refcnt_map_t MPEGStreamData::_cached_slated_for_deletion
mutableprotected
int MPEGStreamData::_desired_program
protected
QString MPEGStreamData::_recording_type
protected
bool MPEGStreamData::_strip_pmt_descriptors
protected

Definition at line 415 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram(), and Reset().

bool MPEGStreamData::_normalize_stream_type
protected

Definition at line 416 of file mpegstreamdata.h.

Referenced by Reset().

uint MPEGStreamData::_pid_video_single_program
protected

Definition at line 417 of file mpegstreamdata.h.

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

uint MPEGStreamData::_pid_pmt_single_program
protected
uint MPEGStreamData::_pmt_single_program_num_video
protected

Definition at line 419 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram().

uint MPEGStreamData::_pmt_single_program_num_audio
protected

Definition at line 420 of file mpegstreamdata.h.

Referenced by CreatePMTSingleProgram().

ProgramAssociationTable* MPEGStreamData::_pat_single_program
protected

Definition at line 421 of file mpegstreamdata.h.

ProgramMapTable* MPEGStreamData::_pmt_single_program
protected

Definition at line 422 of file mpegstreamdata.h.

bool MPEGStreamData::_invalid_pat_seen
private

Definition at line 426 of file mpegstreamdata.h.

Referenced by ProcessPAT(), and Reset().

bool MPEGStreamData::_invalid_pat_warning
private

Definition at line 427 of file mpegstreamdata.h.

Referenced by ProcessPAT().

MythTimer MPEGStreamData::_invalid_pat_timer
private

Definition at line 428 of file mpegstreamdata.h.

Referenced by ProcessPAT().

const unsigned char MPEGStreamData::bit_sel
staticprotected

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