vdr 2.7.3
cPatFilter Class Reference

#include <pat.h>

Public Member Functions

 cPatFilter (void)
 
virtual void SetStatus (bool On)
 
void Trigger (int=0)
 
void Request (int Sid)
 
void Release (int Sid)
 
- 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 Member Functions

bool TransponderChanged (void)
 
bool PmtPidComplete (int PmtPid)
 
void PmtPidReset (int PmtPid)
 
bool PmtVersionChanged (int PmtPid, int Sid, int Version, bool SetNewVersion=false)
 
int NumSidRequests (int Sid)
 
void SwitchToNextPmtPid (void)
 

Private Attributes

cMutex mutex
 
cTimeMs timer
 
int patVersion
 
cPmtPidEntryactivePmt
 
cList< cPmtPidEntrypmtPidList
 
cList< cPmtSidEntrypmtSidList
 
cList< cPmtSidRequestpmtSidRequestList
 
int source
 
int transponder
 
cSectionSyncer sectionSyncer
 

Detailed Description

Definition at line 21 of file pat.h.

Constructor & Destructor Documentation

◆ cPatFilter()

cPatFilter::cPatFilter ( void )

Definition at line 365 of file pat.c.

References activePmt, patVersion, cFilter::Set(), source, and transponder.

Member Function Documentation

◆ NumSidRequests()

int cPatFilter::NumSidRequests ( int Sid)
private

Definition at line 455 of file pat.c.

References cList< T >::First(), cList< T >::Next(), and pmtSidRequestList.

Referenced by PmtVersionChanged(), and Process().

◆ PmtPidComplete()

bool cPatFilter::PmtPidComplete ( int PmtPid)
private

Definition at line 464 of file pat.c.

References cList< T >::First(), cList< T >::Next(), and pmtSidList.

Referenced by PmtVersionChanged().

◆ PmtPidReset()

void cPatFilter::PmtPidReset ( int PmtPid)
private

Definition at line 473 of file pat.c.

References cList< T >::First(), cList< T >::Next(), and pmtSidList.

Referenced by SwitchToNextPmtPid().

◆ PmtVersionChanged()

bool cPatFilter::PmtVersionChanged ( int PmtPid,
int Sid,
int Version,
bool SetNewVersion = false )
private

◆ Process()

void cPatFilter::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 522 of file pat.c.

References SI::AC3DescriptorTag, activePmt, cFilter::Add(), cListBase::Add(), cCaDescriptors::AddCaDescriptor(), cCaDescriptorHandler::AddCaDescriptors(), SI::PAT::associationLoop, CaDescriptorHandler, SI::CaDescriptorTag, cCaDescriptors::CaIds(), cFilter::Channel(), cSectionSyncer::Check(), SI::CRCSection::CheckCRCAndParse(), cListBase::Clear(), cChannel::ClearObsoleteChannel(), SI::PMT::commonDescriptors, cPmtPidEntry::Complete(), DBGLOG, cFilter::Del(), SI::EnhancedAC3DescriptorTag, cList< T >::First(), SI::SubtitlingDescriptor::Subtitling::getAncillaryPageId(), cChannels::GetByServiceID(), cChannels::GetChannelsWrite(), SI::SubtitlingDescriptor::Subtitling::getCompositionPageId(), SI::Descriptor::getDescriptorTag(), SI::RegistrationDescriptor::getFormatIdentifier(), SI::NumberedSection::getLastSectionNumber(), SI::DescriptorLoop::getNext(), SI::PMT::getPCRPid(), SI::PAT::Association::getPid(), SI::PMT::Stream::getPid(), SI::NumberedSection::getSectionNumber(), SI::PAT::Association::getServiceId(), SI::PMT::getServiceId(), SI::PMT::Stream::getStreamType(), SI::SubtitlingDescriptor::Subtitling::getSubtitlingType(), SI::NumberedSection::getTableIdExtension(), SI::NumberedSection::getVersionNumber(), I18nNormalizeLanguageCode(), cPmtPidEntry::Inc(), SI::PAT::Association::isNITPid(), SI::ISO639LanguageDescriptorTag, SI::ISO639LanguageDescriptor::Language::languageCode, SI::ISO639LanguageDescriptor::languageCode, SI::SubtitlingDescriptor::Subtitling::languageCode, SI::ISO639LanguageDescriptor::languageLoop, MAXAPIDS, MAXDPIDS, MAXLANGCODE1, MAXLANGCODE2, MAXSPIDS, mutex, cList< T >::Next(), NumSidRequests(), patVersion, cPmtPidEntry::Pid(), PMT_SCAN_TIMEOUT, pmtPidList, pmtSidList, PmtVersionChanged(), cSectionSyncer::Processed(), SI::RegistrationDescriptorTag, cStateKey::Remove(), cSectionSyncer::Reset(), sectionSyncer, cTimeMs::Set(), cChannel::SetCaDescriptors(), cChannel::SetCaIds(), cChannel::SetPids(), cChannel::SetSeen(), SetStatus(), cChannel::SetSubtitlingDescriptors(), Setup, cChannel::Sid(), cChannel::Source(), cFilter::Source(), STANDARD_ANSISCTE, cSetup::StandardCompliance, SI::PMT::Stream::streamDescriptors, SI::PMT::streamLoop, strn0cpy(), SI::SubtitlingDescriptorTag, SI::SubtitlingDescriptor::subtitlingLoop, SwitchToNextPmtPid(), SI::TableIdPAT, SI::TableIdPMT, SI::TeletextDescriptorTag, cTimeMs::TimedOut(), timer, cChannel::Transponder(), cFilter::Transponder(), TransponderChanged(), and cSetup::UpdateChannels.

