vdr
1.7.27
|
00001 /* 00002 * recorder.h: The actual DVB recorder 00003 * 00004 * See the main source file 'vdr.c' for copyright information and 00005 * how to reach the author. 00006 * 00007 * $Id: recorder.h 2.3 2010/12/27 11:17:04 kls Exp $ 00008 */ 00009 00010 #ifndef __RECORDER_H 00011 #define __RECORDER_H 00012 00013 #include "receiver.h" 00014 #include "recording.h" 00015 #include "remux.h" 00016 #include "ringbuffer.h" 00017 #include "thread.h" 00018 00019 class cRecorder : public cReceiver, cThread { 00020 private: 00021 cRingBufferLinear *ringBuffer; 00022 cFrameDetector *frameDetector; 00023 cPatPmtGenerator patPmtGenerator; 00024 cFileName *fileName; 00025 cIndexFile *index; 00026 cUnbufferedFile *recordFile; 00027 char *recordingName; 00028 off_t fileSize; 00029 time_t lastDiskSpaceCheck; 00030 bool RunningLowOnDiskSpace(void); 00031 bool NextFile(void); 00032 protected: 00033 virtual void Activate(bool On); 00034 virtual void Receive(uchar *Data, int Length); 00035 virtual void Action(void); 00036 public: 00037 cRecorder(const char *FileName, const cChannel *Channel, int Priority); 00038 // Creates a new recorder for the given Channel and 00039 // the given Priority that will record into the file FileName. 00040 virtual ~cRecorder(); 00041 }; 00042 00043 #endif //__RECORDER_H