vdr
2.2.0
|
Public Member Functions | |
cCuttingThread (const char *FromFileName, const char *ToFileName) | |
virtual | ~cCuttingThread () |
const char * | Error (void) |
![]() | |
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) |
![]() | |
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 |
cUnbufferedFile * | fromFile |
cUnbufferedFile * | toFile |
cFileName * | fromFileName |
cFileName * | toFileName |
cIndexFile * | fromIndex |
cIndexFile * | toIndex |
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 tThreadId | ThreadId (void) |
static tThreadId | IsMainThread (void) |
static void | SetMainThreadId (void) |
cCuttingThread::cCuttingThread | ( | const char * | FromFileName, |
const char * | ToFileName | ||
) |
Definition at line 265 of file cutter.c.
References cListBase::Count(), counter, delta, error, esyslog, fileSize, firstPts, cRecording::FramesPerSecond(), framesPerSecond, fromFile, fromFileName, fromIndex, fromMarks, cMarks::GetNumSequences(), cRecording::IsPesRecording(), isPesRecording, lastVidPts, cMarks::Load(), maxVideoFileSize, cSetup::MaxVideoFileSize, MAXVIDEOFILESIZEPES, MEGABYTE, multiFramePkt, numIFrames, numSequences, offset, PTSTICKS, sequence, Setup, cThread::Start(), suspensionLogged, toFile, toFileName, toIndex, toMarks, and tRefOffset.
Referenced by cCutter::Start().
|
virtual |
Definition at line 306 of file cutter.c.
References cThread::Cancel(), fromFileName, fromIndex, toFileName, and toIndex.
|
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().
|
inline |
Definition at line 262 of file cutter.c.
Referenced by cCutter::Stop().
|
private |
Definition at line 436 of file cutter.c.
References counter, delta, firstPts, framesPerSecond, GetPendingPackets(), cPatPmtParser::IsPmtPid(), keepPkt, lastVidPts, MAX27MHZ, MAX33BIT, multiFramePkt, numIFrames, offset, cPatPmtParser::ParsePatPmt(), PATPID, patPmtParser, PCRFACTOR, PtsAdd(), PtsDiff(), sequence, cMpeg2Fixer::SetBrokenLink(), tRefOffset, TS_CONT_CNT_MASK, TS_SIZE, TS_SYNC_BYTE, TsGetContinuityCounter(), TsGetDts(), TsGetPcr(), TsGetPts(), TsHasPayload(), TsHidePayload(), TsPid(), TsSetContinuityCounter(), TsSetDts(), TsSetPcr(), TsSetPts(), cPatPmtParser::Vpid(), and cPatPmtParser::Vtype().
Referenced by ProcessSequence().
|
private |
Definition at line 374 of file cutter.c.
References LoadFrame(), and MAXFRAMESIZE.
Referenced by ProcessSequence().
|
private |
Definition at line 398 of file cutter.c.
References cPacketStorage::Append(), delta, cPacketStorage::Flush(), cPatPmtParser::IsPmtPid(), lastVidPts, LoadFrame(), MAXFRAMESIZE, MAXPID, PATPID, patPmtParser, PtsDiff(), TS_SIZE, TS_SYNC_BYTE, TsGetPts(), TsPid(), and cPatPmtParser::Vpid().
Referenced by FixFrame().
|
private |
Definition at line 331 of file cutter.c.
References error, fromFile, fromFileName, fromIndex, cIndexFile::Get(), MAXFRAMESIZE, MEGABYTE, ReadFrame(), cFileName::SetOffset(), and cUnbufferedFile::SetReadAhead().
Referenced by FramesAreEqual(), GetPendingPackets(), and ProcessSequence().
|
private |
Definition at line 544 of file cutter.c.
References cMarks::Add(), AssertFreeDiskSpace(), cListBase::Count(), error, fileSize, FixFrame(), FramesAreEqual(), isPesRecording, cIndexFile::Last(), LoadFrame(), MAXFRAMESIZE, cFileName::Number(), numSequences, cThread::Running(), cMarks::Save(), cRemux::SetBrokenLink(), SwitchFile(), toFile, toFileName, toIndex, toMarks, cUnbufferedFile::Write(), and cIndexFile::Write().
Referenced by Action().
|
private |
Definition at line 352 of file cutter.c.
References error, fileSize, maxVideoFileSize, cFileName::NextFile(), toFile, and toFileName.
Referenced by Action(), and ProcessSequence().
|
private |
Definition at line 315 of file cutter.c.
References dsyslog, cIoThrottle::Engaged(), and suspensionLogged.
Referenced by Action().
Definition at line 243 of file cutter.c.
Referenced by cCuttingThread(), and FixFrame().
|
private |
Definition at line 237 of file cutter.c.
Referenced by cCuttingThread(), FixFrame(), and GetPendingPackets().
|
private |
Definition at line 225 of file cutter.c.
Referenced by cCutter::Active(), cCutter::cCutter(), cCuttingThread(), cCutter::Error(), LoadFrame(), ProcessSequence(), cCutter::Start(), and SwitchFile().
|
private |
Definition at line 234 of file cutter.c.
Referenced by cCuttingThread(), ProcessSequence(), and SwitchFile().
|
private |
Definition at line 240 of file cutter.c.
Referenced by cCuttingThread(), and FixFrame().
|
private |
Definition at line 227 of file cutter.c.
Referenced by cCuttingThread(), and FixFrame().
|
private |
Definition at line 228 of file cutter.c.
Referenced by Action(), cCuttingThread(), and LoadFrame().
|
private |
Definition at line 229 of file cutter.c.
Referenced by Action(), cCuttingThread(), LoadFrame(), and ~cCuttingThread().
|
private |
Definition at line 230 of file cutter.c.
Referenced by Action(), cCuttingThread(), LoadFrame(), and ~cCuttingThread().
|
private |
Definition at line 231 of file cutter.c.
Referenced by Action(), and cCuttingThread().
|
private |
Definition at line 226 of file cutter.c.
Referenced by cCuttingThread(), and ProcessSequence().
|
private |
Definition at line 244 of file cutter.c.
Referenced by FixFrame().
|
private |
Definition at line 238 of file cutter.c.
Referenced by cCuttingThread(), FixFrame(), and GetPendingPackets().
|
private |
Definition at line 233 of file cutter.c.
Referenced by cCuttingThread(), and SwitchFile().
|
private |
Definition at line 239 of file cutter.c.
Referenced by cCuttingThread(), and FixFrame().
|
private |
Definition at line 245 of file cutter.c.
Referenced by cCuttingThread(), and FixFrame().
|
private |
Definition at line 232 of file cutter.c.
Referenced by cCuttingThread(), and ProcessSequence().
|
private |
Definition at line 241 of file cutter.c.
Referenced by cCuttingThread(), and FixFrame().
|
private |
Definition at line 246 of file cutter.c.
Referenced by FixFrame(), and GetPendingPackets().
|
private |
Definition at line 236 of file cutter.c.
Referenced by cCuttingThread(), and FixFrame().
|
private |
Definition at line 235 of file cutter.c.
Referenced by cCuttingThread(), and Throttled().
|
private |
Definition at line 228 of file cutter.c.
Referenced by Action(), cCuttingThread(), ProcessSequence(), and SwitchFile().
|
private |
Definition at line 229 of file cutter.c.
Referenced by Action(), cCuttingThread(), ProcessSequence(), SwitchFile(), and ~cCuttingThread().
|
private |
Definition at line 230 of file cutter.c.
Referenced by cCuttingThread(), ProcessSequence(), and ~cCuttingThread().
|
private |
Definition at line 231 of file cutter.c.
Referenced by cCuttingThread(), and ProcessSequence().
|
private |
Definition at line 242 of file cutter.c.
Referenced by cCuttingThread(), and FixFrame().