vdr 2.6.1
recorder.h
Go to the documentation of this file.
1/*
2 * recorder.h: The actual DVB recorder
3 *
4 * See the main source file 'vdr.c' for copyright information and
5 * how to reach the author.
6 *
7 * $Id: recorder.h 5.1 2021/05/19 11:22:20 kls Exp $
8 */
9
10#ifndef __RECORDER_H
11#define __RECORDER_H
12
13#include "receiver.h"
14#include "recording.h"
15#include "remux.h"
16#include "ringbuffer.h"
17#include "thread.h"
18
19class cTsChecker;
20class cFrameChecker;
21
22class cRecorder : public cReceiver, cThread {
23private:
33 char *recordingName;
34 bool firstIframeSeen;
35 off_t fileSize;
36 time_t lastDiskSpaceCheck;
37 time_t lastErrorLog;
38 int oldErrors;
39 int errors;
40 int lastErrors;
42 bool NextFile(void);
43 void HandleErrors(bool Force = false);
44protected:
45 virtual void Activate(bool On);
50 virtual void Receive(const uchar *Data, int Length);
51 virtual void Action(void);
52public:
53 cRecorder(const char *FileName, const cChannel *Channel, int Priority);
56 virtual ~cRecorder();
57 int Errors(void) { return oldErrors + errors; };
59 };
60
61#endif //__RECORDER_H
int Priority(void)
cRecorder(const char *FileName, const cChannel *Channel, int Priority)
Creates a new recorder for the given Channel and the given Priority that will record into the file Fi...
cUnbufferedFile * recordFile
virtual ~cRecorder()
bool NextFile(void)
cFrameChecker * frameChecker
cFileName * fileName
int Errors(void)
Definition: recorder.h:57
cIndexFile * index
cFrameDetector * frameDetector
virtual void Receive(const uchar *Data, int Length)
This function is called from the cDevice we are attached to, and delivers one TS packet from the set ...
void HandleErrors(bool Force=false)
time_t lastDiskSpaceCheck
virtual void Action(void)
A derived cThread class must implement the code it wants to execute as a separate thread in this func...
virtual void Activate(bool On)
If you override Activate() you need to call Detach() (which is a member of the cReceiver class) from ...
cTsChecker * tsChecker
cRecordingInfo * recordingInfo
cRingBufferLinear * ringBuffer
bool RunningLowOnDiskSpace(void)
cPatPmtGenerator patPmtGenerator
cUnbufferedFile is used for large files that are mainly written or read in a streaming manner,...
unsigned char uchar