ATSCStreamData Class Reference

#include <atscstreamdata.h>

Inheritance diagram for ATSCStreamData:

MPEGStreamData EITSource ScanStreamData

List of all members.


Detailed Description

Encapsulates data about ATSC stream and emits events for most tables.

Definition at line 22 of file atscstreamdata.h.


Public Member Functions

 ATSCStreamData (int desiredMajorChannel, int desiredMinorChannel, bool cacheTables=false)
 Initializes ATSCStreamData.
 ~ATSCStreamData ()
void Reset (void)
void Reset (int desiredProgram)
void Reset (int desiredMajorChannel, int desiredMinorChannel)
void SetDesiredChannel (int major, int minor)
virtual bool HandleTables (uint pid, const PSIPTable &psip)
 Assembles PSIP packets and processes them.
virtual bool IsRedundant (uint, const PSIPTable &) const
 Returns true if table already seen.
uint GPSOffset (void) const
 Current UTC to GPS time offset in seconds.
uint GetATSCMajorMinor (uint eit_sourceid) const
bool HasATSCMajorMinorMap (void) const
bool HasEITPIDChanges (const uint_vec_t &in_use_pid) const
bool GetEITPIDChanges (const uint_vec_t &in_use_pid, uint_vec_t &pids_to_add, uint_vec_t &pids_to_del) const
void SetVersionMGT (int version)
void SetVersionTVCT (uint tsid, int version)
void SetVersionCVCT (uint tsid, int version)
void SetVersionEIT (uint pid, uint atsc_source_id, int version)
void SetEITSectionSeen (uint pid, uint atsc_source_id, uint section)
int VersionMGT () const
int VersionTVCT (uint tsid) const
int VersionCVCT (uint tsid) const
int VersionEIT (uint pid, uint atsc_sourceid) const
bool EITSectionSeen (uint pid, uint atsc_source_id, uint section) 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
const MasterGuideTableGetCachedMGT (bool current=true) const
const tvct_ptr_t GetCachedTVCT (uint pid, bool current=true) const
const cvct_ptr_t GetCachedCVCT (uint pid, bool current=true) const
tvct_vec_t GetAllCachedTVCTs (bool current=true) const
cvct_vec_t GetAllCachedCVCTs (bool current=true) const
void ReturnCachedTVCTTables (tvct_vec_t &) const
void ReturnCachedCVCTTables (cvct_vec_t &) const
bool HasChannel (uint major, uint minor) const
int DesiredMajorChannel (void) const
int DesiredMinorChannel (void) const
void AddATSCMainListener (ATSCMainStreamListener *)
void AddATSCAuxListener (ATSCAuxStreamListener *)
void AddATSCEITListener (ATSCEITStreamListener *)
void RemoveATSCMainListener (ATSCMainStreamListener *)
void RemoveATSCAuxListener (ATSCAuxStreamListener *)
void RemoveATSCEITListener (ATSCEITStreamListener *)

Protected Member Functions

virtual void DeleteCachedTable (PSIPTable *psip) const

Private Member Functions

void ProcessMGT (const MasterGuideTable *)
void ProcessVCT (uint tsid, const VirtualChannelTable *)
void ProcessTVCT (uint tsid, const TerrestrialVirtualChannelTable *)
void ProcessCVCT (uint tsid, const CableVirtualChannelTable *)
void CacheMGT (MasterGuideTable *)
void CacheTVCT (uint pid, TerrestrialVirtualChannelTable *)
void CacheCVCT (uint pid, CableVirtualChannelTable *)

Private Attributes

uint _GPS_UTC_offset
bool _atsc_eit_reset
atsc_eit_pid_map_t _atsc_eit_pids
atsc_ett_pid_map_t _atsc_ett_pids
QMap< uint, uint_sourceid_to_atsc_maj_min
atsc_main_listener_vec_t _atsc_main_listeners
atsc_aux_listener_vec_t _atsc_aux_listeners
atsc_eit_listener_vec_t _atsc_eit_listeners
int _mgt_version
QMap< uint, int > _tvct_version
QMap< uint, int > _cvct_version
QMap< uint, int > _eit_version
sections_map_t _eit_section_seen
MasterGuideTable_cached_mgt
tvct_cache_t _cached_tvcts
cvct_cache_t _cached_cvcts
int _desired_major_channel
int _desired_minor_channel

Constructor & Destructor Documentation

