vdr 2.7.6
cCuttingThread Class Reference

Public Member Functions

 cCuttingThread (const char *FromFileName, const char *ToFileName, cRecordingInfo *RecordingInfo)
virtual ~cCuttingThread () override
const char * Error (void)
Public Member Functions inherited from cThread
 cThread (const char *Description=NULL, bool LowPriority=false)
virtual ~cThread ()
void SetDescription (const char *Description,...) __attribute__((format(printf
void bool Start (void)
bool Active (void)

Protected Member Functions

virtual void Action (void) override
Protected Member Functions inherited from cThread
void SetPriority (int Priority)
void SetIOPriority (int Priority)
void Lock (void)
void Unlock (void)
bool Running (void)
void Cancel (int WaitSeconds=0)

Private Member Functions

bool Throttled (void)
bool SwitchFile (bool Force=false)
bool LoadFrame (int Index, uchar *Buffer, bool &Independent, int &Length, bool *Errors=NULL, bool *Missing=NULL)
bool FramesAreEqual (int Index1, int Index2)
void GetPendingPackets (uchar *Buffer, int &Length, int Index)
bool FixFrame (uchar *Data, int &Length, bool Independent, int Index, bool CutIn, bool CutOut)
bool ProcessSequence (int LastEndIndex, int BeginIndex, int EndIndex, int NextBeginIndex)
void HandleErrors (bool Force=false)

Private Attributes

const char * error
bool isPesRecording
double framesPerSecond
cUnbufferedFilefromFile
cUnbufferedFiletoFile
cFileNamefromFileName
cFileNametoFileName
cIndexFilefromIndex
cIndexFiletoIndex
cMarks fromMarks
cMarks toMarks
int numSequences
off_t maxVideoFileSize
off_t fileSize
int frameErrors
time_t lastErrorHandling
cString editedRecordingName
cRecordingInforecordingInfo
bool suspensionLogged
int sequence
int delta
int64_t lastVidPts
bool multiFramePkt
int64_t firstPts
int64_t offset
int tRefOffset
uchar counter [MAXPID]
bool keepPkt [MAXPID]
int numIFrames
cPatPmtParser patPmtParser

Additional Inherited Members

Static Public Member Functions inherited from cThread
static tThreadId ThreadId (void)
static tThreadId IsMainThread (void)
static void SetMainThreadId (void)

Detailed Description

Definition at line 222 of file cutter.c.

Constructor & Destructor Documentation

◆ cCuttingThread()

◆ ~cCuttingThread()

cCuttingThread::~cCuttingThread ( )
overridevirtual

Definition at line 318 of file cutter.c.

References cThread::Cancel(), fromFileName, fromIndex, toFileName, and toIndex.

Member Function Documentation

◆ Action()

void cCuttingThread::Action ( void )
overrideprotectedvirtual

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.

Definition at line 636 of file cutter.c.

References esyslog, fromFile, fromFileName, fromIndex, fromMarks, HandleErrors(), cMark::Position(), ProcessSequence(), cThread::Running(), Setup, cCondWait::SleepMs(), SwitchFile(), Throttled(), toFile, and toFileName.

◆ Error()

const char * cCuttingThread::Error ( void )
inline

Definition at line 266 of file cutter.c.

References error.

◆ FixFrame()

◆ FramesAreEqual()

bool cCuttingThread::FramesAreEqual ( int Index1,
int Index2 )
private

Definition at line 386 of file cutter.c.

References LoadFrame(), and MAXFRAMESIZE.

Referenced by ProcessSequence().

◆ GetPendingPackets()

void cCuttingThread::GetPendingPackets ( uchar * Buffer,
int & Length,
int Index )
private

◆ HandleErrors()

void cCuttingThread::HandleErrors ( bool Force = false)
private

◆ LoadFrame()

bool cCuttingThread::LoadFrame ( int Index,
uchar * Buffer,
bool & Independent,
int & Length,
bool * Errors = NULL,
bool * Missing = NULL )
private

◆ ProcessSequence()

bool cCuttingThread::ProcessSequence ( int LastEndIndex,
int BeginIndex,
int EndIndex,
int NextBeginIndex )
private

◆ SwitchFile()

bool cCuttingThread::SwitchFile ( bool Force = false)
private

Definition at line 364 of file cutter.c.

References error, fileSize, maxVideoFileSize, toFile, and toFileName.

Referenced by Action(), and ProcessSequence().

◆ Throttled()

bool cCuttingThread::Throttled ( void )
private

Definition at line 327 of file cutter.c.

References dsyslog, cIoThrottle::Engaged(), and suspensionLogged.

Referenced by Action().

Member Data Documentation

◆ counter

uchar cCuttingThread::counter[MAXPID]
private

Definition at line 246 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

◆ delta

int cCuttingThread::delta
private

Definition at line 240 of file cutter.c.

Referenced by cCuttingThread(), FixFrame(), and GetPendingPackets().

◆ editedRecordingName

cString cCuttingThread::editedRecordingName
private

Definition at line 236 of file cutter.c.

Referenced by cCuttingThread(), and HandleErrors().

◆ error

const char* cCuttingThread::error
private

Definition at line 224 of file cutter.c.

Referenced by cCuttingThread(), Error(), LoadFrame(), ProcessSequence(), and SwitchFile().

◆ fileSize

off_t cCuttingThread::fileSize
private

Definition at line 233 of file cutter.c.

Referenced by cCuttingThread(), ProcessSequence(), and SwitchFile().

◆ firstPts

int64_t cCuttingThread::firstPts
private

Definition at line 243 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

◆ frameErrors

int cCuttingThread::frameErrors
private

Definition at line 234 of file cutter.c.

Referenced by cCuttingThread(), HandleErrors(), and ProcessSequence().

◆ framesPerSecond

double cCuttingThread::framesPerSecond
private

Definition at line 226 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

◆ fromFile

cUnbufferedFile* cCuttingThread::fromFile
private

Definition at line 227 of file cutter.c.

Referenced by Action(), cCuttingThread(), and LoadFrame().

◆ fromFileName

cFileName* cCuttingThread::fromFileName
private

Definition at line 228 of file cutter.c.

Referenced by Action(), cCuttingThread(), LoadFrame(), and ~cCuttingThread().

◆ fromIndex

cIndexFile* cCuttingThread::fromIndex
private

Definition at line 229 of file cutter.c.

Referenced by Action(), cCuttingThread(), LoadFrame(), and ~cCuttingThread().

◆ fromMarks

cMarks cCuttingThread::fromMarks
private

Definition at line 230 of file cutter.c.

Referenced by Action(), and cCuttingThread().

◆ isPesRecording

bool cCuttingThread::isPesRecording
private

Definition at line 225 of file cutter.c.

Referenced by cCuttingThread(), and ProcessSequence().

◆ keepPkt

bool cCuttingThread::keepPkt[MAXPID]
private

Definition at line 247 of file cutter.c.

Referenced by FixFrame().

◆ lastErrorHandling

time_t cCuttingThread::lastErrorHandling
private

Definition at line 235 of file cutter.c.

Referenced by cCuttingThread(), and HandleErrors().

◆ lastVidPts

int64_t cCuttingThread::lastVidPts
private

Definition at line 241 of file cutter.c.

Referenced by cCuttingThread(), FixFrame(), and GetPendingPackets().

◆ maxVideoFileSize

off_t cCuttingThread::maxVideoFileSize
private

Definition at line 232 of file cutter.c.

Referenced by cCuttingThread(), and SwitchFile().

◆ multiFramePkt

bool cCuttingThread::multiFramePkt
private

Definition at line 242 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

◆ numIFrames

int cCuttingThread::numIFrames
private

Definition at line 248 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

◆ numSequences

int cCuttingThread::numSequences
private

Definition at line 231 of file cutter.c.

Referenced by cCuttingThread(), and ProcessSequence().

◆ offset

int64_t cCuttingThread::offset
private

Definition at line 244 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

◆ patPmtParser

cPatPmtParser cCuttingThread::patPmtParser
private

Definition at line 249 of file cutter.c.

Referenced by FixFrame(), and GetPendingPackets().

◆ recordingInfo

cRecordingInfo* cCuttingThread::recordingInfo
private

Definition at line 237 of file cutter.c.

Referenced by cCuttingThread(), and HandleErrors().

◆ sequence

int cCuttingThread::sequence
private

Definition at line 239 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

◆ suspensionLogged

bool cCuttingThread::suspensionLogged
private

Definition at line 238 of file cutter.c.

Referenced by cCuttingThread(), and Throttled().

◆ toFile

cUnbufferedFile * cCuttingThread::toFile
private

Definition at line 227 of file cutter.c.

Referenced by Action(), cCuttingThread(), ProcessSequence(), and SwitchFile().

◆ toFileName

cFileName * cCuttingThread::toFileName
private

Definition at line 228 of file cutter.c.

Referenced by Action(), cCuttingThread(), ProcessSequence(), SwitchFile(), and ~cCuttingThread().

◆ toIndex

cIndexFile * cCuttingThread::toIndex
private

Definition at line 229 of file cutter.c.

Referenced by cCuttingThread(), ProcessSequence(), and ~cCuttingThread().

◆ toMarks

cMarks cCuttingThread::toMarks
private

Definition at line 230 of file cutter.c.

Referenced by cCuttingThread(), and ProcessSequence().

◆ tRefOffset

int cCuttingThread::tRefOffset
private

Definition at line 245 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().


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