vdr 2.6.3
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
cSdtFilter Class Reference

#include <sdt.h>

Public Member Functions

 cSdtFilter (cPatFilter *PatFilter)
 
virtual void SetStatus (bool On)
 
void Trigger (int Source)
 
bool TransponderVerified (void) const
 
bool TransponderWrong (void) const
 
- Public Member Functions inherited from cListObject
 cListObject (void)
 
virtual ~cListObject ()
 
virtual int Compare (const cListObject &ListObject) const
 
void Append (cListObject *Object)
 
void Insert (cListObject *Object)
 
void Unlink (void)
 
int Index (void) const
 
cListObjectPrev (void) const
 
cListObjectNext (void) const
 

Protected Member Functions

virtual void Process (u_short Pid, u_char Tid, const u_char *Data, int Length)
 
- Protected Member Functions inherited from cFilter
 cFilter (void)
 
 cFilter (u_short Pid, u_char Tid, u_char Mask=0xFF)
 
virtual ~cFilter ()
 
virtual void SetStatus (bool On)
 
virtual void Process (u_short Pid, u_char Tid, const u_char *Data, int Length)=0
 
int Source (void)
 
int Transponder (void)
 
const cChannelChannel (void)
 
bool Matches (u_short Pid, u_char Tid)
 
void Set (u_short Pid, u_char Tid, u_char Mask=0xFF)
 
void Add (u_short Pid, u_char Tid, u_char Mask=0xFF, bool Sticky=false)
 
void Del (u_short Pid, u_char Tid, u_char Mask=0xFF)
 

Private Types

enum  eTransponderState { tsUnknown , tsWrong , tsAccepted , tsVerified }
 

Private Attributes

cMutex mutex
 
cSectionSyncer sectionSyncer
 
int source
 
int lastSource
 
int lastTransponder
 
int lastNid
 
int lastTid
 
cPatFilterpatFilter
 
enum eTransponderState transponderState
 

Detailed Description

Definition at line 16 of file sdt.h.

Member Enumeration Documentation

◆ eTransponderState

Enumerator
tsUnknown 
tsWrong 
tsAccepted 
tsVerified 

Definition at line 18 of file sdt.h.

Constructor & Destructor Documentation

◆ cSdtFilter()

cSdtFilter::cSdtFilter ( cPatFilter PatFilter)

Member Function Documentation

◆ Process()

void cSdtFilter::Process ( u_short  Pid,
u_char  Tid,
const u_char *  Data,
int  Length 
)
protectedvirtual

Processes the data delivered to this filter.

Pid and Tid is one of the combinations added to this filter by a previous call to Add(), Data is a pointer to Length bytes of data. This function will be called from the section handler's thread, so it has to use proper locking mechanisms in case it accesses any global data. It is guaranteed that if several cFilters are attached to the same cSectionHandler, only one of them has its Process() function called at any given time. It is allowed that more than one cFilter are set up to receive the same Pid/Tid. The Process() function must return as soon as possible.

Implements cFilter.

Definition at line 51 of file sdt.c.

References cListBase::Add(), cFilter::Channel(), cSectionSyncer::Check(), SI::CRCSection::CheckCRCAndParse(), compactspace(), dbgsdt, dsyslog, cChannels::GetByChannelID(), cChannels::GetChannelsWrite(), SI::Descriptor::getDescriptorTag(), SI::NumberedSection::getLastSectionNumber(), SI::DescriptorLoop::getNext(), SI::NVODReferenceDescriptor::Service::getOriginalNetworkId(), SI::SDT::getOriginalNetworkId(), SI::NumberedSection::getSectionNumber(), SI::NVODReferenceDescriptor::Service::getServiceId(), SI::SDT::Service::getServiceId(), SI::ServiceDescriptor::getServiceType(), SI::String::getText(), SI::NVODReferenceDescriptor::Service::getTransportStream(), SI::SDT::getTransportStreamId(), SI::NumberedSection::getVersionNumber(), cSource::IsCable(), ISTRANSPONDER, lastNid, lastSource, lastTid, lastTransponder, cChannels::MarkObsoleteChannels(), mutex, cChannels::NewChannel(), SI::NVODReferenceDescriptorTag, patFilter, cSectionSyncer::Processed(), SI::ServiceDescriptor::providerName, cStateKey::Remove(), sectionSyncer, SI::SDT::Service::serviceDescriptors, SI::ServiceDescriptorTag, SI::NVODReferenceDescriptor::serviceLoop, SI::SDT::serviceLoop, SI::ServiceDescriptor::serviceName, cChannel::SetId(), cChannel::SetLinkChannels(), cChannel::SetName(), cChannel::SetSeen(), cChannel::SetSource(), Setup, skipspace(), cFilter::Source(), source, cSource::ToString(), cFilter::Transponder(), transponderState, cPatFilter::Trigger(), tsAccepted, tsUnknown, tsVerified, tsWrong, cSetup::UpdateChannels, and Utf8BufSize.

◆ SetStatus()

void cSdtFilter::SetStatus ( bool  On)
virtual

Turns this filter on or off, depending on the value of On.

If the filter is turned off, any filter data that has been added without the Sticky parameter set to 'true' will be automatically deleted. Those parameters that have been added with Sticky set to 'true' will be automatically reused when SetStatus(true) is called.

Reimplemented from cFilter.

Definition at line 35 of file sdt.c.

References mutex, cSectionSyncer::Reset(), sectionSyncer, cFilter::SetStatus(), source, cSource::stNone, transponderState, and tsUnknown.

◆ TransponderVerified()

bool cSdtFilter::TransponderVerified ( void  ) const
inline

Definition at line 34 of file sdt.h.

References transponderState, and tsVerified.

◆ TransponderWrong()

bool cSdtFilter::TransponderWrong ( void  ) const
inline

Definition at line 35 of file sdt.h.

References transponderState, and tsWrong.

Referenced by cDvbTuner::Action().

◆ Trigger()

void cSdtFilter::Trigger ( int  Source)

Definition at line 45 of file sdt.c.

References mutex, cFilter::Source(), and source.

Referenced by cNitFilter::Process().

Member Data Documentation

◆ lastNid

int cSdtFilter::lastNid
private

Definition at line 24 of file sdt.h.

Referenced by cSdtFilter(), and Process().

◆ lastSource

int cSdtFilter::lastSource
private

Definition at line 22 of file sdt.h.

Referenced by cSdtFilter(), and Process().

◆ lastTid

int cSdtFilter::lastTid
private

Definition at line 25 of file sdt.h.

Referenced by cSdtFilter(), and Process().

◆ lastTransponder

int cSdtFilter::lastTransponder
private

Definition at line 23 of file sdt.h.

Referenced by cSdtFilter(), and Process().

◆ mutex

cMutex cSdtFilter::mutex
private

Definition at line 19 of file sdt.h.

Referenced by Process(), SetStatus(), and Trigger().

◆ patFilter

cPatFilter* cSdtFilter::patFilter
private

Definition at line 26 of file sdt.h.

Referenced by cSdtFilter(), and Process().

◆ sectionSyncer

cSectionSyncer cSdtFilter::sectionSyncer
private

Definition at line 20 of file sdt.h.

Referenced by Process(), and SetStatus().

◆ source

int cSdtFilter::source
private

Definition at line 21 of file sdt.h.

Referenced by cSdtFilter(), Process(), SetStatus(), and Trigger().

◆ transponderState

enum eTransponderState cSdtFilter::transponderState
private

Definition at line 27 of file sdt.h.

Referenced by cSdtFilter(), Process(), SetStatus(), TransponderVerified(), and TransponderWrong().


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