ATSCStreamData::ATSCStreamData ( int  desiredMajorChannel,
int  desiredMinorChannel,
bool  cacheTables = false 
)

Initializes ATSCStreamData.

This adds the PID of the PAT and ATSC PSIP tables to "_pids_listening"

Parameters:
desiredMajorChannel If you want rewritten PAT and PMTs for a desired channel set this to a value greater than zero.
desiredMinorChannel If you want rewritten PAT and PMTs for a desired channel set this to a value greater than zero.
cacheTables If true important tables will be cached.

Definition at line 31 of file atscstreamdata.cpp.

ATSCStreamData::~ATSCStreamData (  ) 

Definition at line 45 of file atscstreamdata.cpp.


Member Function Documentation

void ATSCStreamData::Reset ( void   )  [inline, virtual]

Reimplemented from MPEGStreamData.

Reimplemented in ScanStreamData.

Definition at line 30 of file atscstreamdata.h.

Referenced by ScanStreamData::Reset(), SetDesiredChannel(), TVRec::SetupDTVSignalMonitor(), and ~ATSCStreamData().

void ATSCStreamData::Reset ( int  desiredProgram  )  [virtual]

Reimplemented from MPEGStreamData.

Definition at line 108 of file atscstreamdata.cpp.

void ATSCStreamData::Reset ( int  desiredMajorChannel,
int  desiredMinorChannel 
)

Definition at line 114 of file atscstreamdata.cpp.

void ATSCStreamData::SetDesiredChannel ( int  major,
int  minor 
)

bool ATSCStreamData::HandleTables ( uint  pid,
const PSIPTable psip 
) [virtual]

Assembles PSIP packets and processes them.

Reimplemented from MPEGStreamData.

Reimplemented in ScanStreamData.

Definition at line 197 of file atscstreamdata.cpp.

Referenced by ScanStreamData::HandleTables().

bool ATSCStreamData::IsRedundant ( uint  pid,
const PSIPTable psip 
) const [virtual]

Returns true if table already seen.

Todo:
All RRT tables are ignored
Todo:
We don't check the start time of EIT and ETT tables in the version check, so many tables are improperly ignored.

Reimplemented from MPEGStreamData.

Reimplemented in ScanStreamData.

Definition at line 157 of file atscstreamdata.cpp.

Referenced by HandleTables(), and ScanStreamData::IsRedundant().

uint ATSCStreamData::GPSOffset ( void   )  const [inline]

Current UTC to GPS time offset in seconds.

Definition at line 40 of file atscstreamdata.h.

Referenced by HandleTables().

uint ATSCStreamData::GetATSCMajorMinor ( uint  eit_sourceid  )  const [inline]

Definition at line 151 of file atscstreamdata.h.

Referenced by HandleTables().

bool ATSCStreamData::HasATSCMajorMinorMap ( void   )  const [inline]

Definition at line 157 of file atscstreamdata.h.

bool ATSCStreamData::HasEITPIDChanges ( const uint_vec_t in_use_pid  )  const [virtual]

Reimplemented from MPEGStreamData.

Reimplemented in ScanStreamData.

Definition at line 381 of file atscstreamdata.cpp.

bool ATSCStreamData::GetEITPIDChanges ( const uint_vec_t in_use_pid,
uint_vec_t pids_to_add,
uint_vec_t pids_to_del 
) const [virtual]

Reimplemented from MPEGStreamData.

Reimplemented in ScanStreamData.

Definition at line 389 of file atscstreamdata.cpp.

void ATSCStreamData::SetVersionMGT ( int  version  )  [inline]

Definition at line 50 of file atscstreamdata.h.

Referenced by HandleTables().

void ATSCStreamData::SetVersionTVCT ( uint  tsid,
int  version 
) [inline]

Definition at line 52 of file atscstreamdata.h.

Referenced by HandleTables(), and DTVSignalMonitor::HandleTVCT().

void ATSCStreamData::SetVersionCVCT ( uint  tsid,
int  version 
) [inline]

Definition at line 54 of file atscstreamdata.h.

Referenced by DTVSignalMonitor::HandleCVCT(), and HandleTables().

void ATSCStreamData::SetVersionEIT ( uint  pid,
uint  atsc_source_id,
int  version 
) [inline]

Definition at line 56 of file atscstreamdata.h.

Referenced by HandleTables().

void ATSCStreamData::SetEITSectionSeen ( uint  pid,
uint  atsc_source_id,
uint  section 
)

Definition at line 358 of file atscstreamdata.cpp.

