vdr
2.0.6
|
#include <recording.h>
Public Member Functions | |
cRecordings (bool Deleted=false) | |
virtual | ~cRecordings () |
bool | Load (void) |
bool | Update (bool Wait=false) |
void | TouchUpdate (void) |
bool | NeedsUpdate (void) |
void | ChangeState (void) |
bool | StateChanged (int &State) |
void | ResetResume (const char *ResumeFileName=NULL) |
void | ClearSortNames (void) |
cRecording * | GetByName (const char *FileName) |
void | AddByName (const char *FileName, bool TriggerUpdate=true) |
void | DelByName (const char *FileName) |
void | UpdateByName (const char *FileName) |
int | TotalFileSizeMB (void) |
double | MBperMinute (void) |
![]() | |
cRecording * | Get (int Index) const |
cRecording * | First (void) const |
cRecording * | Last (void) const |
cRecording * | Prev (const cRecording *object) const |
cRecording * | Next (const cRecording *object) const |
![]() | |
virtual | ~cListBase () |
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) |
virtual void | Clear (void) |
cListObject * | Get (int Index) const |
int | Count (void) const |
void | Sort (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 | |
void | Action (void) |
![]() | |
cListBase (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 | |
const char * | UpdateFileName (void) |
void | Refresh (bool Foreground=false) |
void | ScanVideoDir (const char *DirName, bool Foreground=false, int LinkLevel=0, int DirLevel=0) |
Private Attributes | |
bool | deleted |
bool | initial |
time_t | lastUpdate |
int | state |
Static Private Attributes | |
static char * | updateFileName = NULL |
Additional Inherited Members | |
![]() | |
static tThreadId | ThreadId (void) |
static tThreadId | IsMainThread (void) |
static void | SetMainThreadId (void) |
![]() | |
cListObject * | objects |
cListObject * | lastObject |
int | count |
Definition at line 160 of file recording.h.
cRecordings::cRecordings | ( | bool | Deleted = false | ) |
Definition at line 1250 of file recording.c.
References deleted, initial, lastUpdate, and state.
|
virtual |
Definition at line 1259 of file recording.c.
References cThread::Cancel().
|
protectedvirtual |
void cRecordings::AddByName | ( | const char * | FileName, |
bool | TriggerUpdate = true |
||
) |
Definition at line 1392 of file recording.c.
References cListBase::Add(), ChangeState(), GetByName(), LOCK_THREAD, and TouchUpdate().
Referenced by cRecordControl::cRecordControl(), and cCutter::Start().
|
inline |
Definition at line 190 of file recording.h.
Referenced by AddByName(), DelByName(), Refresh(), ResetResume(), and ScanVideoDir().
void cRecordings::ClearSortNames | ( | void | ) |
Definition at line 1477 of file recording.c.
References cList< cRecording >::First(), LOCK_THREAD, and cList< cRecording >::Next().
Referenced by cMenuSetupOSD::ProcessKey().
void cRecordings::DelByName | ( | const char * | FileName | ) |
Definition at line 1405 of file recording.c.
References cListBase::Add(), ChangeState(), cListBase::Del(), cRecording::deleted, DeletedRecordings(), DELEXT, cRecording::fileName, cRecording::FileName(), GetByName(), LOCK_THREAD, and TouchUpdate().
Referenced by cSVDRP::CmdDELR(), cMenuRecordings::Delete(), cCutter::Stop(), and cReplayControl::Stop().
cRecording * cRecordings::GetByName | ( | const char * | FileName | ) |
Definition at line 1380 of file recording.c.
References cList< cRecording >::First(), LOCK_THREAD, and cList< cRecording >::Next().
Referenced by AddByName(), DelByName(), cMenuRecordings::Delete(), cReplayControl::GetInfo(), cReplayControl::GetRecording(), cReplayControl::LastReplayed(), ScanVideoDir(), SetTrackDescriptions(), cReplayControl::ShowProgress(), cReplayControl::Stop(), and UpdateByName().
|
inline |
Loads the current list of recordings and returns true if there is anything in it (for compatibility with older plugins - use Update(true) instead).
Definition at line 175 of file recording.h.
References Update().
double cRecordings::MBperMinute | ( | void | ) |
Returns the average data rate (in MB/min) of all recordings, or -1 if this value is unknown.
Definition at line 1447 of file recording.c.
References cList< cRecording >::First(), LOCK_THREAD, and cList< cRecording >::Next().
Referenced by cVideoDiskUsage::HasChanged().
bool cRecordings::NeedsUpdate | ( | void | ) |
Definition at line 1361 of file recording.c.
References LastModifiedTime(), lastUpdate, and UpdateFileName().
Referenced by main(), and TouchUpdate().
|
private |
Definition at line 1276 of file recording.c.
References ChangeState(), cListBase::Clear(), lastUpdate, cThread::Lock(), ScanVideoDir(), cThread::Unlock(), and VideoDirectory.
void cRecordings::ResetResume | ( | const char * | ResumeFileName = NULL | ) |
Definition at line 1467 of file recording.c.
References ChangeState(), cList< cRecording >::First(), LOCK_THREAD, and cList< cRecording >::Next().
Referenced by cResumeFile::Delete(), cResumeFile::Save(), and cMenuSetupReplay::Store().
|
private |
Definition at line 1286 of file recording.c.
References cListBase::Add(), AddDirectory(), ChangeState(), cListBase::Del(), cRecording::deleted, deleted, DELEXT, endswith(), cRecording::FileName(), cRecording::FileSizeMB(), cList< cRecording >::First(), GetByName(), initial, cRecording::IsOnVideoDirectoryFileSystem(), isyslog, cThread::Lock(), MAX_LINK_LEVEL, cRecording::Name(), cReadDir::Next(), cList< cRecording >::Next(), cRecording::NumFrames(), RECEXT, cThread::Running(), and cThread::Unlock().
Referenced by Refresh().
bool cRecordings::StateChanged | ( | int & | State | ) |
Definition at line 1345 of file recording.c.
References state.
Referenced by cMenuRecordings::cMenuRecordings(), and cMenuRecordings::ProcessKey().
int cRecordings::TotalFileSizeMB | ( | void | ) |
Definition at line 1435 of file recording.c.
References cList< cRecording >::First(), LOCK_THREAD, and cList< cRecording >::Next().
Referenced by VideoDiskSpace().
void cRecordings::TouchUpdate | ( | void | ) |
Touches the '.update' file in the video directory, so that other instances of VDR that access the same video directory can be triggered to update their recordings list.
Definition at line 1353 of file recording.c.
References lastUpdate, NeedsUpdate(), TouchFile(), and UpdateFileName().
Referenced by cCuttingThread::Action(), AddByName(), and DelByName().
bool cRecordings::Update | ( | bool | Wait = false | ) |
Triggers an update of the list of recordings, which will run as a separate thread if Wait is false.
If Wait is true, the function returns only after the update has completed. Returns true if Wait is true and there is anything in the list of recordings, false otherwise.
Definition at line 1369 of file recording.c.
References cListBase::Count(), Refresh(), and cThread::Start().
Referenced by AssertFreeDiskSpace(), cSVDRP::CmdLSTR(), cSVDRP::CmdUPDR(), Load(), and main().
void cRecordings::UpdateByName | ( | const char * | FileName | ) |
Definition at line 1427 of file recording.c.
References GetByName(), LOCK_THREAD, and cRecording::ReadInfo().
Referenced by cRecorder::Action(), and cIndexFileGenerator::Action().
|
private |
Definition at line 1269 of file recording.c.
References AddDirectory(), updateFileName, and VideoDirectory.
Referenced by NeedsUpdate(), and TouchUpdate().
|
private |
Definition at line 163 of file recording.h.
Referenced by cRecordings(), and ScanVideoDir().
|
private |
Definition at line 164 of file recording.h.
Referenced by cRecordings(), and ScanVideoDir().
|
private |
Definition at line 165 of file recording.h.
Referenced by cRecordings(), NeedsUpdate(), Refresh(), and TouchUpdate().
|
private |
Definition at line 166 of file recording.h.
Referenced by cRecordings(), and StateChanged().
|
staticprivate |
Definition at line 162 of file recording.h.
Referenced by UpdateFileName().