vdr  1.7.27
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
cRecorder Class Reference

#include <recorder.h>

List of all members.

Public Member Functions

 cRecorder (const char *FileName, const cChannel *Channel, int Priority)
virtual ~cRecorder ()
 cRecorder (const char *FileName, const cChannel *Channel, int Priority)
virtual ~cRecorder ()

Protected Member Functions

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

Private Member Functions

bool RunningLowOnDiskSpace (void)
bool NextFile (void)
bool RunningLowOnDiskSpace (void)
bool NextFile (void)

Private Attributes

cRingBufferLinearringBuffer
cFrameDetectorframeDetector
cPatPmtGenerator patPmtGenerator
cFileNamefileName
cIndexFileindex
cUnbufferedFilerecordFile
char * recordingName
off_t fileSize
time_t lastDiskSpaceCheck

Detailed Description

Definition at line 19 of file include/vdr/recorder.h.


Constructor & Destructor Documentation

cRecorder::cRecorder ( const char *  FileName,
const cChannel Channel,
int  Priority 
)
cRecorder::~cRecorder ( ) [virtual]

Definition at line 66 of file recorder.c.

References cReceiver::Detach(), fileName, frameDetector, index, recordingName, and ringBuffer.

cRecorder::cRecorder ( const char *  FileName,
const cChannel Channel,
int  Priority 
)
virtual cRecorder::~cRecorder ( ) [virtual]

Member Function Documentation

void cRecorder::Action ( void  ) [protected, virtual]
virtual 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.

virtual 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.

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 100 of file recorder.c.

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

bool cRecorder::NextFile ( void  ) [private]
bool cRecorder::NextFile ( void  ) [private]
virtual 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.

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 108 of file recorder.c.

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

bool cRecorder::RunningLowOnDiskSpace ( void  ) [private]
bool cRecorder::RunningLowOnDiskSpace ( void  ) [private]

Member Data Documentation

Definition at line 24 of file include/vdr/recorder.h.

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

off_t cRecorder::fileSize [private]

Definition at line 28 of file include/vdr/recorder.h.

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

Definition at line 22 of file include/vdr/recorder.h.

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

Definition at line 25 of file include/vdr/recorder.h.

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

Definition at line 29 of file include/vdr/recorder.h.

Referenced by cRecorder(), and RunningLowOnDiskSpace().

Definition at line 23 of file include/vdr/recorder.h.

Referenced by Action(), and cRecorder().

Definition at line 26 of file include/vdr/recorder.h.

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

char * cRecorder::recordingName [private]

Definition at line 27 of file include/vdr/recorder.h.

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

Definition at line 21 of file include/vdr/recorder.h.

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


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