vdr  2.2.0
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
cPatFilter Class Reference

#include <pat.h>

Public Member Functions

 cPatFilter (void)
 
virtual void SetStatus (bool On)
 
void Trigger (int Sid=-1)
 
- 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

int GetPmtPid (int Index)
 
int MakePmtId (int PmtPid, int Sid)
 
bool PmtVersionChanged (int PmtPid, int Sid, int Version, bool SetNewVersion=false)
 
void SwitchToNextPmtPid (void)
 

Private Attributes

cMutex mutex
 
cTimeMs timer
 
int patVersion
 
int pmtIndex
 
int pmtId [MAXPMTENTRIES]
 
int pmtVersion [MAXPMTENTRIES]
 
int numPmtEntries
 
int sid
 

Detailed Description

Definition at line 19 of file pat.h.

Constructor & Destructor Documentation

cPatFilter::cPatFilter ( void  )

Definition at line 302 of file pat.c.

Referenced by MakePmtId().

Member Function Documentation

int cPatFilter::GetPmtPid ( int  Index)
inlineprivate

Definition at line 29 of file pat.h.

References cListObject::Index().

Referenced by MakePmtId().

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

Definition at line 328 of file pat.c.

References DBGLOG.

Referenced by MakePmtId().

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 355 of file pat.c.

References SI::AC3DescriptorTag, cCaDescriptors::AddCaDescriptor(), cCaDescriptorHandler::AddCaDescriptors(), SI::PAT::associationLoop, SI::CaDescriptorTag, cCaDescriptors::CaIds(), Channels, SI::CRCSection::CheckCRCAndParse(), SI::PMT::commonDescriptors, DBGLOG, SI::EnhancedAC3DescriptorTag, cCaDescriptor::esPid, SI::SubtitlingDescriptor::Subtitling::getAncillaryPageId(), cChannels::GetByServiceID(), SI::SubtitlingDescriptor::Subtitling::getCompositionPageId(), SI::Descriptor::getDescriptorTag(), SI::RegistrationDescriptor::getFormatIdentifier(), SI::DescriptorLoop::getNext(), SI::PMT::getPCRPid(), SI::PAT::Association::getPid(), SI::PMT::Stream::getPid(), GetPmtPid(), SI::PAT::Association::getServiceId(), SI::PMT::getServiceId(), SI::PMT::Stream::getStreamType(), SI::SubtitlingDescriptor::Subtitling::getSubtitlingType(), SI::NumberedSection::getTableIdExtension(), SI::TeletextDescriptor::Teletext::getTeletextMagazineNumber(), SI::TeletextDescriptor::Teletext::getTeletextPageNumber(), SI::TeletextDescriptor::Teletext::getTeletextType(), SI::NumberedSection::getVersionNumber(), cVDRTtxtsubsHookListener::Hook(), I18nNormalizeLanguageCode(), SI::PAT::Association::isNITPid(), SI::ISO639LanguageDescriptorTag, SI::TeletextDescriptor::Teletext::languageCode, SI::SubtitlingDescriptor::Subtitling::languageCode, SI::ISO639LanguageDescriptor::languageCode, SI::ISO639LanguageDescriptor::Language::languageCode, SI::ISO639LanguageDescriptor::languageLoop, cRwLock::Lock(), cVDRTtxtsubsHookListener::ManualPageNumber(), MAXAPIDS, MAXDPIDS, MAXLANGCODE1, MAXLANGCODE2, MAXPMTENTRIES, MAXSPIDS, MAXTXTPAGES, PMT_SCAN_TIMEOUT, SI::RegistrationDescriptorTag, cChannel::SetCaDescriptors(), cChannel::SetCaIds(), cChannel::SetPids(), cChannel::SetSubtitlingDescriptors(), cChannel::SetTeletextSubtitlePages(), Setup, cChannel::Sid(), cChannel::Source(), STANDARD_ANSISCTE, cSetup::StandardCompliance, SI::PMT::Stream::streamDescriptors, SI::PMT::streamLoop, strn0cpy(), SI::SubtitlingDescriptorTag, SI::SubtitlingDescriptor::subtitlingLoop, SI::TableIdPAT, SI::TableIdPMT, SI::TeletextDescriptorTag, SI::TeletextDescriptor::teletextLoop, cChannel::Transponder(), tTeletextSubtitlePage::ttxtMagazine, tTeletextSubtitlePage::ttxtPage, tTeletextSubtitlePage::ttxtType, cRwLock::Unlock(), and cSetup::UpdateChannels.

Referenced by MakePmtId().

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 308 of file pat.c.

References DBGLOG, and cFilter::SetStatus().

Referenced by MakePmtId().

void cPatFilter::SwitchToNextPmtPid ( void  )
private

Definition at line 346 of file pat.c.

References GetPmtPid(), and SI::TableIdPMT.

Referenced by MakePmtId().

void cPatFilter::Trigger ( int  Sid = -1)

Definition at line 316 of file pat.c.

References DBGLOG.

Referenced by MakePmtId(), cSdtFilter::Process(), and cDevice::SetChannel().

Member Data Documentation

cMutex cPatFilter::mutex
private

Definition at line 21 of file pat.h.

int cPatFilter::numPmtEntries
private

Definition at line 27 of file pat.h.

int cPatFilter::patVersion
private

Definition at line 23 of file pat.h.

int cPatFilter::pmtId[MAXPMTENTRIES]
private

Definition at line 25 of file pat.h.

int cPatFilter::pmtIndex
private

Definition at line 24 of file pat.h.

int cPatFilter::pmtVersion[MAXPMTENTRIES]
private

Definition at line 26 of file pat.h.

int cPatFilter::sid
private

Definition at line 28 of file pat.h.

cTimeMs cPatFilter::timer
private

Definition at line 22 of file pat.h.


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