vdr
2.2.0
|
#include <time.h>
#include "channels.h"
#include "config.h"
#include "epg.h"
#include "thread.h"
#include "timers.h"
#include "tools.h"
Go to the source code of this file.
Classes | |
class | cResumeFile |
class | cRecordingInfo |
class | cRecording |
class | cRecordings |
class | cRecordingsHandler |
class | cMark |
class | cMarks |
class | cRecordingUserCommand |
class | cIndexFile |
class | cFileName |
Macros | |
#define | FOLDERDELIMCHAR '~' |
#define | DEFAULTFRAMESPERSECOND 25.0 |
#define | RUC_BEFORERECORDING "before" |
#define | RUC_STARTRECORDING "started" |
#define | RUC_AFTERRECORDING "after" |
#define | RUC_EDITEDRECORDING "edited" |
#define | RUC_DELETERECORDING "deleted" |
#define | MAXFRAMESIZE (KILOBYTE(1024) / TS_SIZE * TS_SIZE) |
#define | MAXVIDEOFILESIZETS 1048570 |
#define | MAXVIDEOFILESIZEPES 2000 |
#define | MINVIDEOFILESIZE 100 |
#define | MAXVIDEOFILESIZEDEFAULT MAXVIDEOFILESIZEPES |
Enumerations | |
enum | eRecordingUsage { ruNone = 0x0000, ruTimer = 0x0001, ruReplay = 0x0002, ruCut = 0x0004, ruMove = 0x0008, ruCopy = 0x0010, ruSrc = 0x0020, ruDst = 0x0040, ruPending = 0x0080 } |
enum | eRecordingsSortMode { rsmName, rsmTime } |
Functions | |
void | RemoveDeletedRecordings (void) |
void | ClearVanishedRecordings (void) |
void | AssertFreeDiskSpace (int Priority=0, bool Force=false) |
cString | IndexToHMSF (int Index, bool WithFrame=false, double FramesPerSecond=DEFAULTFRAMESPERSECOND) |
int | HMSFToIndex (const char *HMSF, double FramesPerSecond=DEFAULTFRAMESPERSECOND) |
int | SecondsToFrames (int Seconds, double FramesPerSecond=DEFAULTFRAMESPERSECOND) |
int | ReadFrame (cUnbufferedFile *f, uchar *b, int Length, int Max) |
char * | ExchangeChars (char *s, bool ToFileSystem) |
bool | GenerateIndex (const char *FileName, bool Update=false) |
bool | HasRecordingsSortMode (const char *Directory) |
void | GetRecordingsSortMode (const char *Directory) |
void | SetRecordingsSortMode (const char *Directory, eRecordingsSortMode SortMode) |
void | IncRecordingsSortMode (const char *Directory) |
#define DEFAULTFRAMESPERSECOND 25.0 |
Definition at line 333 of file recording.h.
Referenced by cRecorder::Action(), cFrameDetector::Analyze(), cRecording::cRecording(), cRecordingInfo::cRecordingInfo(), cPlayer::FramesPerSecond(), and cFileName::Number().
#define FOLDERDELIMCHAR '~' |
Definition at line 21 of file recording.h.
Referenced by cMenuRecordingEdit::Action(), AddRecordingFolders(), cMenuPathEdit::ApplyChanges(), cMenuRecordingEdit::ApplyChanges(), cRecording::BaseName(), cSVDRP::CmdCPYR(), cMenuPathEdit::cMenuPathEdit(), cMenuRecordings::cMenuRecordings(), cRecording::cRecording(), cMenuFolder::DescendPath(), ExchangeChars(), cRecording::Folder(), cMenuFolder::GetFolder(), cRecording::HierarchyLevels(), cMenuRecordings::Info(), cRecording::IsEdited(), cRecording::IsInPath(), LimitNameLengths(), NeedsConversion(), cMenuRecordings::Open(), cMenuRecordingEdit::RemoveName(), cMenuFolder::Select(), cMenuRecordings::Set(), cMenuTimerItem::Set(), cMenuEditTimer::SetFolder(), and cRecording::Title().
Definition at line 410 of file recording.h.
Referenced by cDvbPlayer::Action(), cCuttingThread::FramesAreEqual(), cCuttingThread::GetPendingPackets(), cDvbPlayer::Goto(), cCuttingThread::LoadFrame(), and cCuttingThread::ProcessSequence().
#define MAXVIDEOFILESIZEDEFAULT MAXVIDEOFILESIZEPES |
Definition at line 420 of file recording.h.
Referenced by cSetup::cSetup(), and main().
#define MAXVIDEOFILESIZEPES 2000 |
Definition at line 418 of file recording.h.
Referenced by cCuttingThread::cCuttingThread().
#define MAXVIDEOFILESIZETS 1048570 |
Definition at line 417 of file recording.h.
Referenced by cMenuSetupRecord::cMenuSetupRecord(), and main().
#define MINVIDEOFILESIZE 100 |
Definition at line 419 of file recording.h.
Referenced by cMenuSetupRecord::cMenuSetupRecord(), and main().
#define RUC_AFTERRECORDING "after" |
Definition at line 397 of file recording.h.
Referenced by cRecordControl::Stop().
#define RUC_BEFORERECORDING "before" |
Definition at line 395 of file recording.h.
Referenced by cRecordControl::cRecordControl().
#define RUC_DELETERECORDING "deleted" |
Definition at line 399 of file recording.h.
Referenced by cRecording::Delete().
#define RUC_EDITEDRECORDING "edited" |
Definition at line 398 of file recording.h.
Referenced by cCutter::Active().
#define RUC_STARTRECORDING "started" |
Definition at line 396 of file recording.h.
Referenced by cRecorder::Action().
enum eRecordingsSortMode |
Enumerator | |
---|---|
rsmName | |
rsmTime |
Definition at line 504 of file recording.h.
enum eRecordingUsage |
Enumerator | |
---|---|
ruNone | |
ruTimer | |
ruReplay | |
ruCut | |
ruMove | |
ruCopy | |
ruSrc | |
ruDst | |
ruPending |
Definition at line 28 of file recording.h.
void AssertFreeDiskSpace | ( | int | Priority = 0 , |
bool | Force = false |
||
) |
The special Priority value -1 means that we shall get rid of any deleted recordings faster than normal (because we're cutting).
If Force is true, the check will be done even if the timeout hasn't expired yet.
Definition at line 149 of file recording.c.
References cListBase::Count(), cListBase::Del(), cRecording::Delete(), DeletedRecordings(), DISKCHECKDELTA, cList< T >::First(), cRecording::IsEdited(), cRecording::IsOnVideoDirectoryFileSystem(), isyslog, cRecording::Lifetime(), cLockFile::Lock(), MAXLIFETIME, MINDISKSPACE, mtWarning, cVideoDirectory::Name(), cList< T >::Next(), cRecording::Priority(), cSkins::QueueMessage(), Recordings, cRecording::Remove(), REMOVELATENCY, SECSINDAY, Skins, cRecording::Start(), tr, cRecordings::Update(), and cVideoDirectory::VideoFileSpaceAvailable().
Referenced by cRecordControl::Process(), cCuttingThread::ProcessSequence(), and cRecordControls::Start().
void ClearVanishedRecordings | ( | void | ) |
Definition at line 232 of file recording.c.
References cListBase::Clear(), and Recordings.
Referenced by main().
char* ExchangeChars | ( | char * | s, |
bool | ToFileSystem | ||
) |
Definition at line 582 of file recording.c.
References tCharExchange::a, DirectoryEncoding, esyslog, FOLDERDELIMCHAR, and NeedsConversion().
Referenced by cMenuRecordingEdit::Action(), cSVDRP::CmdCPYR(), cRecording::cRecording(), cMenuRecordings::DirectoryName(), cRecording::FileName(), and cFileName::Number().
bool GenerateIndex | ( | const char * | FileName, |
bool | Update = false |
||
) |
Generates the index of the existing recording with the given FileName.
If Update is true, an existing index file will be checked whether it is complete, and will be updated if it isn't. Otherwise an existing index file will be removed before a new one is generated.
Definition at line 2777 of file recording.c.
References cThread::Active(), AddDirectory(), DirectoryOk(), INDEXFILECHECKINTERVAL, cIndexFile::IndexFileName(), INDEXFILESUFFIX, cRecording::IsPesRecording(), cRecording::Name(), and cCondWait::SleepMs().
Referenced by main(), and cFileName::Number().
void GetRecordingsSortMode | ( | const char * | Directory | ) |
Definition at line 3028 of file recording.c.
References AddDirectory(), constrain(), cIndexFile::f, RecordingsSortMode, rsmName, rsmTime, and SORTMODEFILE.
Referenced by IncRecordingsSortMode(), and cMenuRecordings::Set().
bool HasRecordingsSortMode | ( | const char * | Directory | ) |
Definition at line 3023 of file recording.c.
References AddDirectory(), and SORTMODEFILE.
Referenced by cRecordControl::cRecordControl().
int HMSFToIndex | ( | const char * | HMSF, |
double | FramesPerSecond = DEFAULTFRAMESPERSECOND |
||
) |
Definition at line 2987 of file recording.c.
References cIndexFile::f.
Referenced by cSVDRP::CmdPLAY(), cFileName::Number(), and cMark::Parse().
void IncRecordingsSortMode | ( | const char * | Directory | ) |
Definition at line 3047 of file recording.c.
References GetRecordingsSortMode(), RecordingsSortMode, rsmTime, and SetRecordingsSortMode().
Referenced by cMenuRecordings::Sort().
cString IndexToHMSF | ( | int | Index, |
bool | WithFrame = false , |
||
double | FramesPerSecond = DEFAULTFRAMESPERSECOND |
||
) |
Definition at line 2971 of file recording.c.
References cIndexFile::f, and cString::sprintf().
Referenced by cDvbPlayer::Action(), cMarks::Align(), cFileName::Number(), cReplayControl::ShowProgress(), and cMark::ToText().
int ReadFrame | ( | cUnbufferedFile * | f, |
uchar * | b, | ||
int | Length, | ||
int | Max | ||
) |
Definition at line 3005 of file recording.c.
References esyslog, LOG_ERROR, and cUnbufferedFile::Read().
Referenced by cDvbPlayer::Goto(), cCuttingThread::LoadFrame(), and cFileName::Number().
void RemoveDeletedRecordings | ( | void | ) |
Definition at line 132 of file recording.c.
References cThread::Active(), DELETEDLIFETIME, DeletedRecordings(), cList< T >::First(), cList< T >::Next(), REMOVECHECKDELTA, and cThread::Start().
Referenced by main().
int SecondsToFrames | ( | int | Seconds, |
double | FramesPerSecond = DEFAULTFRAMESPERSECOND |
||
) |
Definition at line 2998 of file recording.c.
Referenced by cReplayControl::EditTest(), cReplayControl::MarkJump(), cFileName::Number(), cDvbPlayer::SkipSeconds(), and cReplayControl::TimeSearchProcess().
void SetRecordingsSortMode | ( | const char * | Directory, |
eRecordingsSortMode | SortMode | ||
) |
Definition at line 3039 of file recording.c.
References AddDirectory(), cIndexFile::f, SORTMODEFILE, and cString::sprintf().
Referenced by cRecordControl::cRecordControl(), and IncRecordingsSortMode().
cRecordings DeletedRecordings |
Referenced by cRecordings::ChangeState(), main(), and cVideoDirectory::VideoDiskSpace().
bool DirectoryEncoding |
Definition at line 76 of file recording.c.
Referenced by ExchangeChars(), main(), and NeedsConversion().
int DirectoryNameMax |
Definition at line 75 of file recording.c.
Referenced by cRecording::FileName(), and main().
int DirectoryPathMax |
Definition at line 74 of file recording.c.
Referenced by cRecording::FileName(), and main().
int InstanceId |
Definition at line 77 of file recording.c.
Referenced by cRecording::cRecording(), and main().
cRecordings Recordings |
Any access to Recordings that loops through the list of recordings needs to hold a thread lock on this object!
Definition at line 1365 of file recording.c.
Referenced by cRecorder::Action(), cCuttingThread::Action(), cMenuRecordingEdit::Action(), AddRecordingFolders(), cMenuPathEdit::ApplyChanges(), AssertFreeDiskSpace(), cRecording::ChangeName(), cRecording::ChangePriorityLifetime(), cRecordings::ChangeState(), ClearVanishedRecordings(), cSVDRP::CmdCPYR(), cSVDRP::CmdDELR(), cSVDRP::CmdMOVR(), cSVDRP::CmdUPDR(), cMenuPathEdit::cMenuPathEdit(), cMenuRecording::cMenuRecording(), cMenuRecordingEdit::cMenuRecordingEdit(), cMenuRecordings::cMenuRecordings(), cMenuTimers::Commands(), cRecordControl::cRecordControl(), cResumeFile::Delete(), cMenuRecordings::Delete(), cReplayControl::GetInfo(), cReplayControl::GetRecording(), cVideoDiskUsage::HasChanged(), cReplayControl::LastReplayed(), main(), cMenuRecordings::ProcessKey(), cMenuSetupOSD::ProcessKey(), cMenuRecordingEdit::RefreshRecording(), cMenuRecording::RefreshRecording(), cResumeFile::Save(), cMenuFolder::Set(), cMenuRecordings::Set(), SetTrackDescriptions(), cReplayControl::ShowProgress(), cCutter::Start(), cCutter::Stop(), cReplayControl::Stop(), and cMenuSetupReplay::Store().
cRecordingsHandler RecordingsHandler |
Definition at line 1910 of file recording.c.
Referenced by cMenuRecordingEdit::Action(), cSVDRP::CmdCPYR(), cSVDRP::CmdEDIT(), cShutdownHandler::ConfirmRestart(), cShutdownHandler::ConfirmShutdown(), cMenuRecordings::Delete(), cReplayControl::EditCut(), cRecording::IsInUse(), main(), cVideoDirectory::Move(), cMenuMain::ProcessKey(), and cMenuMain::Update().
eRecordingsSortMode RecordingsSortMode |
Definition at line 3021 of file recording.c.
Referenced by GetRecordingsSortMode(), IncRecordingsSortMode(), cMenuRecordings::Set(), and cRecording::SortName().