Referenced by HandleTables().

int ATSCStreamData::VersionMGT (  )  const [inline]

Definition at line 67 of file atscstreamdata.h.

Referenced by IsRedundant().

int ATSCStreamData::VersionTVCT ( uint  tsid  )  const [inline]

Definition at line 163 of file atscstreamdata.h.

Referenced by IsRedundant().

int ATSCStreamData::VersionCVCT ( uint  tsid  )  const [inline]

Definition at line 171 of file atscstreamdata.h.

Referenced by IsRedundant().

int ATSCStreamData::VersionEIT ( uint  pid,
uint  atsc_sourceid 
) const [inline]

Definition at line 179 of file atscstreamdata.h.

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

bool ATSCStreamData::EITSectionSeen ( uint  pid,
uint  atsc_source_id,
uint  section 
) const

Definition at line 371 of file atscstreamdata.cpp.

Referenced by IsRedundant().

bool ATSCStreamData::HasCachedMGT ( bool  current = true  )  const

Definition at line 513 of file atscstreamdata.cpp.

Referenced by ScanStreamData::GetSIStandard().

bool ATSCStreamData::HasCachedTVCT ( uint  pid,
bool  current = true 
) const

Definition at line 549 of file atscstreamdata.cpp.

Referenced by HasCachedAllTVCTs().

bool ATSCStreamData::HasCachedCVCT ( uint  pid,
bool  current = true 
) const

Definition at line 562 of file atscstreamdata.cpp.

Referenced by HasCachedAllCVCTs().

bool ATSCStreamData::HasCachedAllTVCTs ( bool  current = true  )  const

Definition at line 575 of file atscstreamdata.cpp.

Referenced by HasCachedAllVCTs().

bool ATSCStreamData::HasCachedAllCVCTs ( bool  current = true  )  const

Definition at line 595 of file atscstreamdata.cpp.

Referenced by HasCachedAllVCTs().

bool ATSCStreamData::HasCachedAllVCTs ( bool  current = true  )  const [inline]

Definition at line 79 of file atscstreamdata.h.

Referenced by SIScan::HandleATSCDBInsertion().

const MasterGuideTable * ATSCStreamData::GetCachedMGT ( bool  current = true  )  const

const tvct_ptr_t ATSCStreamData::GetCachedTVCT ( uint  pid,
bool  current = true 
) const

Definition at line 628 of file atscstreamdata.cpp.

const cvct_ptr_t ATSCStreamData::GetCachedCVCT ( uint  pid,
bool  current = true 
) const

Definition at line 644 of file atscstreamdata.cpp.

tvct_vec_t ATSCStreamData::GetAllCachedTVCTs ( bool  current = true  )  const

cvct_vec_t ATSCStreamData::GetAllCachedCVCTs ( bool  current = true  )  const

void ATSCStreamData::ReturnCachedTVCTTables ( tvct_vec_t tvcts  )  const

void ATSCStreamData::ReturnCachedCVCTTables ( cvct_vec_t cvcts  )  const

bool ATSCStreamData::HasChannel ( uint  major,
uint  minor 
) const

Definition at line 521 of file atscstreamdata.cpp.

Referenced by TVRec::TuningOnSameMultiplex().

int ATSCStreamData::DesiredMajorChannel ( void   )  const [inline]

Definition at line 95 of file atscstreamdata.h.

Referenced by HDHRRecorder::SetStreamData(), and DVBRecorder::SetStreamData().

int ATSCStreamData::DesiredMinorChannel ( void   )  const [inline]

Definition at line 96 of file atscstreamdata.h.

Referenced by HDHRRecorder::SetStreamData(), and DVBRecorder::SetStreamData().

void ATSCStreamData::AddATSCMainListener ( ATSCMainStreamListener val  ) 

Definition at line 778 of file atscstreamdata.cpp.

Referenced by DTVSignalMonitor::SetStreamData(), and SIScan::SIScan().

void ATSCStreamData::AddATSCAuxListener ( ATSCAuxStreamListener val  ) 

Definition at line 805 of file atscstreamdata.cpp.

Referenced by DTVSignalMonitor::SetStreamData().

void ATSCStreamData::AddATSCEITListener ( ATSCEITStreamListener val  ) 

Definition at line 832 of file atscstreamdata.cpp.

void ATSCStreamData::RemoveATSCMainListener ( ATSCMainStreamListener val  ) 

Definition at line 790 of file atscstreamdata.cpp.

