vdr  2.4.0
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
cMarks Class Reference

#include <recording.h>

Collaboration diagram for cMarks:
[legend]

Public Member Functions

 cMarks (void)
 
bool Load (const char *RecordingFileName, double FramesPerSecond=DEFAULTFRAMESPERSECOND, bool IsPesRecording=false)
 
bool Update (void)
 
bool Save (void)
 
void Align (void)
 
void Sort (void)
 
void Add (int Position)
 
const cMarkGet (int Position) const
 
const cMarkGetPrev (int Position) const
 
const cMarkGetNext (int Position) const
 
const cMarkGetNextBegin (const cMark *EndMark=NULL) const
 
const cMarkGetNextEnd (const cMark *BeginMark) const
 
int GetNumSequences (void) const
 
cMarkGet (int Position)
 
cMarkGetPrev (int Position)
 
cMarkGetNext (int Position)
 
cMarkGetNextBegin (const cMark *EndMark=NULL)
 
cMarkGetNextEnd (const cMark *BeginMark)
 
- Public Member Functions inherited from cConfig< cMark >
 cConfig (const char *NeedsLocking=NULL)
 
virtual ~cConfig ()
 
const char * FileName (void)
 
bool Load (const char *FileName=NULL, bool AllowComments=false, bool MustExist=false)
 
bool Save (void) const
 
- Public Member Functions inherited from cList< cMark >
 cList (const char *NeedsLocking=NULL)
 
const cMarkGet (int Index) const
 
cMarkGet (int Index)
 
const cMarkFirst (void) const
 
cMarkFirst (void)
 
const cMarkLast (void) const
 
cMarkLast (void)
 
const cMarkPrev (const cMark *Object) const
 
cMarkPrev (const cMark *Object)
 
const cMarkNext (const cMark *Object) const
 
cMarkNext (const cMark *Object)
 
- Public Member Functions inherited from cListBase
virtual ~cListBase ()
 
bool Lock (cStateKey &StateKey, bool Write=false, int TimeoutMs=0) const
 
void SetSyncStateKey (cStateKey &StateKey)
 
void SetUseGarbageCollector (void)
 
void SetExplicitModify (void)
 
void SetModified (void)
 
void Add (cListObject *Object, cListObject *After=NULL)
 
void Ins (cListObject *Object, cListObject *Before=NULL)
 
void Del (cListObject *Object, bool DeleteObject=true)
 
virtual void Move (int From, int To)
 
void Move (cListObject *From, cListObject *To)
 
bool Contains (const cListObject *Object) const
 
const cListObjectGet (int Index) const
 
cListObjectGet (int Index)
 
int Count (void) const
 
void Sort (void)
 

Static Public Member Functions

static cString MarksFileName (const cRecording *Recording)
 
static bool DeleteMarksFile (const cRecording *Recording)
 

Private Attributes

cString recordingFileName
 
cString fileName
 
double framesPerSecond
 
bool isPesRecording
 
time_t nextUpdate
 
time_t lastFileTime
 
time_t lastChange
 

Additional Inherited Members

- Protected Member Functions inherited from cListBase
 cListBase (const char *NeedsLocking=NULL)
 
- Protected Attributes inherited from cListBase
cListObjectobjects
 
cListObjectlastObject
 
int count
 
cStateLock stateLock
 
const char * needsLocking
 
bool useGarbageCollector
 

Detailed Description

Definition at line 371 of file recording.h.

Constructor & Destructor Documentation

◆ cMarks()

cMarks::cMarks ( void  )
inline

Definition at line 381 of file recording.h.

Member Function Documentation

◆ Add()

void cMarks::Add ( int  Position)

If this cMarks object is used by multiple threads, the caller must Lock() it before calling Add() and Unlock() it afterwards.

The same applies to calls to Del(), or any of the functions that return a "cMark *", in case an other thread might modifiy the list while the returned pointer is considered valid.

Definition at line 2213 of file recording.c.

References cListBase::Add(), framesPerSecond, and Sort().

Referenced by cReplayControl::MarkToggle(), and cCuttingThread::ProcessSequence().

◆ Align()

void cMarks::Align ( void  )

◆ DeleteMarksFile()

bool cMarks::DeleteMarksFile ( const cRecording Recording)
static

◆ Get() [1/2]

const cMark * cMarks::Get ( int  Position) const

◆ Get() [2/2]

cMark* cMarks::Get ( int  Position)
inline

Definition at line 413 of file recording.h.

References Get().

Referenced by Get().

◆ GetNext() [1/2]

const cMark * cMarks::GetNext ( int  Position) const

◆ GetNext() [2/2]

