vdr  2.2.0
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
cCuttingThread Class Reference

Public Member Functions

 cCuttingThread (const char *FromFileName, const char *ToFileName)
 
virtual ~cCuttingThread ()
 
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)
 
- 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 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)
 

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
 
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 223 of file cutter.c.

Constructor & Destructor Documentation

cCuttingThread::cCuttingThread ( const char *  FromFileName,
const char *  ToFileName 
)
cCuttingThread::~cCuttingThread ( )
virtual

Definition at line 306 of file cutter.c.

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

Member Function Documentation

void cCuttingThread::Action ( void  )
protectedvirtual

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 599 of file cutter.c.

References esyslog, fromFile, fromFileName, fromIndex, fromMarks, cMarks::GetNextBegin(), cMarks::GetNextEnd(), cIndexFile::Last(), cFileName::Open(), cMark::Position(), ProcessSequence(), Recordings, cThread::Running(), Setup, cCondWait::SleepMs(), cSetup::SplitEditedFiles, SwitchFile(), Throttled(), toFile, toFileName, and cRecordings::TouchUpdate().

const char* cCuttingThread::Error ( void  )
inline

Definition at line 262 of file cutter.c.

Referenced by cCutter::Stop().

bool cCuttingThread::FixFrame ( uchar Data,
int &  Length,
bool  Independent,
int  Index,
bool  CutIn,
bool  CutOut 
)
private
bool cCuttingThread::FramesAreEqual ( int  Index1,
int  Index2 
)
private

Definition at line 374 of file cutter.c.

References LoadFrame(), and MAXFRAMESIZE.

Referenced by ProcessSequence().

void cCuttingThread::GetPendingPackets ( uchar Buffer,
int &  Length,
int  Index 
)
private
bool cCuttingThread::LoadFrame ( int  Index,
uchar Buffer,
bool &  Independent,
int &  Length 
)
private
bool cCuttingThread::ProcessSequence ( int  LastEndIndex,
int  BeginIndex,
int  EndIndex,
int  NextBeginIndex 
)
private
bool cCuttingThread::SwitchFile ( bool  Force = false)
private

Definition at line 352 of file cutter.c.

References error, fileSize, maxVideoFileSize, cFileName::NextFile(), toFile, and toFileName.

Referenced by Action(), and ProcessSequence().

bool cCuttingThread::Throttled ( void  )
private

Definition at line 315 of file cutter.c.

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

Referenced by Action().

Member Data Documentation

uchar cCuttingThread::counter[MAXPID]
private

Definition at line 243 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

int cCuttingThread::delta
private

Definition at line 237 of file cutter.c.

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

const char* cCuttingThread::error
private
off_t cCuttingThread::fileSize
private

Definition at line 234 of file cutter.c.

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

int64_t cCuttingThread::firstPts
private

Definition at line 240 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

double cCuttingThread::framesPerSecond
private

Definition at line 227 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

cUnbufferedFile* cCuttingThread::fromFile
private

Definition at line 228 of file cutter.c.

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

cFileName* cCuttingThread::fromFileName
private

Definition at line 229 of file cutter.c.

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

cIndexFile* cCuttingThread::fromIndex
private

Definition at line 230 of file cutter.c.

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

cMarks cCuttingThread::fromMarks
private

Definition at line 231 of file cutter.c.

Referenced by Action(), and cCuttingThread().

bool cCuttingThread::isPesRecording
private

Definition at line 226 of file cutter.c.

Referenced by cCuttingThread(), and ProcessSequence().

bool cCuttingThread::keepPkt[MAXPID]
private

Definition at line 244 of file cutter.c.

Referenced by FixFrame().

int64_t cCuttingThread::lastVidPts
private

Definition at line 238 of file cutter.c.

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

off_t cCuttingThread::maxVideoFileSize
private

Definition at line 233 of file cutter.c.

Referenced by cCuttingThread(), and SwitchFile().

bool cCuttingThread::multiFramePkt
private

Definition at line 239 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

int cCuttingThread::numIFrames
private

Definition at line 245 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

int cCuttingThread::numSequences
private

Definition at line 232 of file cutter.c.

Referenced by cCuttingThread(), and ProcessSequence().

int64_t cCuttingThread::offset
private

Definition at line 241 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

cPatPmtParser cCuttingThread::patPmtParser
private

Definition at line 246 of file cutter.c.

Referenced by FixFrame(), and GetPendingPackets().

int cCuttingThread::sequence
private

Definition at line 236 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().

bool cCuttingThread::suspensionLogged
private

Definition at line 235 of file cutter.c.

Referenced by cCuttingThread(), and Throttled().

cUnbufferedFile * cCuttingThread::toFile
private

Definition at line 228 of file cutter.c.

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

cFileName * cCuttingThread::toFileName
private

Definition at line 229 of file cutter.c.

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

cIndexFile * cCuttingThread::toIndex
private

Definition at line 230 of file cutter.c.

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

cMarks cCuttingThread::toMarks
private

Definition at line 231 of file cutter.c.

Referenced by cCuttingThread(), and ProcessSequence().

int cCuttingThread::tRefOffset
private

Definition at line 242 of file cutter.c.

Referenced by cCuttingThread(), and FixFrame().


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