2002-06-16 12:57:31 +02:00
|
|
|
/*
|
|
|
|
* recorder.h: The actual DVB recorder
|
|
|
|
*
|
|
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
|
|
* how to reach the author.
|
|
|
|
*
|
2009-01-06 14:41:11 +01:00
|
|
|
* $Id: recorder.h 2.1 2009/01/06 10:44:58 kls Exp $
|
2002-06-16 12:57:31 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __RECORDER_H
|
|
|
|
#define __RECORDER_H
|
|
|
|
|
|
|
|
#include "receiver.h"
|
|
|
|
#include "recording.h"
|
|
|
|
#include "remux.h"
|
|
|
|
#include "ringbuffer.h"
|
|
|
|
#include "thread.h"
|
|
|
|
|
|
|
|
class cRecorder : public cReceiver, cThread {
|
|
|
|
private:
|
|
|
|
cRingBufferLinear *ringBuffer;
|
2009-01-06 14:41:11 +01:00
|
|
|
cFrameDetector *frameDetector;
|
|
|
|
cPatPmtGenerator patPmtGenerator;
|
|
|
|
cFileName *fileName;
|
|
|
|
cIndexFile *index;
|
|
|
|
cUnbufferedFile *recordFile;
|
|
|
|
cRecordingInfo recordingInfo;
|
|
|
|
off_t fileSize;
|
|
|
|
time_t lastDiskSpaceCheck;
|
|
|
|
bool RunningLowOnDiskSpace(void);
|
|
|
|
bool NextFile(void);
|
2002-06-16 12:57:31 +02:00
|
|
|
protected:
|
|
|
|
virtual void Activate(bool On);
|
|
|
|
virtual void Receive(uchar *Data, int Length);
|
|
|
|
virtual void Action(void);
|
|
|
|
public:
|
2007-01-07 14:46:14 +01:00
|
|
|
cRecorder(const char *FileName, tChannelID ChannelID, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids);
|
|
|
|
// Creates a new recorder for the channel with the given ChannelID and
|
|
|
|
// the given Priority that will record the given PIDs into the file FileName.
|
2002-06-16 12:57:31 +02:00
|
|
|
virtual ~cRecorder();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__RECORDER_H
|