vdr
2.0.6
|
#include <recording.h>
Public Member Functions | |
cRecording (cTimer *Timer, const cEvent *Event) | |
cRecording (const char *FileName) | |
virtual | ~cRecording () |
time_t | Start (void) const |
int | Priority (void) const |
int | Lifetime (void) const |
time_t | Deleted (void) const |
virtual int | Compare (const cListObject &ListObject) const |
const char * | Name (void) const |
const char * | FileName (void) const |
const char * | Title (char Delimiter= ' ', bool NewIndicator=false, int Level=-1) const |
const cRecordingInfo * | Info (void) const |
const char * | PrefixFileName (char Prefix) |
int | HierarchyLevels (void) const |
void | ResetResume (void) const |
double | FramesPerSecond (void) const |
int | NumFrames (void) const |
int | LengthInSeconds (void) const |
int | FileSizeMB (void) const |
bool | IsNew (void) const |
bool | IsEdited (void) const |
bool | IsPesRecording (void) const |
bool | IsOnVideoDirectoryFileSystem (void) const |
void | ReadInfo (void) |
bool | WriteInfo (void) |
void | SetStartTime (time_t Start) |
bool | Delete (void) |
bool | Remove (void) |
bool | Undelete (void) |
![]() | |
cListObject (void) | |
virtual | ~cListObject () |
void | Append (cListObject *Object) |
void | Insert (cListObject *Object) |
void | Unlink (void) |
int | Index (void) const |
cListObject * | Prev (void) const |
cListObject * | Next (void) const |
Private Member Functions | |
cRecording (const cRecording &) | |
cRecording & | operator= (const cRecording &) |
char * | SortName (void) const |
void | ClearSortName (void) |
int | GetResume (void) const |
Static Private Member Functions | |
static char * | StripEpisodeName (char *s, bool Strip) |
Private Attributes | |
int | resume |
char * | titleBuffer |
char * | sortBufferName |
char * | sortBufferTime |
char * | fileName |
char * | name |
int | fileSizeMB |
int | numFrames |
int | channel |
int | instanceId |
bool | isPesRecording |
int | isOnVideoDirectoryFileSystem |
double | framesPerSecond |
cRecordingInfo * | info |
time_t | start |
int | priority |
int | lifetime |
time_t | deleted |
Friends | |
class | cRecordings |
Definition at line 82 of file recording.h.
|
private |
Definition at line 738 of file recording.c.
References cTimer::Aux(), cTimer::Channel(), channel, DEFAULTFRAMESPERSECOND, deleted, cTimer::File(), fileName, fileSizeMB, FOLDERDELIMCHAR, framesPerSecond, info, InstanceId, instanceId, isempty(), isOnVideoDirectoryFileSystem, isPesRecording, cTimer::IsSingleEvent(), cRecordingInfo::lifetime, cTimer::Lifetime(), lifetime, name, cChannel::Name(), cChannel::Number(), numFrames, cRecordingInfo::priority, cTimer::Priority(), priority, resume, RESUME_NOT_INITIALIZED, cRecordingInfo::SetAux(), cTimer::SetFile(), cTimers::SetModified(), Setup, cEvent::ShortText(), sortBufferName, sortBufferTime, cString::sprintf(), start, cTimer::StartTime(), strreplace(), TIMERMACRO_EPISODE, TIMERMACRO_TITLE, Timers, cEvent::Title(), Title(), titleBuffer, and cSetup::UseSubtitle.
cRecording::cRecording | ( | const char * | FileName | ) |
Definition at line 795 of file recording.c.
References channel, DATAFORMATPES, DATAFORMATTS, DEFAULTFRAMESPERSECOND, deleted, esyslog, ExchangeChars(), fileName, FileName(), fileSizeMB, cRecordingInfo::framesPerSecond, framesPerSecond, GetResume(), info, INFOFILESUFFIX, instanceId, isempty(), isOnVideoDirectoryFileSystem, isPesRecording, cRecordingInfo::lifetime, lifetime, LOG_ERROR_STR, MALLOC, MAXLIFETIME, MAXPRIORITY, name, numFrames, cRecordingInfo::ownEvent, cRecordingInfo::priority, priority, cRecordingInfo::Read(), cReadLine::Read(), resume, RESUME_NOT_INITIALIZED, cRecordingInfo::SetData(), cEvent::SetTitle(), sortBufferName, sortBufferTime, cString::sprintf(), start, SUMMARYFILESUFFIX, cRecordingInfo::Title(), titleBuffer, and VideoDirectory.
|
virtual |
Definition at line 919 of file recording.c.
References fileName, info, name, sortBufferName, sortBufferTime, and titleBuffer.
|
private |
Definition at line 982 of file recording.c.
References DELETENULL(), sortBufferName, and sortBufferTime.
|
virtual |
Must return 0 if this object is equal to ListObject, a positive value if it is "greater", and a negative value if it is "smaller".
Reimplemented from cListObject.
Definition at line 997 of file recording.c.
References SortName().
bool cRecording::Delete | ( | void | ) |
Changes the file name so that it will no longer be visible in the "Recordings" menu Returns false in case of error.
Definition at line 1146 of file recording.c.
References DELEXT, FileName(), cRecordingUserCommand::InvokeCommand(), isyslog, RECEXT, RemoveVideoFile(), RenameVideoFile(), and RUC_DELETERECORDING.
Referenced by AssertFreeDiskSpace(), cSVDRP::CmdDELR(), cMenuRecordings::Delete(), and cReplayControl::Stop().
|
inline |
Definition at line 116 of file recording.h.
References deleted.
const char * cRecording::FileName | ( | void | ) | const |
Definition at line 1003 of file recording.c.
References channel, DirectoryNameMax, DirectoryPathMax, dsyslog, ExchangeChars(), fileName, instanceId, isPesRecording, lifetime, LimitNameLengths(), name, Name(), NAMEFORMATPES, NAMEFORMATTS, priority, cString::sprintf(), start, and VideoDirectory.
Referenced by cSVDRP::CmdDELR(), cSVDRP::CmdEDIT(), cSVDRP::CmdLSTR(), cSVDRP::CmdPLAY(), cMenuRecordings::Commands(), cRecording(), cReplayControl::cReplayControl(), cRecordings::DelByName(), Delete(), cMenuRecordings::Delete(), FileSizeMB(), GetResume(), IsOnVideoDirectoryFileSystem(), NumFrames(), cMenuRecordings::Play(), PrefixFileName(), Remove(), cMenuRecordings::Rewind(), cRecordings::ScanVideoDir(), SortName(), and Undelete().
int cRecording::FileSizeMB | ( | void | ) | const |
Returns the total file size of this recording (in MB), or -1 if the file size is unknown.
Definition at line 1233 of file recording.c.
References DirSizeMB(), FileName(), fileSizeMB, cIndexFile::IndexFileName(), IsPesRecording(), LastModifiedTime(), and MININDEXAGE.
Referenced by cRecordings::ScanVideoDir().
|
inline |
Definition at line 125 of file recording.h.
References framesPerSecond.
Referenced by cCuttingThread::cCuttingThread(), cDvbPlayer::cDvbPlayer(), cSVDRP::CmdEDIT(), cSVDRP::CmdPLAY(), cReplayControl::cReplayControl(), CutRecording(), LengthInSeconds(), and cCutter::Start().
|
private |
Definition at line 988 of file recording.c.
References FileName(), isPesRecording, cResumeFile::Read(), resume, and RESUME_NOT_INITIALIZED.
Referenced by cRecording(), and IsNew().
int cRecording::HierarchyLevels | ( | void | ) | const |
Definition at line 1093 of file recording.c.
References FOLDERDELIMCHAR, and name.
Referenced by Title().
|
inline |
Definition at line 121 of file recording.h.
References info.
Referenced by cSVDRP::CmdLSTR(), cMenuRecording::Display(), cMenuRecordings::Info(), cMenuRecordings::SetHelpKeys(), cSkinClassicDisplayMenu::SetRecording(), cSkinCursesDisplayMenu::SetRecording(), cSkinSTTNGDisplayMenu::SetRecording(), cSkinLCARSDisplayMenu::SetRecording(), cSkinLCARSDisplayReplay::SetRecording(), and SetTrackDescriptions().
bool cRecording::IsEdited | ( | void | ) | const |
Definition at line 1104 of file recording.c.
References FOLDERDELIMCHAR, and name.
Referenced by AssertFreeDiskSpace().
|
inline |
bool cRecording::IsOnVideoDirectoryFileSystem | ( | void | ) | const |
Definition at line 1111 of file recording.c.
References FileName(), and isOnVideoDirectoryFileSystem.
Referenced by AssertFreeDiskSpace(), and cRecordings::ScanVideoDir().
|
inline |
Definition at line 136 of file recording.h.
References isPesRecording.
Referenced by cCuttingThread::cCuttingThread(), cDvbPlayer::cDvbPlayer(), cSVDRP::CmdEDIT(), cSVDRP::CmdPLAY(), cReplayControl::cReplayControl(), CutRecording(), FileSizeMB(), GenerateIndex(), NumFrames(), cMenuRecordings::Rewind(), and cCutter::Start().
int cRecording::LengthInSeconds | ( | void | ) | const |
Returns the length (in seconds) of this recording, or -1 in case of error.
Definition at line 1225 of file recording.c.
References FramesPerSecond(), and NumFrames().
Referenced by Title().
|
inline |
Definition at line 115 of file recording.h.
References lifetime.
Referenced by AssertFreeDiskSpace().
|
inline |
Definition at line 118 of file recording.h.
References name.
Referenced by cReplayControl::cReplayControl(), CutRecording(), FileName(), GenerateIndex(), cRecordings::ScanVideoDir(), cSkinClassicDisplayMenu::SetRecording(), cSkinCursesDisplayMenu::SetRecording(), cSkinSTTNGDisplayMenu::SetRecording(), and cSkinLCARSDisplayMenu::SetRecording().
int cRecording::NumFrames | ( | void | ) | const |
Returns the number of frames in this recording.
If the number of frames is unknown, -1 will be returned.
Definition at line 1214 of file recording.c.
References FileName(), cIndexFile::GetLength(), cIndexFile::IndexFileName(), IsPesRecording(), LastModifiedTime(), MININDEXAGE, and numFrames.
Referenced by LengthInSeconds(), and cRecordings::ScanVideoDir().
|
private |
const char * cRecording::PrefixFileName | ( | char | Prefix | ) |
Definition at line 1082 of file recording.c.
References fileName, FileName(), and PrefixVideoFileName().
Referenced by cCutter::Start().
|
inline |
Definition at line 114 of file recording.h.
References priority.
Referenced by AssertFreeDiskSpace().
void cRecording::ReadInfo | ( | void | ) |
Definition at line 1118 of file recording.c.
References cRecordingInfo::framesPerSecond, framesPerSecond, info, cRecordingInfo::lifetime, lifetime, cRecordingInfo::priority, priority, and cRecordingInfo::Read().
Referenced by cRecordings::UpdateByName().
bool cRecording::Remove | ( | void | ) |
Actually removes the file from the disk Returns false in case of error.
Definition at line 1172 of file recording.c.
References DELEXT, endswith(), esyslog, FileName(), isyslog, and RemoveVideoFile().
Referenced by cRemoveDeletedRecordingsThread::Action(), and AssertFreeDiskSpace().
void cRecording::ResetResume | ( | void | ) | const |
Definition at line 1209 of file recording.c.
References resume, and RESUME_NOT_INITIALIZED.
void cRecording::SetStartTime | ( | time_t | Start | ) |
Sets the start time of this recording to the given value.
If a filename has already been set for this recording, it will be deleted and a new one will be generated (using the new start time) at the next call to FileName(). Use this function with care - it does not check whether a recording with this new name already exists, and if there is one, results may be unexpected!
Definition at line 1139 of file recording.c.
References fileName, start, and Start().
Referenced by cCutter::Start().
|
private |
Definition at line 958 of file recording.c.
References cSetup::AlwaysSortFoldersFirst, buf(), FileName(), MALLOC, cSetup::RecordingDirs, RecordingsSortMode, rsmName, rsmTime, Setup, sortBufferName, sortBufferTime, start, StripEpisodeName(), strreplace(), and VideoDirectory.
Referenced by Compare().
|
inline |
Definition at line 113 of file recording.h.
References start.
Referenced by AssertFreeDiskSpace(), cSkinClassicDisplayMenu::SetRecording(), cSkinCursesDisplayMenu::SetRecording(), cSkinSTTNGDisplayMenu::SetRecording(), cSkinLCARSDisplayMenu::SetRecording(), cSkinLCARSDisplayReplay::SetRecording(), SetStartTime(), and cCutter::Start().
|
staticprivate |
Definition at line 929 of file recording.c.
Referenced by SortName().
const char * cRecording::Title | ( | char | Delimiter = ' ' , |
bool | NewIndicator = false , |
||
int | Level = -1 |
||
) | const |
Definition at line 1021 of file recording.c.
References FOLDERDELIMCHAR, HierarchyLevels(), ICON_NEW, ICON_NEW_UTF8, IsLangUtf8(), IsNew(), LengthInSeconds(), MALLOC, max(), name, Setup, cString::sprintf(), start, stripspace(), strn0cpy(), titleBuffer, and cSetup::WarEagleIcons.
Referenced by cSVDRP::CmdEDIT(), cSVDRP::CmdLSTR(), cSVDRP::CmdPLAY(), cMenuRecordingItem::cMenuRecordingItem(), cRecording(), and cSkinDisplayReplay::SetRecording().
bool cRecording::Undelete | ( | void | ) |
Changes the file name so that it will be visible in the "Recordings" menu again and not processed by cRemoveDeletedRecordingsThread.
Returns false in case of error
Definition at line 1183 of file recording.c.
References DELEXT, esyslog, FileName(), isyslog, RECEXT, and RenameVideoFile().
bool cRecording::WriteInfo | ( | void | ) |
Definition at line 1126 of file recording.c.
References fileName, info, INFOFILESUFFIX, isPesRecording, LOG_ERROR_STR, cString::sprintf(), and cRecordingInfo::Write().
Referenced by cCutter::Start().
|
friend |
Definition at line 83 of file recording.h.
|
private |
Definition at line 93 of file recording.h.
Referenced by cRecording(), and FileName().
|
private |
Definition at line 108 of file recording.h.
Referenced by cRecording(), cRecordings::DelByName(), Deleted(), and cRecordings::ScanVideoDir().
|
mutableprivate |
Definition at line 89 of file recording.h.
Referenced by cRecording(), cRecordings::DelByName(), FileName(), PrefixFileName(), SetStartTime(), WriteInfo(), and ~cRecording().
|
mutableprivate |
Definition at line 91 of file recording.h.
Referenced by cRecording(), and FileSizeMB().
|
private |
Definition at line 97 of file recording.h.
Referenced by cRecording(), FramesPerSecond(), and ReadInfo().
|
private |
Definition at line 98 of file recording.h.
Referenced by cRecording(), Info(), ReadInfo(), WriteInfo(), and ~cRecording().
|
private |
Definition at line 94 of file recording.h.
Referenced by cRecording(), and FileName().
|
mutableprivate |
Definition at line 96 of file recording.h.
Referenced by cRecording(), and IsOnVideoDirectoryFileSystem().
|
private |
Definition at line 95 of file recording.h.
Referenced by cRecording(), FileName(), GetResume(), IsPesRecording(), and WriteInfo().
|
private |
Definition at line 107 of file recording.h.
Referenced by cRecording(), FileName(), Lifetime(), and ReadInfo().
|
mutableprivate |
Definition at line 90 of file recording.h.
Referenced by cRecording(), FileName(), HierarchyLevels(), IsEdited(), Name(), Title(), and ~cRecording().
|
mutableprivate |
Definition at line 92 of file recording.h.
Referenced by cRecording(), and NumFrames().
|
private |
Definition at line 106 of file recording.h.
Referenced by cRecording(), FileName(), Priority(), and ReadInfo().
|
mutableprivate |
Definition at line 85 of file recording.h.
Referenced by cRecording(), GetResume(), and ResetResume().
|
mutableprivate |
Definition at line 87 of file recording.h.
Referenced by ClearSortName(), cRecording(), SortName(), and ~cRecording().
|
mutableprivate |
Definition at line 88 of file recording.h.
Referenced by ClearSortName(), cRecording(), SortName(), and ~cRecording().
|
private |
Definition at line 105 of file recording.h.
Referenced by cRecording(), FileName(), SetStartTime(), SortName(), Start(), and Title().
|
mutableprivate |
Definition at line 86 of file recording.h.
Referenced by cRecording(), Title(), and ~cRecording().