◆ Release()

◆ Request()

◆ SetStatus()

void cPatFilter::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 374 of file pat.c.

References activePmt, cPmtPidEntry::Count(), DBGLOG, cList< T >::First(), mutex, cList< T >::Next(), PMT_SCAN_TIMEOUT, pmtPidList, cTimeMs::Set(), cPmtPidEntry::SetState(), cFilter::SetStatus(), and timer.

Referenced by Process().

◆ SwitchToNextPmtPid()

void cPatFilter::SwitchToNextPmtPid ( void )
private

◆ TransponderChanged()

bool cPatFilter::TransponderChanged ( void )
private

Definition at line 389 of file pat.c.

References DBGLOG, cFilter::Source(), source, cFilter::Transponder(), and transponder.

Referenced by Process().

◆ Trigger()

void cPatFilter::Trigger ( int = 0)

Definition at line 400 of file pat.c.

References DBGLOG, mutex, patVersion, cSectionSyncer::Reset(), and sectionSyncer.

Referenced by cSdtFilter::Process().

Member Data Documentation

◆ activePmt

cPmtPidEntry* cPatFilter::activePmt
private

Definition at line 26 of file pat.h.

Referenced by cPatFilter(), Process(), SetStatus(), and SwitchToNextPmtPid().

◆ mutex

cMutex cPatFilter::mutex
private

Definition at line 23 of file pat.h.

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

◆ patVersion

int cPatFilter::patVersion
private

Definition at line 25 of file pat.h.

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

◆ pmtPidList

cList<cPmtPidEntry> cPatFilter::pmtPidList
private

Definition at line 27 of file pat.h.

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

◆ pmtSidList

cList<cPmtSidEntry> cPatFilter::pmtSidList
private

Definition at line 28 of file pat.h.

Referenced by PmtPidComplete(), PmtPidReset(), PmtVersionChanged(), Process(), Release(), and Request().

◆ pmtSidRequestList

cList<cPmtSidRequest> cPatFilter::pmtSidRequestList
private

Definition at line 29 of file pat.h.

Referenced by NumSidRequests(), Release(), and Request().

◆ sectionSyncer

cSectionSyncer cPatFilter::sectionSyncer
private

Definition at line 32 of file pat.h.

Referenced by Process(), and Trigger().

◆ source

int cPatFilter::source
private

Definition at line 30 of file pat.h.

Referenced by cPatFilter(), and TransponderChanged().

◆ timer

cTimeMs cPatFilter::timer
private

Definition at line 24 of file pat.h.

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

◆ transponder

int cPatFilter::transponder
private

Definition at line 31 of file pat.h.

Referenced by cPatFilter(), and TransponderChanged().


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