|
vdr 2.8.3
|
#include <time.h>#include "channels.h"#include "config.h"#include "epg.h"#include "thread.h"#include "timers.h"#include "tools.h"#include "remux.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 | cErrors |
| class | cRecordingUserCommand |
| class | cIndexFile |
| class | cFileName |
| class | cDoneRecordings |
Macros | |
| #define | FOLDERDELIMCHAR '~' |
| #define | LOCK_RECORDINGS_READ USE_LIST_LOCK_READ(Recordings) |
| #define | LOCK_RECORDINGS_WRITE USE_LIST_LOCK_WRITE(Recordings) |
| #define | LOCK_DELETEDRECORDINGS_READ USE_LIST_LOCK_READ2(Recordings, DeletedRecordings) |
| #define | LOCK_DELETEDRECORDINGS_WRITE USE_LIST_LOCK_WRITE2(Recordings, DeletedRecordings) |
| #define | DEFAULTFRAMESPERSECOND 25.0 |
| #define | RUC_BEFORERECORDING "before" |
| #define | RUC_STARTRECORDING "started" |
| #define | RUC_AFTERRECORDING "after" |
| #define | RUC_EDITINGRECORDING "editing" |
| #define | RUC_EDITEDRECORDING "edited" |
| #define | RUC_DELETERECORDING "deleted" |
| #define | RUC_RENAMEDRECORDING "renamed" |
| #define | RUC_MOVEDRECORDING "moved" |
| #define | RUC_COPYINGRECORDING "copying" |
| #define | RUC_COPIEDRECORDING "copied" |
| #define | MAXFRAMESIZE (3 * 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 , ruCanceled = 0x8000 } |
| enum | eRecordingsSortDir { rsdAscending , rsdDescending } |
| enum | eRecordingsSortMode { rsmName , rsmTime } |
Functions | |
| void | RemoveDeletedRecordings (void) |
| void | AssertFreeDiskSpace (int Priority=0, bool Force=false) |
| DEF_LIST_LOCK (Recordings) | |
| DEF_LIST_LOCK2 (Recordings, DeletedRecordings) | |
| 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 | GenerateIndex (const char *FileName, bool Update) |
| bool | HasRecordingsSortMode (const char *Directory) |
| void | GetRecordingsSortMode (const char *Directory) |
| void | SetRecordingsSortMode (const char *Directory, eRecordingsSortMode SortMode) |
| void | IncRecordingsSortMode (const char *Directory) |
| void | SetRecordingTimerId (const char *Directory, const char *TimerId) |
| cString | GetRecordingTimerId (const char *Directory) |
| void | ClrRecordingTimerId (const char *Directory) |
| int | FileSizeMBafterEdit (const char *FileName) |
| bool | EnoughFreeDiskSpaceForEdit (const char *FileName) |
| #define DEFAULTFRAMESPERSECOND 25.0 |
Definition at line 408 of file recording.h.
Referenced by cRecorder::Action(), cFrameDetector::Analyze(), cRecordingInfo::cRecordingInfo(), cRecordingInfo::cRecordingInfo(), cControl::FramesPerSecond(), and cPlayer::FramesPerSecond().
| #define FOLDERDELIMCHAR '~' |
Definition at line 22 of file recording.h.
Referenced by AddRecordingFolders(), cMenuPathEdit::ApplyChanges(), cMenuRecordingEdit::ApplyChanges(), cRecording::BaseName(), cMenuPathEdit::cMenuPathEdit(), cRecording::cRecording(), cRecording::cRecording(), cMenuFolder::DescendPath(), ExchangeChars(), cRecording::Folder(), cMenuFolder::GetFolder(), cRecording::HierarchyLevels(), cMenuRecordings::Info(), cRecording::IsEdited(), cRecording::IsInPath(), LimitNameLengths(), cTimer::Matches(), NeedsConversion(), cMenuRecordings::Open(), cMenuRecordingEdit::RemoveName(), cMenuFolder::Select(), cMenuRecordings::Set(), cMenuTimerItem::Set(), cMenuEditTimer::SetFolder(), cMenuEditTimer::SetPatternItem(), cRecordControl::Stop(), and cRecording::Title().
| #define LOCK_DELETEDRECORDINGS_READ USE_LIST_LOCK_READ2(Recordings, DeletedRecordings) |
Definition at line 354 of file recording.h.
Referenced by AssertFreeDiskSpace(), RemoveDeletedRecordings(), cMenuMain::Update(), and cVideoDirectory::VideoDiskSpace().
| #define LOCK_DELETEDRECORDINGS_WRITE USE_LIST_LOCK_WRITE2(Recordings, DeletedRecordings) |
Definition at line 355 of file recording.h.
Referenced by cRemoveDeletedRecordingsThread::Action(), AssertFreeDiskSpace(), cSVDRPServer::CmdDELR(), cRecordings::DelByName(), and cReplayControl::Stop().
| #define LOCK_RECORDINGS_READ USE_LIST_LOCK_READ(Recordings) |
Definition at line 352 of file recording.h.
Referenced by cMenuPathEdit::ApplyChanges(), cSVDRPServer::CmdEDIT(), cSVDRPServer::CmdLSTR(), cSVDRPServer::CmdPLAY(), cMenuPathEdit::cMenuPathEdit(), cMenuRecordings::Delete(), cReplayControl::GetInfo(), cReplayControl::GetRecording(), cVideoDiskUsage::HasChanged(), cReplayControl::LastReplayed(), cMenuRecordingItem::SetMenuItem(), SetTrackDescriptions(), and cReplayControl::ShowProgress().
| #define LOCK_RECORDINGS_WRITE USE_LIST_LOCK_WRITE(Recordings) |
Definition at line 353 of file recording.h.
Referenced by cIndexFileGenerator::Action(), cRecorder::Action(), cRecordingsHandler::Action(), cMenuPathEdit::ApplyChanges(), AssertFreeDiskSpace(), cSVDRPServer::CmdDELR(), cSVDRPServer::CmdMOVR(), cSVDRPServer::CmdUPDR(), cRecordControl::cRecordControl(), cResumeFile::Delete(), cRecorder::HandleErrors(), cMenuSetupOSD::ProcessKey(), cReplayControl::Stop(), and cMenuSetupReplay::Store().
Definition at line 504 of file recording.h.
Referenced by cDvbPlayer::Action(), cCuttingThread::FramesAreEqual(), cRecorder::GetLastPts(), cCuttingThread::GetPendingPackets(), cDvbPlayer::Goto(), cCuttingThread::LoadFrame(), cPes2TsConverter::MakeTs(), cCuttingThread::ProcessSequence(), and cPesFile::Read().
| #define MAXVIDEOFILESIZEDEFAULT MAXVIDEOFILESIZEPES |
Definition at line 514 of file recording.h.
Referenced by cSetup::cSetup(), and main().
| #define MAXVIDEOFILESIZEPES 2000 |
Definition at line 512 of file recording.h.
Referenced by cCuttingThread::cCuttingThread().
| #define MAXVIDEOFILESIZETS 1048570 |
Definition at line 511 of file recording.h.
Referenced by cMenuSetupRecord::cMenuSetupRecord(), and main().
| #define MINVIDEOFILESIZE 100 |
Definition at line 513 of file recording.h.
Referenced by cMenuSetupRecord::cMenuSetupRecord(), and main().
| #define RUC_AFTERRECORDING "after" |
Definition at line 486 of file recording.h.
Referenced by cRecordControl::Stop().
| #define RUC_BEFORERECORDING "before" |
Definition at line 484 of file recording.h.
Referenced by cRecordControl::cRecordControl().
| #define RUC_COPIEDRECORDING "copied" |
Definition at line 493 of file recording.h.
Referenced by cRecordingsHandlerEntry::Active().
| #define RUC_COPYINGRECORDING "copying" |
Definition at line 492 of file recording.h.
Referenced by cRecordingsHandlerEntry::Active().
| #define RUC_DELETERECORDING "deleted" |
Definition at line 489 of file recording.h.
Referenced by cRecording::Delete().
| #define RUC_EDITEDRECORDING "edited" |
Definition at line 488 of file recording.h.
Referenced by cCutter::Active().
| #define RUC_EDITINGRECORDING "editing" |
Definition at line 487 of file recording.h.
Referenced by cCutter::Start().
| #define RUC_MOVEDRECORDING "moved" |
Definition at line 491 of file recording.h.
Referenced by cRecordingsHandlerEntry::Active(), and cVideoDirectory::Move().
| #define RUC_RENAMEDRECORDING "renamed" |
Definition at line 490 of file recording.h.
Referenced by cVideoDirectory::Move().
| #define RUC_STARTRECORDING "started" |
Definition at line 485 of file recording.h.
Referenced by cRecorder::Action().
| enum eRecordingsSortDir |
| Enumerator | |
|---|---|
| rsdAscending | |
| rsdDescending | |
Definition at line 620 of file recording.h.
| enum eRecordingsSortMode |
| Enumerator | |
|---|---|
| rsmName | |
| rsmTime | |
Definition at line 621 of file recording.h.
| enum eRecordingUsage |
| Enumerator | |
|---|---|
| ruNone | |
| ruTimer | |
| ruReplay | |
| ruCut | |
| ruMove | |
| ruCopy | |
| ruSrc | |
| ruDst | |
| ruPending | |
| ruCanceled | |
Definition at line 29 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 152 of file recording.c.
References AssertFreeDiskSpace(), cRecording::Delete(), cRecording::Deleted(), DISKCHECKDELTA, cRecording::IsEdited(), cRecording::IsOnVideoDirectoryFileSystem(), isyslog, cRecording::Lifetime(), cLockFile::Lock(), LOCK_DELETEDRECORDINGS_READ, LOCK_DELETEDRECORDINGS_WRITE, LOCK_RECORDINGS_WRITE, MAXLIFETIME, MINDISKSPACE, mtWarning, Mutex, cVideoDirectory::Name(), cListObject::Next(), cRecording::Priority(), cSkins::QueueMessage(), cRecording::Remove(), REMOVELATENCY, SECSINDAY, Skins, cRecording::Start(), tr, cRecordings::Update(), and cVideoDirectory::VideoFileSpaceAvailable().
Referenced by AssertFreeDiskSpace(), main(), cCuttingThread::ProcessSequence(), and cRecordControls::Start().
| void ClrRecordingTimerId | ( | const char * | Directory | ) |
Definition at line 3679 of file recording.c.
References ClrRecordingTimerId(), dsyslog, GetRecordingTimerId(), SetRecordingTimerId(), Setup, and cSetup::SVDRPHostName.
Referenced by ClrRecordingTimerId(), and cVideoDirectoryScannerThread::ScanVideoDir().
| DEF_LIST_LOCK | ( | Recordings | ) |
References DEF_LIST_LOCK.
| DEF_LIST_LOCK2 | ( | Recordings | , |
| DeletedRecordings | ) |
References DEF_LIST_LOCK2.
| bool EnoughFreeDiskSpaceForEdit | ( | const char * | FileName | ) |
Definition at line 3709 of file recording.c.
References DirSizeMB(), cCutter::EditedFileName(), EnoughFreeDiskSpaceForEdit(), FileSizeMBafterEdit(), cRecordingsHandler::GetRequiredDiskSpaceMB(), MINDISKSPACE, RecordingsHandler, and cVideoDirectory::VideoDiskSpace().
Referenced by cMenuRecordingEdit::Action(), cSVDRPServer::CmdEDIT(), cReplayControl::EditCut(), and EnoughFreeDiskSpaceForEdit().
| char * ExchangeChars | ( | char * | s, |
| bool | ToFileSystem ) |
Definition at line 757 of file recording.c.
References tCharExchange::a, CharExchange, DirectoryEncoding, esyslog, ExchangeChars(), FOLDERDELIMCHAR, and NeedsConversion().
Referenced by cRecording::cRecording(), cMenuRecordings::DirectoryName(), ExchangeChars(), and cRecording::FileName().
| int FileSizeMBafterEdit | ( | const char * | FileName | ) |
Definition at line 3694 of file recording.c.
References DirSizeMB(), FileSizeMBafterEdit(), max(), cRecording::NumFrames(), and cRecording::NumFramesAfterEdit().
Referenced by EnoughFreeDiskSpaceForEdit(), FileSizeMBafterEdit(), and cRecordingsHandler::GetRequiredDiskSpaceMB().
| bool GenerateIndex | ( | const char * | FileName | ) |
Generates the index of the existing recording with the given FileName.
An existing index file will be removed before a new one is generated.
Definition at line 3273 of file recording.c.
References cThread::Active(), AddDirectory(), cIndexFileGenerator::cIndexFileGenerator(), DirectoryOk(), GenerateIndex(), INDEXFILECHECKINTERVAL, INDEXFILESUFFIX, cRecording::IsPesRecording(), cRecording::Name(), and cCondWait::SleepMs().
Referenced by GenerateIndex(), GenerateIndex(), and main().
|
inline |
Definition at line 618 of file recording.h.
References GenerateIndex().
| void GetRecordingsSortMode | ( | const char * | Directory | ) |
Definition at line 3616 of file recording.c.
References AddDirectory(), constrain(), cSetup::DefaultSortModeRec, GetRecordingsSortMode(), RecordingsSortMode, rsmTime, Setup, and SORTMODEFILE.
Referenced by GetRecordingsSortMode(), IncRecordingsSortMode(), and cMenuRecordings::Set().
| cString GetRecordingTimerId | ( | const char * | Directory | ) |
Definition at line 3664 of file recording.c.
References AddDirectory(), GetRecordingTimerId(), stripspace(), and TIMERRECFILE.
Referenced by ClrRecordingTimerId(), GetRecordingTimerId(), and TimerStillRecording().
| bool HasRecordingsSortMode | ( | const char * | Directory | ) |
Definition at line 3611 of file recording.c.
References AddDirectory(), HasRecordingsSortMode(), and SORTMODEFILE.
Referenced by HasRecordingsSortMode().
| int HMSFToIndex | ( | const char * | HMSF, |
| double | FramesPerSecond = DEFAULTFRAMESPERSECOND ) |
Definition at line 3575 of file recording.c.
References HMSFToIndex().
Referenced by cSVDRPServer::CmdPLAY(), HMSFToIndex(), and cMark::Parse().
| void IncRecordingsSortMode | ( | const char * | Directory | ) |
Definition at line 3635 of file recording.c.
References GetRecordingsSortMode(), IncRecordingsSortMode(), RecordingsSortMode, rsmTime, and SetRecordingsSortMode().
Referenced by IncRecordingsSortMode(), and cMenuRecordings::Sort().
| cString IndexToHMSF | ( | int | Index, |
| bool | WithFrame = false, | ||
| double | FramesPerSecond = DEFAULTFRAMESPERSECOND ) |
Definition at line 3559 of file recording.c.
References IndexToHMSF(), and cString::sprintf().
Referenced by cDvbPlayer::Action(), IndexToHMSF(), cReplayControl::ShowProgress(), and cMark::ToText().
| int ReadFrame | ( | cUnbufferedFile * | f, |
| uchar * | b, | ||
| int | Length, | ||
| int | Max ) |
Definition at line 3593 of file recording.c.
References esyslog, LOG_ERROR, cUnbufferedFile::Read(), and ReadFrame().
Referenced by cRecorder::GetLastPts(), cDvbPlayer::Goto(), cCuttingThread::LoadFrame(), and ReadFrame().
| void RemoveDeletedRecordings | ( | void | ) |
Definition at line 135 of file recording.c.
References cThread::Active(), LOCK_DELETEDRECORDINGS_READ, cListObject::Next(), REMOVECHECKDELTA, RemoveDeletedRecordings(), RemoveDeletedRecordingsThread, and cThread::Start().
Referenced by main(), and RemoveDeletedRecordings().
| int SecondsToFrames | ( | int | Seconds, |
| double | FramesPerSecond = DEFAULTFRAMESPERSECOND ) |
Definition at line 3586 of file recording.c.
References SecondsToFrames().
Referenced by cReplayControl::EditTest(), cReplayControl::MarkJump(), SecondsToFrames(), cDvbPlayer::SkipSeconds(), and cReplayControl::TimeSearchProcess().
| void SetRecordingsSortMode | ( | const char * | Directory, |
| eRecordingsSortMode | SortMode ) |
Definition at line 3627 of file recording.c.
References AddDirectory(), SetRecordingsSortMode(), SORTMODEFILE, and cString::sprintf().
Referenced by IncRecordingsSortMode(), and SetRecordingsSortMode().
| void SetRecordingTimerId | ( | const char * | Directory, |
| const char * | TimerId ) |
Definition at line 3646 of file recording.c.
References AddDirectory(), dsyslog, LOG_ERROR_STR, SetRecordingTimerId(), and TIMERRECFILE.
Referenced by cIndexFileGenerator::Action(), ClrRecordingTimerId(), cRecordControl::cRecordControl(), cRecordingTimerId::cRecordingTimerId(), SetRecordingTimerId(), cCutter::Start(), cCutter::Stop(), cRecordControl::Stop(), and cRecordingTimerId::~cRecordingTimerId().
|
extern |
Definition at line 76 of file recording.c.
Referenced by ExchangeChars(), main(), and NeedsConversion().
|
extern |
Definition at line 75 of file recording.c.
Referenced by cRecording::FileName(), and main().
|
extern |
Definition at line 74 of file recording.c.
Referenced by cRecording::FileName(), and main().
|
extern |
Definition at line 3466 of file recording.c.
Referenced by main(), cTimer::Matches(), and cRecordControl::Stop().
|
extern |
Definition at line 77 of file recording.c.
Referenced by cRecording::cRecording(), and main().
|
extern |
Definition at line 2268 of file recording.c.
Referenced by cMenuRecordingEdit::Action(), cSVDRPServer::CmdEDIT(), cShutdownHandler::ConfirmRestart(), cShutdownHandler::ConfirmShutdown(), cMenuRecordings::Delete(), cReplayControl::EditCut(), EnoughFreeDiskSpaceForEdit(), cRecording::IsInUse(), main(), cVideoDirectory::Move(), cMenuMain::ProcessKey(), cMenuRecordings::Set(), and cMenuMain::Update().
|
extern |
Definition at line 3609 of file recording.c.
Referenced by GetRecordingsSortMode(), IncRecordingsSortMode(), cMenuRecordings::Set(), and cRecording::SortName().