cRecorder Class Reference

#include <recorder.h>

Inheritance diagram for cRecorder:

Inheritance graph
[legend]
Collaboration diagram for cRecorder:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cRecorder (const char *FileName, int Ca, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids)
virtual ~cRecorder ()

Protected Member Functions

virtual void Activate (bool On)
virtual void Receive (uchar *Data, int Length)
virtual void Action (void)

Private Attributes

cRingBufferLinearringBuffer
cRemuxremux
cFileWriterwriter


Detailed Description

Definition at line 21 of file recorder.h.


Constructor & Destructor Documentation

cRecorder::cRecorder ( const char *  FileName,
int  Ca,
int  Priority,
int  VPid,
const int *  APids,
const int *  DPids,
const int *  SPids 
)

Definition at line 124 of file recorder.c.

References RECORDERBUFSIZE, remux, ringBuffer, cRingBuffer::SetTimeouts(), Setup, SpinUpDisk(), TS_SIZE, cSetup::UseDolbyDigital, and writer.

Here is the call graph for this function:

cRecorder::~cRecorder (  )  [virtual]

Definition at line 138 of file recorder.c.

References cReceiver::Detach(), remux, ringBuffer, and writer.

Here is the call graph for this function:


Member Function Documentation

void cRecorder::Activate ( bool  On  )  [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 from cReceiver.

Definition at line 146 of file recorder.c.

References cThread::Cancel(), cThread::Start(), and writer.

Here is the call graph for this function:

void cRecorder::Receive ( uchar Data,
int  Length 
) [protected, 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.

Implements cReceiver.

Definition at line 156 of file recorder.c.

References cRingBufferLinear::Put(), cRingBuffer::ReportOverflow(), ringBuffer, and cThread::Running().

Here is the call graph for this function:

void cRecorder::Action ( void   )  [protected, virtual]

A derived cThread class must implement the code it wants to execute as a separate thread in this function. If this is a loop, it must check Running() repeatedly to see whether it's time to stop.

Implements cThread.

Definition at line 165 of file recorder.c.

References cRingBufferLinear::Del(), cRingBufferLinear::Get(), cRemux::Put(), remux, ringBuffer, cThread::Running(), and cCondWait::SleepMs().

Here is the call graph for this function:


Member Data Documentation

cRingBufferLinear* cRecorder::ringBuffer [private]

Definition at line 23 of file recorder.h.

Referenced by Action(), cRecorder(), Receive(), and ~cRecorder().

cRemux* cRecorder::remux [private]

Definition at line 24 of file recorder.h.

Referenced by Action(), cRecorder(), and ~cRecorder().

cFileWriter* cRecorder::writer [private]

Definition at line 25 of file recorder.h.

Referenced by Activate(), cRecorder(), and ~cRecorder().


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