cReceiver Class Reference

#include <receiver.h>

Inheritance diagram for cReceiver:

Inheritance graph
[legend]
Collaboration diagram for cReceiver:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cReceiver (int Ca, int Priority, int Pid, const int *Pids1=NULL, const int *Pids2=NULL, const int *Pids3=NULL)
virtual ~cReceiver ()

Protected Member Functions

void Detach (void)
virtual void Activate (bool On)
virtual void Receive (uchar *Data, int Length)=0

Private Member Functions

bool WantsPid (int Pid)

Private Attributes

cDevicedevice
int ca
int priority
int pids [MAXRECEIVEPIDS]
int numPids

Friends

class cDevice


Detailed Description

Definition at line 17 of file receiver.h.


Constructor & Destructor Documentation

cReceiver::cReceiver ( int  Ca,
int  Priority,
int  Pid,
const int *  Pids1 = NULL,
const int *  Pids2 = NULL,
const int *  Pids3 = NULL 
)

Creates a new receiver that requires conditional access Ca and has the given Priority. Pid is a single PID (typically the video PID), while Pids1...Pids3 are pointers to zero terminated lists of PIDs. If any of these PIDs are 0, they will be silently ignored. The total number of non-zero PIDs must not exceed MAXRECEIVEPIDS. Priority may be any value in the range -99..99. Negative values indicate that this cReceiver may be detached at any time (without blocking the cDevice it is attached to).

Definition at line 15 of file receiver.c.

References ca, device, dsyslog, MAXRECEIVEPIDS, numPids, pids, and priority.

cReceiver::~cReceiver (  )  [virtual]

Definition at line 39 of file receiver.c.

References Detach().

Here is the call graph for this function:


Member Function Documentation

bool cReceiver::WantsPid ( int  Pid  )  [private]

Definition at line 44 of file receiver.c.

References numPids, and pids.

Referenced by cDevice::DetachAll().

void cReceiver::Detach ( void   )  [protected]

Definition at line 55 of file receiver.c.

References cDevice::Detach(), and device.

Referenced by ~cReceiver(), cRecorder::~cRecorder(), and cTransfer::~cTransfer().

Here is the call graph for this function:

virtual void cReceiver::Activate ( bool  On  )  [inline, protected, virtual]

This function is called just before the cReceiver gets attached to (On == true) or detached from (On == false) a cDevice. It can be used to do things like starting/stopping a thread. It is guaranteed that Receive() will not be called before Activate(true).

Reimplemented in cRecorder, and cTransfer.

Definition at line 28 of file receiver.h.

Referenced by cDevice::AttachReceiver(), and cDevice::Detach().

virtual void cReceiver::Receive ( uchar Data,
int  Length 
) [protected, pure virtual]

This function is called from the cDevice we are attached to, and delivers one TS packet from the set of PIDs the cReceiver has requested. The data packet must be accepted immediately, and the call must return as soon as possible, without any unnecessary delay. Each TS packet will be delivered only ONCE, so the cReceiver must make sure that it will be able to buffer the data if necessary.

Implemented in cRecorder, and cTransfer.

Referenced by cDevice::Action().


Friends And Related Function Documentation

friend class cDevice [friend]

Definition at line 18 of file receiver.h.


Member Data Documentation

cDevice* cReceiver::device [private]

Definition at line 20 of file receiver.h.

Referenced by cDevice::AttachReceiver(), cReceiver(), Detach(), and cDevice::Detach().

int cReceiver::ca [private]

Definition at line 21 of file receiver.h.

Referenced by cReceiver().

int cReceiver::priority [private]

Definition at line 22 of file receiver.h.

Referenced by cReceiver().

int cReceiver::pids[MAXRECEIVEPIDS] [private]

Definition at line 23 of file receiver.h.

Referenced by cDevice::AttachReceiver(), cReceiver(), cDevice::Detach(), and WantsPid().

int cReceiver::numPids [private]

Definition at line 24 of file receiver.h.

Referenced by cDevice::AttachReceiver(), cReceiver(), cDevice::Detach(), and WantsPid().


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 20:22:48 2007 for VDR by  doxygen 1.5.3-20071008