cMark* cMarks::GetNext ( int  Position)
inline

Definition at line 415 of file recording.h.

References GetNext().

Referenced by GetNext().

◆ GetNextBegin() [1/2]

const cMark * cMarks::GetNextBegin ( const cMark EndMark = NULL) const

Returns the next "begin" mark after EndMark, skipping any marks at the same position as EndMark.

If EndMark is NULL, the first actual "begin" will be returned (if any).

Definition at line 2246 of file recording.c.

References cList< cMark >::First(), cList< cMark >::Next(), and cMark::Position().

Referenced by cCuttingThread::Action(), cDvbPlayer::Action(), cCutter::EditedFileName(), and GetNumSequences().

◆ GetNextBegin() [2/2]

cMark* cMarks::GetNextBegin ( const cMark EndMark = NULL)
inline

Definition at line 416 of file recording.h.

References GetNextBegin().

Referenced by GetNextBegin().

◆ GetNextEnd() [1/2]

const cMark * cMarks::GetNextEnd ( const cMark BeginMark) const

Returns the next "end" mark after BeginMark, skipping any marks at the same position as BeginMark.

Definition at line 2262 of file recording.c.

References cList< cMark >::Next(), and cMark::Position().

Referenced by cCuttingThread::Action(), and GetNumSequences().

◆ GetNextEnd() [2/2]

cMark* cMarks::GetNextEnd ( const cMark BeginMark)
inline

Definition at line 417 of file recording.h.

References GetNextEnd().

Referenced by GetNextEnd().

◆ GetNumSequences()

int cMarks::GetNumSequences ( void  ) const

Returns the actual number of sequences to be cut from the recording.

If there is only one actual "begin" mark, and it is positioned at index 0 (the beginning of the recording), and there is no "end" mark, the return value is 0, which means that the result is the same as the original recording.

Definition at line 2280 of file recording.c.

References GetNextBegin(), and GetNextEnd().

Referenced by cCuttingThread::cCuttingThread(), CutRecording(), and cReplayControl::EditCut().

◆ GetPrev() [1/2]

const cMark * cMarks::GetPrev ( int  Position) const

Definition at line 2228 of file recording.c.

References cList< cMark >::Last(), and cList< cMark >::Prev().

Referenced by cReplayControl::MarkJump().

◆ GetPrev() [2/2]

cMark* cMarks::GetPrev ( int  Position)
inline

Definition at line 414 of file recording.h.

References GetPrev().

Referenced by GetPrev().

◆ Load()

bool cMarks::Load ( const char *  RecordingFileName,
double  FramesPerSecond = DEFAULTFRAMESPERSECOND,
bool  IsPesRecording = false 
)

◆ MarksFileName()

cString cMarks::MarksFileName ( const cRecording Recording)
static

Returns the marks file name for the given Recording (regardless whether such a file actually exists).

Definition at line 2121 of file recording.c.

References AddDirectory(), cRecording::FileName(), cRecording::IsPesRecording(), and MARKSFILESUFFIX.

Referenced by DeleteMarksFile(), and cRecording::HasMarks().

◆ Save()

bool cMarks::Save ( void  )

Definition at line 2180 of file recording.c.

References fileName, lastFileTime, and LastModifiedTime().

Referenced by cReplayControl::Hide(), and cCuttingThread::ProcessSequence().

◆ Sort()

void cMarks::Sort ( void  )

Definition at line 2201 of file recording.c.

References cList< cMark >::First(), cList< cMark >::Next(), and swap().

Referenced by Add(), and Update().

◆ Update()

bool cMarks::Update ( void  )

Member Data Documentation

◆ fileName

cString cMarks::fileName
private

Definition at line 374 of file recording.h.

Referenced by Load(), Save(), and Update().

◆ framesPerSecond

double cMarks::framesPerSecond
private

Definition at line 375 of file recording.h.

Referenced by Add(), Load(), and Update().

◆ isPesRecording

bool cMarks::isPesRecording
private

Definition at line 376 of file recording.h.

Referenced by Align(), and Load().

◆ lastChange

time_t cMarks::lastChange
private

Definition at line 379 of file recording.h.

Referenced by Load(), and Update().

◆ lastFileTime

time_t cMarks::lastFileTime
private

Definition at line 378 of file recording.h.

Referenced by Load(), Save(), and Update().

◆ nextUpdate

time_t cMarks::nextUpdate
private

Definition at line 377 of file recording.h.

Referenced by Load(), and Update().

◆ recordingFileName

cString cMarks::recordingFileName
private

Definition at line 373 of file recording.h.

Referenced by Align(), and Load().


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