Home

Dokumentation

Impressum

Dokumentation VDR
 

Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

cRecorder Class Reference

#include <recorder.h>

Inheritance diagram for cRecorder:

Inheritance graph
[legend]
Collaboration diagram for cRecorder:

Collaboration graph
[legend]

Detailed Description

DVB recoder.

recorder.h: The actual DVB recorder

See the main source file 'vdr.c' for copyright information and how to reach the author.

Id
recorder.h 1.1 2002/06/08 09:35:03 kls Exp

Definition at line 20 of file recorder.h.

Public Methods

 cRecorder (const char *FileName, int Ca, int Priority, int VPid, int APid1, int APid2, int DPid1, int DPid2)
virtual ~cRecorder ()

Protected Methods

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

Private Methods

bool RunningLowOnDiskSpace (void)
bool NextFile (void)

Private Attributes

cRingBufferLinearringBuffer
cRemuxremux
cFileNamefileName
cIndexFileindex
uchar pictureType
int fileSize
int recordFile
bool active
time_t lastDiskSpaceCheck


Constructor & Destructor Documentation

cRecorder::cRecorder const char *    FileName,
int    Ca,
int    Priority,
int    VPid,
int    APid1,
int    APid2,
int    DPid1,
int    DPid2
 

Creates a new recorder that requires conditional access Ca, has the given Priority and will record the given PIDs into the file FileName.

Definition at line 22 of file recorder.c.

References active, esyslog, fileName, fileSize, index, isyslog, lastDiskSpaceCheck, MakeDirs(), NO_PICTURE, cFileName::Open(), pictureType, recordFile, remux, ringBuffer, and SpinUpDisk().

cRecorder::~cRecorder   [virtual]
 

Definition at line 57 of file recorder.c.

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


Member Function Documentation

void cRecorder::Action void    [protected, virtual]
 

Implements cThread.

Definition at line 109 of file recorder.c.

References active, dsyslog, fileName, fileSize, cRingBufferLinear::Get(), I_FRAME, index, LOG_ERROR_STR, MINVIDEODATA, cFileName::Name(), NextFile(), NO_PICTURE, cFileName::Number(), pictureType, cRemux::Process(), remux, ringBuffer, safe_write(), uchar, and cIndexFile::Write().

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

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

bool cRecorder::NextFile void    [private]
 

Definition at line 91 of file recorder.c.

References fileName, fileSize, I_FRAME, MEGABYTE, cFileName::NextFile(), pictureType, recordFile, and RunningLowOnDiskSpace().

Referenced by Action().

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

References active, esyslog, cRingBufferLinear::Put(), and ringBuffer.

bool cRecorder::RunningLowOnDiskSpace void    [private]
 

Definition at line 78 of file recorder.c.

References DISKCHECKINTERVAL, dsyslog, fileName, FreeDiskSpaceMB(), lastDiskSpaceCheck, MINFREEDISKSPACE, and cFileName::Name().

Referenced by NextFile().


Field Documentation

bool cRecorder::active [private]
 

Definition at line 29 of file recorder.h.

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

cFileName* cRecorder::fileName [private]
 

Definition at line 24 of file recorder.h.

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

int cRecorder::fileSize [private]
 

Definition at line 27 of file recorder.h.

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

cIndexFile* cRecorder::index [private]
 

Definition at line 25 of file recorder.h.

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

time_t cRecorder::lastDiskSpaceCheck [private]
 

Definition at line 30 of file recorder.h.

Referenced by cRecorder(), and RunningLowOnDiskSpace().

uchar cRecorder::pictureType [private]
 

Definition at line 26 of file recorder.h.

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

int cRecorder::recordFile [private]
 

Definition at line 28 of file recorder.h.

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

cRemux* cRecorder::remux [private]
 

Definition at line 23 of file recorder.h.

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

cRingBufferLinear* cRecorder::ringBuffer [private]
 

Definition at line 22 of file recorder.h.

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


The documentation for this class was generated from the following files:
Generated on Wed Feb 5 23:31:50 2003 for VDR by doxygen1.3-rc2