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 (tChannelID ChannelID, int Priority, int Pid, const int *Pids1=NULL, const int *Pids2=NULL, const int *Pids3=NULL)
virtual ~cReceiver ()
tChannelID ChannelID (void)
bool IsAttached (void)

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
tChannelID channelID
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 ( tChannelID  ChannelID,
int  Priority,
int  Pid,
const int *  Pids1 = NULL,
const int *  Pids2 = NULL,
const int *  Pids3 = NULL 
)

Creates a new receiver for the channel with the given ChannelID with 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). The ChannelID is necessary to allow the device that will be used for this receiver to detect and store whether the channel can be decrypted in case this is an encrypted channel. If the channel is not encrypted or this detection is not wanted, an invalid tChannelID may be given.

Definition at line 15 of file receiver.c.

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

cReceiver::~cReceiver (  )  [virtual]

Definition at line 39 of file receiver.c.

References device, and esyslog.


Member Function Documentation

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

Definition at line 49 of file receiver.c.

References numPids, and pids.

Referenced by cDevice::DetachAll().

void cReceiver::Detach ( void   )  [protected]

Definition at line 60 of file receiver.c.

References cDevice::Detach(), and device.

Referenced by cLiveSubtitle::~cLiveSubtitle(), 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 cLiveSubtitle, cRecorder, and cTransfer.

Referenced by cDevice::Action().

tChannelID cReceiver::ChannelID ( void   )  [inline]

Definition at line 55 of file receiver.h.

References channelID.

bool cReceiver::IsAttached ( void   )  [inline]

Returns true if this receiver is (still) attached to a device. A receiver may be automatically detached from its device in case the device is needed otherwise, so code that uses a cReceiver should repeatedly check whether it is still attached, and if it isn't, delete it (or take any other appropriate measures).

Definition at line 56 of file receiver.h.

References device.

Referenced by cRecordControl::Process().


Friends And Related Function Documentation

friend class cDevice [friend]

Definition at line 18 of file receiver.h.


Member Data Documentation

Definition at line 21 of file receiver.h.

Referenced by ChannelID(), and 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 Jan 13 14:31:20 2009 for VDR by  doxygen 1.5.6