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 <eithelper.h>

Collaboration diagram for EITHelper:
Collaboration graph
[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 atsc_major, uint atsc_minor, const EventInformationTable *eit)
 
void AddETT (uint atsc_major, uint atsc_minor, const ExtendedTextTable *ett)
 
void AddEIT (const DVBEventInformationTable *eit)
 
void AddEIT (const PremiereContentInformationTable *cit)
 

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}
 
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 kChunkSize = 20
 
static const uint kMaxSize = 1000
 

Detailed Description

Definition at line 93 of file eithelper.h.

Constructor & Destructor Documentation

◆ EITHelper() [1/2]

EITHelper::EITHelper ( uint  cardnum)
explicit

Definition at line 39 of file eithelper.cpp.

◆ EITHelper() [2/2]

EITHelper::EITHelper ( const EITHelper rhs)

◆ ~EITHelper()

EITHelper::~EITHelper ( void  )
virtual

Definition at line 45 of file eithelper.cpp.

Member Function Documentation

◆ operator=()

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

◆ GetListSize()

uint EITHelper::GetListSize ( void  ) const

Definition at line 52 of file eithelper.cpp.

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

◆ 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 73 of file eithelper.cpp.

Referenced by EITScanner::run().

◆ EventQueueFull()

bool EITHelper::EventQueueFull ( void  ) const

Definition at line 58 of file eithelper.cpp.

Referenced by AddEIT(), and CompleteEvent().

◆ GetGPSOffset()

uint EITHelper::GetGPSOffset ( void  ) const
inline

Definition at line 105 of file eithelper.h.

Referenced by ATSCStreamData::HandleTables().

◆ SetChannelID()

void EITHelper::SetChannelID ( uint  channelid)

◆ SetGPSOffset()

void EITHelper::SetGPSOffset ( uint  gps_offset)
inline

Definition at line 108 of file eithelper.h.

Referenced by ATSCStreamData::HandleTables().

◆ SetFixup()

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

Definition at line 115 of file eithelper.cpp.

◆ SetLanguagePreferences()

void EITHelper::SetLanguagePreferences ( const QStringList &  langPref)

Definition at line 122 of file eithelper.cpp.

Referenced by EITScanner::EITScanner().

◆ SetSourceID()

void EITHelper::SetSourceID ( uint  sourceid)

Definition at line 139 of file eithelper.cpp.

Referenced by EITScanner::StartPassiveScan(), and EITScanner::StopPassiveScan().

◆ RescheduleRecordings()

void EITHelper::RescheduleRecordings ( void  )

Tells scheduler about programming changes.

Definition at line 1407 of file eithelper.cpp.

Referenced by EITScanner::RescheduleRecordings().

◆ AddEIT() [1/3]

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

Definition at line 151 of file eithelper.cpp.

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

◆ AddETT()

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

Definition at line 190 of file eithelper.cpp.

Referenced by ATSCStreamData::HandleTables().

◆ AddEIT() [2/3]

void EITHelper::AddEIT ( const DVBEventInformationTable eit)

Definition at line 320 of file eithelper.cpp.

◆ AddEIT() [3/3]

void EITHelper::AddEIT ( const PremiereContentInformationTable cit)

Definition at line 636 of file eithelper.cpp.

◆ PruneEITCache()

void EITHelper::PruneEITCache ( uint  timestamp)
static

Definition at line 757 of file eithelper.cpp.

Referenced by EITScanner::run().

◆ WriteEITCache()

void EITHelper::WriteEITCache ( void  )
static

Definition at line 762 of file eithelper.cpp.

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

◆ GetChanID() [1/3]

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

Definition at line 809 of file eithelper.cpp.

Referenced by AddEIT(), and CompleteEvent().

◆ GetChanID() [2/3]

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

Definition at line 829 of file eithelper.cpp.

◆ GetChanID() [3/3]

uint EITHelper::GetChanID ( uint  program_number)
private

Definition at line 850 of file eithelper.cpp.

◆ CompleteEvent()

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

Definition at line 771 of file eithelper.cpp.

Referenced by AddEIT(), and AddETT().

Member Data Documentation

◆ m_eitListLock

QMutex EITHelper::m_eitListLock
mutableprivate

◆ 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 AddEIT(), PruneEITCache(), and WriteEITCache().

◆ 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_cardnum

uint EITHelper::m_cardnum {0}
private

Definition at line 149 of file eithelper.h.

◆ m_sourceid

uint EITHelper::m_sourceid {0}
private

Definition at line 150 of file eithelper.h.

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

◆ m_channelid

uint EITHelper::m_channelid {0}
private

Definition at line 151 of file eithelper.h.

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

◆ m_maxStarttime

QDateTime EITHelper::m_maxStarttime
private

Definition at line 152 of file eithelper.h.

Referenced by ProcessEvents(), and RescheduleRecordings().

◆ m_seenEITother

bool EITHelper::m_seenEITother {false}
private

Definition at line 153 of file eithelper.h.

Referenced by AddEIT(), and RescheduleRecordings().

◆ m_fixup

FixupMap EITHelper::m_fixup
private

Definition at line 155 of file eithelper.h.

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

◆ m_incompleteEvents

ATSCSRCToEvents EITHelper::m_incompleteEvents
private

Definition at line 156 of file eithelper.h.

Referenced by AddEIT(), AddETT(), and ProcessEvents().

◆ m_dbEvents

MythDeque<DBEventEIT*> EITHelper::m_dbEvents
private

Definition at line 158 of file eithelper.h.

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

◆ m_languagePreferences

QMap<uint,uint> EITHelper::m_languagePreferences
private

Definition at line 160 of file eithelper.h.

Referenced by AddEIT(), AddETT(), and SetLanguagePreferences().

◆ kChunkSize

const uint EITHelper::kChunkSize = 20
staticprivate

Definition at line 162 of file eithelper.h.

Referenced by ProcessEvents().

◆ kMaxSize

const uint EITHelper::kMaxSize = 1000
staticprivate

Definition at line 163 of file eithelper.h.

Referenced by EventQueueFull().


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