vdr
1.7.27
|
#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) |
const char * | UpdateFileName (const char *FileName) |
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 |
void | ReadInfo (void) |
bool | WriteInfo (void) |
void | SetStartTime (time_t Start) |
bool | Delete (void) |
bool | Remove (void) |
bool | Undelete (void) |
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) |
const char * | UpdateFileName (const char *FileName) |
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 |
void | ReadInfo (void) |
bool | WriteInfo (void) |
void | SetStartTime (time_t Start) |
bool | Delete (void) |
bool | Remove (void) |
bool | Undelete (void) |
Private Member Functions | |
cRecording (const cRecording &) | |
cRecording & | operator= (const cRecording &) |
char * | SortName (void) const |
int | GetResume (void) const |
cRecording (const cRecording &) | |
cRecording & | operator= (const cRecording &) |
char * | SortName (void) const |
int | GetResume (void) const |
Static Private Member Functions | |
static char * | StripEpisodeName (char *s) |
static char * | StripEpisodeName (char *s) |
Private Attributes | |
int | resume |
char * | titleBuffer |
char * | sortBuffer |
char * | fileName |
char * | name |
int | fileSizeMB |
int | numFrames |
int | channel |
int | instanceId |
bool | isPesRecording |
double | framesPerSecond |
cRecordingInfo * | info |
time_t | start |
int | priority |
int | lifetime |
time_t | deleted |
Friends | |
class | cRecordings |
Definition at line 83 of file include/vdr/recording.h.
cRecording::cRecording | ( | const cRecording & | ) | [private] |
cRecording::cRecording | ( | cTimer * | Timer, |
const cEvent * | Event | ||
) |
Definition at line 609 of file recording.c.
References cTimer::Aux(), cTimer::Channel(), channel, DEFAULTFRAMESPERSECOND, deleted, cTimer::File(), fileName, fileSizeMB, FOLDERDELIMCHAR, framesPerSecond, info, InstanceId, instanceId, isempty(), isPesRecording, cTimer::IsSingleEvent(), cRecordingInfo::lifetime, cTimer::Lifetime(), lifetime, MAX_SUBTITLE_LENGTH, name, cChannel::Name(), cChannel::Number(), numFrames, cRecordingInfo::priority, cTimer::Priority(), priority, resume, RESUME_NOT_INITIALIZED, cRecordingInfo::SetAux(), cTimer::SetFile(), cTimers::SetModified(), Setup, cEvent::ShortText(), sortBuffer, cString::sprintf(), start, cTimer::StartTime(), strreplace(), TIMERMACRO_EPISODE, TIMERMACRO_TITLE, Timers, cEvent::Title(), Title(), titleBuffer, cSetup::UseSubtitle, and Utf8Strn0Cpy().
cRecording::cRecording | ( | const char * | FileName | ) |
Definition at line 671 of file recording.c.
References channel, DATAFORMATPES, DATAFORMATTS, DEFAULTFRAMESPERSECOND, deleted, esyslog, ExchangeChars(), fileName, FileName(), fileSizeMB, cRecordingInfo::framesPerSecond, framesPerSecond, GetResume(), info, INFOFILESUFFIX, instanceId, isempty(), isPesRecording, cRecordingInfo::lifetime, lifetime, LOG_ERROR_STR, MALLOC, MAXLIFETIME, MAXPRIORITY, name, numFrames, cRecordingInfo::priority, priority, cRecordingInfo::Read(), cReadLine::Read(), resume, RESUME_NOT_INITIALIZED, cRecordingInfo::SetData(), sortBuffer, cString::sprintf(), start, SUMMARYFILESUFFIX, cRecordingInfo::Title(), titleBuffer, and VideoDirectory.
cRecording::~cRecording | ( | ) | [virtual] |
Definition at line 791 of file recording.c.
References fileName, info, name, sortBuffer, and titleBuffer.
cRecording::cRecording | ( | const cRecording & | ) | [private] |
cRecording::cRecording | ( | cTimer * | Timer, |
const cEvent * | Event | ||
) |
cRecording::cRecording | ( | const char * | FileName | ) |
virtual cRecording::~cRecording | ( | ) | [virtual] |
int cRecording::Compare | ( | const cListObject & | ListObject | ) | const [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 842 of file recording.c.
References SortName().
virtual int cRecording::Compare | ( | const cListObject & | ListObject | ) | const [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.
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 991 of file recording.c.
References DELEXT, FileName(), isyslog, RECEXT, RemoveVideoFile(), and RenameVideoFile().
Referenced by cCopyingThread::Action(), AssertFreeDiskSpace(), cSVDRP::CmdDELR(), cMenuRecordings::Delete(), and cReplayControl::Stop().
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.
time_t cRecording::Deleted | ( | void | ) | const [inline] |
Definition at line 117 of file include/vdr/recording.h.
References deleted.
time_t cRecording::Deleted | ( | void | ) | const [inline] |
Definition at line 117 of file recording.h.
References deleted.
const char * cRecording::FileName | ( | void | ) | const |
Definition at line 848 of file recording.c.
References channel, ExchangeChars(), fileName, instanceId, isPesRecording, lifetime, name, NAMEFORMATPES, NAMEFORMATTS, priority, cString::sprintf(), start, and VideoDirectory.
Referenced by AssertFreeDiskSpace(), cSVDRP::CmdDELR(), cSVDRP::CmdEDIT(), cSVDRP::CmdPLAY(), cMenuEditRecording::cMenuEditRecording(), cMenuRecordingItem::cMenuRecordingItem(), cMenuRecordings::Commands(), cMenuTimers::Commands(), cRecording(), cReplayControl::cReplayControl(), cRecordings::DelByName(), Delete(), FileSizeMB(), GetResume(), NumFrames(), cMenuRecordings::Play(), PrefixFileName(), cMenuEditRecording::ProcessKey(), Remove(), cMenuRecordings::Set(), SortName(), cFileTransfer::Start(), and Undelete().
const char* cRecording::FileName | ( | void | ) | const |
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 1076 of file recording.c.
References DirSizeMB(), FileName(), fileSizeMB, LastModifiedTime(), and MININDEXAGE.
Referenced by cRecordings::ScanVideoDir().
int cRecording::FileSizeMB | ( | void | ) | const |
Returns the total file size of this recording (in MB), or -1 if the file size is unknown.
double cRecording::FramesPerSecond | ( | void | ) | const [inline] |
Definition at line 127 of file include/vdr/recording.h.
References framesPerSecond.
Referenced by cCuttingThread::cCuttingThread(), cDvbPlayer::cDvbPlayer(), cSVDRP::CmdEDIT(), cSVDRP::CmdPLAY(), cMenuEditRecording::cMenuEditRecording(), cReplayControl::cReplayControl(), CutRecording(), LengthInSeconds(), cMenuEditRecording::ProcessKey(), and cCutter::Start().
double cRecording::FramesPerSecond | ( | void | ) | const [inline] |
Definition at line 127 of file recording.h.
References framesPerSecond.
int cRecording::GetResume | ( | void | ) | const [private] |
int cRecording::GetResume | ( | void | ) | const [private] |
Definition at line 833 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 945 of file recording.c.
References FOLDERDELIMCHAR, and name.
Referenced by Title().
int cRecording::HierarchyLevels | ( | void | ) | const |
const cRecordingInfo* cRecording::Info | ( | void | ) | const [inline] |
Definition at line 122 of file recording.h.
References info.
const cRecordingInfo* cRecording::Info | ( | void | ) | const [inline] |
Definition at line 122 of file include/vdr/recording.h.
References info.
Referenced by cSVDRP::CmdLSTR(), cMenuEditRecording::cMenuEditRecording(), cMenuRecording::Display(), cMenuRecordings::Info(), cMenuRecordings::SetHelpKeys(), cSkinClassicDisplayMenu::SetRecording(), cSkinCursesDisplayMenu::SetRecording(), cSkinSTTNGDisplayMenu::SetRecording(), and SetTrackDescriptions().
bool cRecording::IsEdited | ( | void | ) | const |
Definition at line 956 of file recording.c.
References FOLDERDELIMCHAR, and name.
Referenced by AssertFreeDiskSpace().
bool cRecording::IsEdited | ( | void | ) | const |
bool cRecording::IsNew | ( | void | ) | const [inline] |
Definition at line 136 of file include/vdr/recording.h.
References GetResume().
Referenced by Title().
bool cRecording::IsNew | ( | void | ) | const [inline] |
Definition at line 136 of file recording.h.
References GetResume().
bool cRecording::IsPesRecording | ( | void | ) | const [inline] |
Definition at line 138 of file include/vdr/recording.h.
References isPesRecording.
Referenced by cCuttingThread::cCuttingThread(), cDvbPlayer::cDvbPlayer(), cSVDRP::CmdEDIT(), cSVDRP::CmdPLAY(), cMenuEditRecording::cMenuEditRecording(), cReplayControl::cReplayControl(), CutRecording(), GenerateIndex(), NumFrames(), cMenuEditRecording::ProcessKey(), cMenuRecordings::Rewind(), and cCutter::Start().
bool cRecording::IsPesRecording | ( | void | ) | const [inline] |
Definition at line 138 of file recording.h.
References isPesRecording.
int cRecording::LengthInSeconds | ( | void | ) | const |
Returns the length (in seconds) of this recording, or -1 in case of error.
Definition at line 1068 of file recording.c.
References FramesPerSecond(), and NumFrames().
Referenced by cMenuEditRecording::cMenuEditRecording(), and Title().
int cRecording::LengthInSeconds | ( | void | ) | const |
Returns the length (in seconds) of this recording, or -1 in case of error.
int cRecording::Lifetime | ( | void | ) | const [inline] |
Definition at line 116 of file recording.h.
References lifetime.
int cRecording::Lifetime | ( | void | ) | const [inline] |
Definition at line 116 of file include/vdr/recording.h.
References lifetime.
Referenced by AssertFreeDiskSpace().
const char* cRecording::Name | ( | void | ) | const [inline] |
Definition at line 119 of file recording.h.
References name.
const char* cRecording::Name | ( | void | ) | const [inline] |
Definition at line 119 of file include/vdr/recording.h.
References name.
Referenced by cSVDRP::CmdCPYR(), cSVDRP::CmdMOVR(), cMenuEditRecording::cMenuEditRecording(), cReplayControl::cReplayControl(), CutRecording(), GenerateIndex(), cMenuEditRecording::ProcessKey(), cRecordings::ScanVideoDir(), cSkinClassicDisplayMenu::SetRecording(), cSkinCursesDisplayMenu::SetRecording(), and cSkinSTTNGDisplayMenu::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.
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 1057 of file recording.c.
References FileName(), GetLength(), IsPesRecording(), LastModifiedTime(), MININDEXAGE, and numFrames.
Referenced by LengthInSeconds(), and cRecordings::ScanVideoDir().
cRecording& cRecording::operator= | ( | const cRecording & | ) | [private] |
cRecording& cRecording::operator= | ( | const cRecording & | ) | [private] |
const char* cRecording::PrefixFileName | ( | char | Prefix | ) |
const char * cRecording::PrefixFileName | ( | char | Prefix | ) |
Definition at line 924 of file recording.c.
References fileName, FileName(), and PrefixVideoFileName().
Referenced by cCutter::Start().
int cRecording::Priority | ( | void | ) | const [inline] |
Definition at line 115 of file recording.h.
References priority.
int cRecording::Priority | ( | void | ) | const [inline] |
Definition at line 115 of file include/vdr/recording.h.
References priority.
Referenced by AssertFreeDiskSpace().
void cRecording::ReadInfo | ( | void | ) |
void cRecording::ReadInfo | ( | void | ) |
Definition at line 963 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 1015 of file recording.c.
References DELEXT, endswith(), esyslog, FileName(), isyslog, and RemoveVideoFile().
Referenced by cRemoveDeletedRecordingsThread::Action(), and AssertFreeDiskSpace().
bool cRecording::Remove | ( | void | ) |
Actually removes the file from the disk Returns false in case of error.
void cRecording::ResetResume | ( | void | ) | const |
Definition at line 1052 of file recording.c.
References resume, and RESUME_NOT_INITIALIZED.
void cRecording::ResetResume | ( | void | ) | const |
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!
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 984 of file recording.c.
References fileName, start, and Start().
Referenced by cCutter::Start().
char* cRecording::SortName | ( | void | ) | const [private] |
char * cRecording::SortName | ( | void | ) | const [private] |
Definition at line 820 of file recording.c.
References FileName(), MALLOC, sortBuffer, StripEpisodeName(), strreplace(), and VideoDirectory.
Referenced by Compare().
time_t cRecording::Start | ( | void | ) | const [inline] |
Definition at line 114 of file include/vdr/recording.h.
References start.
Referenced by AssertFreeDiskSpace(), cMenuEditRecording::cMenuEditRecording(), cSkinClassicDisplayMenu::SetRecording(), cSkinCursesDisplayMenu::SetRecording(), cSkinSTTNGDisplayMenu::SetRecording(), SetStartTime(), and cCutter::Start().
time_t cRecording::Start | ( | void | ) | const [inline] |
Definition at line 114 of file recording.h.
References start.
char * cRecording::StripEpisodeName | ( | char * | s | ) | [static, private] |
Definition at line 800 of file recording.c.
Referenced by SortName().
static char* cRecording::StripEpisodeName | ( | char * | s | ) | [static, private] |
const char* cRecording::Title | ( | char | Delimiter = ' ' , |
bool | NewIndicator = false , |
||
int | Level = -1 |
||
) | const |
const char * cRecording::Title | ( | char | Delimiter = ' ' , |
bool | NewIndicator = false , |
||
int | Level = -1 |
||
) | const |
Definition at line 863 of file recording.c.
References FOLDERDELIMCHAR, HierarchyLevels(), IsNew(), LengthInSeconds(), MALLOC, max(), name, cString::sprintf(), start, stripspace(), strn0cpy(), and titleBuffer.
Referenced by cSVDRP::CmdEDIT(), cSVDRP::CmdLSTR(), cSVDRP::CmdPLAY(), cMenuRecordingItem::cMenuRecordingItem(), cRecording(), and cMenuRecordings::Play().
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 1026 of file recording.c.
References DELEXT, esyslog, FileName(), isyslog, RECEXT, and RenameVideoFile().
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
const char* cRecording::UpdateFileName | ( | const char * | FileName | ) |
const char * cRecording::UpdateFileName | ( | const char * | FileName | ) |
bool cRecording::WriteInfo | ( | void | ) |
Definition at line 971 of file recording.c.
References fileName, info, INFOFILESUFFIX, isPesRecording, LOG_ERROR_STR, cString::sprintf(), and cRecordingInfo::Write().
Referenced by cCutter::Start().
bool cRecording::WriteInfo | ( | void | ) |
cRecordings [friend] |
Definition at line 84 of file include/vdr/recording.h.
int cRecording::channel [private] |
Definition at line 93 of file include/vdr/recording.h.
Referenced by cRecording(), and FileName().
time_t cRecording::deleted [private] |
Definition at line 109 of file include/vdr/recording.h.
Referenced by cRecording(), cRecordings::DelByName(), Deleted(), and cRecordings::ScanVideoDir().
char * cRecording::fileName [mutable, private] |
Definition at line 89 of file include/vdr/recording.h.
Referenced by cRecording(), cRecordings::DelByName(), FileName(), PrefixFileName(), SetStartTime(), UpdateFileName(), WriteInfo(), and ~cRecording().
int cRecording::fileSizeMB [mutable, private] |
Definition at line 91 of file include/vdr/recording.h.
Referenced by cRecording(), and FileSizeMB().
double cRecording::framesPerSecond [private] |
Definition at line 96 of file include/vdr/recording.h.
Referenced by cRecording(), FramesPerSecond(), and ReadInfo().
cRecordingInfo * cRecording::info [private] |
Definition at line 97 of file include/vdr/recording.h.
Referenced by cRecording(), Info(), ReadInfo(), WriteInfo(), and ~cRecording().
int cRecording::instanceId [private] |
Definition at line 94 of file include/vdr/recording.h.
Referenced by cRecording(), and FileName().
bool cRecording::isPesRecording [private] |
Definition at line 95 of file include/vdr/recording.h.
Referenced by cRecording(), FileName(), GetResume(), IsPesRecording(), and WriteInfo().
int cRecording::lifetime [private] |
Definition at line 108 of file include/vdr/recording.h.
Referenced by cRecording(), FileName(), Lifetime(), and ReadInfo().
char * cRecording::name [mutable, private] |
Definition at line 90 of file include/vdr/recording.h.
Referenced by cRecording(), FileName(), HierarchyLevels(), IsEdited(), Name(), Title(), and ~cRecording().
int cRecording::numFrames [mutable, private] |
Definition at line 92 of file include/vdr/recording.h.
Referenced by cRecording(), and NumFrames().
int cRecording::priority [private] |
Definition at line 107 of file include/vdr/recording.h.
Referenced by cRecording(), FileName(), Priority(), and ReadInfo().
int cRecording::resume [mutable, private] |
Definition at line 86 of file include/vdr/recording.h.
Referenced by cRecording(), GetResume(), and ResetResume().
char * cRecording::sortBuffer [mutable, private] |
Definition at line 88 of file include/vdr/recording.h.
Referenced by cRecording(), SortName(), and ~cRecording().
time_t cRecording::start [private] |
Definition at line 106 of file include/vdr/recording.h.
Referenced by cRecording(), FileName(), SetStartTime(), Start(), and Title().
char * cRecording::titleBuffer [mutable, private] |
Definition at line 87 of file include/vdr/recording.h.
Referenced by cRecording(), Title(), and ~cRecording().