Referenced by DTVSignalMonitor::SetStreamData().

void ATSCStreamData::RemoveATSCAuxListener ( ATSCAuxStreamListener val  ) 

Definition at line 817 of file atscstreamdata.cpp.

Referenced by DTVSignalMonitor::SetStreamData().

void ATSCStreamData::RemoveATSCEITListener ( ATSCEITStreamListener val  ) 

Definition at line 844 of file atscstreamdata.cpp.

void ATSCStreamData::ProcessMGT ( const MasterGuideTable mgt  )  [private]

Definition at line 431 of file atscstreamdata.cpp.

Referenced by HandleTables(), and SetDesiredChannel().

void ATSCStreamData::ProcessVCT ( uint  tsid,
const VirtualChannelTable vct 
) [private]

Definition at line 460 of file atscstreamdata.cpp.

Referenced by ProcessCVCT(), and ProcessTVCT().

void ATSCStreamData::ProcessTVCT ( uint  tsid,
const TerrestrialVirtualChannelTable vct 
) [private]

Definition at line 495 of file atscstreamdata.cpp.

Referenced by HandleTables(), and SetDesiredChannel().

void ATSCStreamData::ProcessCVCT ( uint  tsid,
const CableVirtualChannelTable vct 
) [private]

Definition at line 504 of file atscstreamdata.cpp.

Referenced by HandleTables(), and SetDesiredChannel().

void ATSCStreamData::CacheMGT ( MasterGuideTable mgt  )  [private]

Definition at line 700 of file atscstreamdata.cpp.

Referenced by HandleTables().

void ATSCStreamData::CacheTVCT ( uint  pid,
TerrestrialVirtualChannelTable tvct 
) [private]

Definition at line 708 of file atscstreamdata.cpp.

Referenced by HandleTables().

void ATSCStreamData::CacheCVCT ( uint  pid,
CableVirtualChannelTable cvct 
) [private]

Definition at line 716 of file atscstreamdata.cpp.

Referenced by HandleTables().

void ATSCStreamData::DeleteCachedTable ( PSIPTable psip  )  const [protected, virtual]

Reimplemented from MPEGStreamData.

Reimplemented in ScanStreamData.

Definition at line 724 of file atscstreamdata.cpp.

Referenced by CacheCVCT(), CacheMGT(), CacheTVCT(), ScanStreamData::DeleteCachedTable(), and Reset().


Member Data Documentation

Definition at line 120 of file atscstreamdata.h.

Referenced by GPSOffset(), and HandleTables().

Definition at line 121 of file atscstreamdata.h.

Referenced by GetEITPIDChanges(), HasEITPIDChanges(), and ProcessMGT().

Definition at line 122 of file atscstreamdata.h.

Referenced by GetEITPIDChanges(), HasEITPIDChanges(), ProcessMGT(), and Reset().

Definition at line 123 of file atscstreamdata.h.

Referenced by GetEITPIDChanges(), HasEITPIDChanges(), ProcessMGT(), and Reset().

Definition at line 125 of file atscstreamdata.h.

Referenced by GetATSCMajorMinor(), HasATSCMajorMinorMap(), ProcessVCT(), and Reset().

Definition at line 134 of file atscstreamdata.h.

Referenced by Reset(), SetVersionMGT(), and VersionMGT().

QMap<uint, int> ATSCStreamData::_tvct_version [private]

Definition at line 135 of file atscstreamdata.h.

Referenced by Reset(), SetVersionTVCT(), and VersionTVCT().

QMap<uint, int> ATSCStreamData::_cvct_version [private]

Definition at line 136 of file atscstreamdata.h.

Referenced by Reset(), SetVersionCVCT(), and VersionCVCT().

QMap<uint, int> ATSCStreamData::_eit_version [private]

Definition at line 137 of file atscstreamdata.h.

Referenced by Reset(), SetVersionEIT(), and VersionEIT().

Definition at line 138 of file atscstreamdata.h.

Referenced by EITSectionSeen(), Reset(), SetEITSectionSeen(), and SetVersionEIT().

Definition at line 146 of file atscstreamdata.h.

Referenced by DesiredMajorChannel(), Reset(), and SetDesiredChannel().

Definition at line 147 of file atscstreamdata.h.

Referenced by DesiredMinorChannel(), Reset(), and SetDesiredChannel().


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

Generated on Sat Dec 18 05:15:59 2010 for MythTV by  doxygen 1.5.5