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

#include <libmythtv/eithelper.h>

Collaboration diagram for EITHelper:
[legend]

Public Member Functions

 EITHelper (uint cardnum)
 
EITHelperoperator= (const EITHelper &)=delete
 
 EITHelper (const EITHelper &rhs)
 
virtual ~EITHelper (void)
 
uint GetListSize (void) const
 
uint ProcessEvents (void)
 Get events from queue and insert into DB after processing. More...
 
bool EventQueueFull (void) const
 
uint GetGPSOffset (void) const
 
void SetChannelID (uint channelid)
 
void SetGPSOffset (uint gps_offset)
 
void SetFixup (uint atsc_major, uint atsc_minor, FixupValue eitfixup)
 
void SetLanguagePreferences (const QStringList &langPref)
 
void SetSourceID (uint sourceid)
 
void RescheduleRecordings (void)
 Tells scheduler about programming changes. More...
 
void AddEIT (uint, uint, const EventInformationTable *)
 
void AddETT (uint, uint, const ExtendedTextTable *)
 
void AddEIT (const DVBEventInformationTable *)
 
void AddEIT (const PremiereContentInformationTable *)
 

Static Public Member Functions

static void PruneEITCache (uint timestamp)
 
static void WriteEITCache (void)
 

Private Member Functions

uint GetChanID (uint atsc_major, uint atsc_minor)
 
uint GetChanID (uint serviceid, uint networkid, uint tsid)
 
uint GetChanID (uint program_number)
 
void CompleteEvent (uint atsc_major, uint atsc_minor, const ATSCEvent &event, const QString &ett)
 

Private Attributes

QMutex m_eitListLock
 
ServiceToChanID m_srvToChanid
 
int m_gpsOffset {-1 * GPS_LEAP_SECONDS}
 
uint m_cardnum {0}
 
uint m_sourceid {0}
 
uint m_channelid {0}
 
QDateTime m_maxStarttime
 
bool m_seenEITother {false}
 
uint m_chunkSize {20}
 
uint m_queueSize {1000}
 
FixupMap m_fixup
 
ATSCSRCToEvents m_incompleteEvents
 
MythDeque< DBEventEIT * > m_dbEvents
 
QMap< uint, uintm_languagePreferences
 

Static Private Attributes

static EITCaches_eitCache = new EITCache()
 
static const uint kMaxQueueSize = 10000
 

Detailed Description

Definition at line 93 of file eithelper.h.

Constructor & Destructor Documentation

◆ EITHelper() [1/2]

EITHelper::EITHelper ( uint  cardnum)
explicit

Definition at line 40 of file eithelper.cpp.

◆ EITHelper() [2/2]

EITHelper::EITHelper ( const EITHelper rhs)

◆ ~EITHelper()

EITHelper::~EITHelper ( void  )
virtual

Definition at line 59 of file eithelper.cpp.

Member Function Documentation

◆ AddEIT() [1/3]

void EITHelper::AddEIT ( const DVBEventInformationTable eit)
inline

Definition at line 124 of file eithelper.h.

◆ AddEIT() [2/3]

void EITHelper::AddEIT ( const PremiereContentInformationTable cit)
inline

Definition at line 125 of file eithelper.h.

◆ AddEIT() [3/3]

void EITHelper::AddEIT ( uint  atsc_major,
uint  atsc_minor,
const EventInformationTable eit 
)
inline

Definition at line 122 of file eithelper.h.

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

◆ AddETT()

void EITHelper::AddETT ( uint  atsc_major,
uint  atsc_minor,
const ExtendedTextTable ett 
)
inline

Definition at line 123 of file eithelper.h.

Referenced by ATSCStreamData::HandleTables().

◆ CompleteEvent()

void EITHelper::CompleteEvent ( uint  atsc_major,
uint  atsc_minor,
const ATSCEvent event,
const QString &  ett 
)
private

Definition at line 794 of file eithelper.cpp.

◆ EventQueueFull()

bool EITHelper::EventQueueFull ( void  ) const

Definition at line 72 of file eithelper.cpp.

Referenced by CompleteEvent().

◆ GetChanID() [1/3]

uint EITHelper::GetChanID ( uint  atsc_major,
uint  atsc_minor 
)
private

Definition at line 832 of file eithelper.cpp.

Referenced by CompleteEvent().

◆ GetChanID() [2/3]

uint EITHelper::GetChanID ( uint  program_number)
private

Definition at line 873 of file eithelper.cpp.

◆ GetChanID() [3/3]

uint EITHelper::GetChanID ( uint  serviceid,
uint  networkid,
uint  tsid 
)
private

Definition at line 852 of file eithelper.cpp.

◆ GetGPSOffset()

uint EITHelper::GetGPSOffset ( void  ) const
inline

Definition at line 105 of file eithelper.h.

Referenced by ATSCStreamData::HandleTables().

◆ GetListSize()

uint EITHelper::GetListSize ( void  ) const

