vdr  2.2.0
Public Member Functions | Protected Member Functions | 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)
 
- 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 ()
 
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 Attributes

cMutex mutex
 
cSectionSyncer sectionSyncer
 
int source
 
cPatFilterpatFilter
 

Detailed Description

Definition at line 16 of file sdt.h.

Constructor & Destructor Documentation

cSdtFilter::cSdtFilter ( cPatFilter PatFilter)

Definition at line 18 of file sdt.c.

References patFilter, cFilter::Set(), source, and cSource::stNone.

Member Function Documentation

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 40 of file sdt.c.

References cListBase::Add(), cFilter::Channel(), Channels, SI::CRCSection::CheckCRCAndParse(), compactspace(), cChannels::GetByChannelID(), SI::Descriptor::getDescriptorTag(), SI::NumberedSection::getLastSectionNumber(), SI::DescriptorLoop::getNext(), SI::SDT::getOriginalNetworkId(), SI::NVODReferenceDescriptor::Service::getOriginalNetworkId(), SI::NumberedSection::getSectionNumber(), SI::SDT::Service::getServiceId(), SI::NVODReferenceDescriptor::Service::getServiceId(), SI::ServiceDescriptor::getServiceType(), SI::String::getText(), SI::NVODReferenceDescriptor::Service::getTransportStream(), SI::SDT::getTransportStreamId(), SI::NumberedSection::getVersionNumber(), cSource::IsCable(), cRwLock::Lock(), cChannels::MarkObsoleteChannels(), mutex, cChannels::NewChannel(), SI::NVODReferenceDescriptorTag, patFilter, SI::ServiceDescriptor::providerName, sectionSyncer, SI::SDT::Service::serviceDescriptors, SI::ServiceDescriptorTag, SI::SDT::serviceLoop, SI::NVODReferenceDescriptor::serviceLoop, SI::ServiceDescriptor::serviceName, cChannel::SetId(), cChannel::SetLinkChannels(), cChannel::SetName(), cChannel::SetSeen(), Setup, skipspace(), source, cFilter::Source(), cSectionSyncer::Sync(), cFilter::Transponder(), cPatFilter::Trigger(), cRwLock::Unlock(), cSetup::UpdateChannels, and Utf8BufSize.

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 25 of file sdt.c.

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

void cSdtFilter::Trigger ( int  Source)

Definition at line 34 of file sdt.c.

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

Referenced by cNitFilter::Process().

Member Data Documentation

cMutex cSdtFilter::mutex
private

Definition at line 18 of file sdt.h.

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

cPatFilter* cSdtFilter::patFilter
private

Definition at line 21 of file sdt.h.

Referenced by cSdtFilter(), and Process().

cSectionSyncer cSdtFilter::sectionSyncer
private

Definition at line 19 of file sdt.h.

Referenced by Process(), and SetStatus().

int cSdtFilter::source
private

Definition at line 20 of file sdt.h.

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


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