Definition at line 66 of file eithelper.cpp.

Referenced by EventQueueFull(), and EITScanner::run().

◆ operator=()

EITHelper & EITHelper::operator= ( const EITHelper )
delete

◆ ProcessEvents()

uint EITHelper::ProcessEvents ( void  )

Get events from queue and insert into DB after processing.

Process a maximum of kChunkSize events at a time to avoid clogging the machine.

Returns
Returns number of events inserted into DB.

Definition at line 87 of file eithelper.cpp.

Referenced by EITScanner::run().

◆ PruneEITCache()

void EITHelper::PruneEITCache ( uint  timestamp)
static

Definition at line 780 of file eithelper.cpp.

Referenced by EITScanner::run().

◆ RescheduleRecordings()

void EITHelper::RescheduleRecordings ( void  )

Tells scheduler about programming changes.

Definition at line 1365 of file eithelper.cpp.

Referenced by EITScanner::RescheduleRecordings().

◆ SetChannelID()

void EITHelper::SetChannelID ( uint  channelid)

◆ SetFixup()

void EITHelper::SetFixup ( uint  atsc_major,
uint  atsc_minor,
FixupValue  eitfixup 
)

Definition at line 132 of file eithelper.cpp.

◆ SetGPSOffset()

void EITHelper::SetGPSOffset ( uint  gps_offset)
inline

Definition at line 108 of file eithelper.h.

Referenced by ATSCStreamData::HandleTables().

◆ SetLanguagePreferences()

void EITHelper::SetLanguagePreferences ( const QStringList &  langPref)

Definition at line 139 of file eithelper.cpp.

Referenced by EITScanner::EITScanner().

◆ SetSourceID()

void EITHelper::SetSourceID ( uint  sourceid)

◆ WriteEITCache()

void EITHelper::WriteEITCache ( void  )
static

Definition at line 785 of file eithelper.cpp.

Referenced by EITScanner::run(), and EITScanner::StopEITEventProcessing().

Member Data Documentation

◆ kMaxQueueSize

const uint EITHelper::kMaxQueueSize = 10000
staticprivate

Definition at line 164 of file eithelper.h.

Referenced by EITHelper().

◆ m_cardnum

uint EITHelper::m_cardnum {0}
private

Definition at line 149 of file eithelper.h.

◆ m_channelid

uint EITHelper::m_channelid {0}
private

Definition at line 151 of file eithelper.h.

Referenced by GetChanID(), RescheduleRecordings(), and SetChannelID().

◆ m_chunkSize

uint EITHelper::m_chunkSize {20}
private

Definition at line 154 of file eithelper.h.

Referenced by EITHelper(), and ProcessEvents().

◆ m_dbEvents

MythDeque<DBEventEIT*> EITHelper::m_dbEvents
private

Definition at line 160 of file eithelper.h.

Referenced by CompleteEvent(), GetListSize(), ProcessEvents(), and ~EITHelper().

◆ m_eitListLock

QMutex EITHelper::m_eitListLock
mutableprivate

◆ m_fixup

FixupMap EITHelper::m_fixup
private

Definition at line 157 of file eithelper.h.

Referenced by CompleteEvent(), EITHelper(), and SetFixup().

◆ m_gpsOffset

int EITHelper::m_gpsOffset {-1 * GPS_LEAP_SECONDS}
private

Definition at line 146 of file eithelper.h.

Referenced by CompleteEvent(), GetGPSOffset(), and SetGPSOffset().

◆ m_incompleteEvents

ATSCSRCToEvents EITHelper::m_incompleteEvents
private

Definition at line 158 of file eithelper.h.

Referenced by ProcessEvents().

◆ m_languagePreferences

QMap<uint,uint> EITHelper::m_languagePreferences
private

Definition at line 162 of file eithelper.h.

Referenced by SetLanguagePreferences().

◆ m_maxStarttime

QDateTime EITHelper::m_maxStarttime
private

Definition at line 152 of file eithelper.h.

Referenced by ProcessEvents(), and RescheduleRecordings().

◆ m_queueSize

uint EITHelper::m_queueSize {1000}
private

Definition at line 155 of file eithelper.h.

Referenced by EITHelper(), and EventQueueFull().

◆ m_seenEITother

bool EITHelper::m_seenEITother {false}
private

Definition at line 153 of file eithelper.h.

Referenced by RescheduleRecordings().

◆ m_sourceid

uint EITHelper::m_sourceid {0}
private

Definition at line 150 of file eithelper.h.

Referenced by GetChanID(), RescheduleRecordings(), and SetSourceID().

◆ m_srvToChanid

ServiceToChanID EITHelper::m_srvToChanid
mutableprivate

Definition at line 142 of file eithelper.h.

Referenced by GetChanID().

◆ s_eitCache

EITCache * EITHelper::s_eitCache = new EITCache()
staticprivate

Definition at line 144 of file eithelper.h.

Referenced by EITHelper(), PruneEITCache(), and WriteEITCache().


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