|
vdr
1.7.27
|
#include "videodir.h"#include <ctype.h>#include <errno.h>#include <fcntl.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/stat.h>#include <unistd.h>#include "recording.h"#include "tools.h"Go to the source code of this file.
Classes | |
| class | cVideoDirectory |
Functions | |
| cUnbufferedFile * | OpenVideoFile (const char *FileName, int Flags) |
| int | CloseVideoFile (cUnbufferedFile *File) |
| bool | RenameVideoFile (const char *OldName, const char *NewName) |
| bool | RemoveVideoFile (const char *FileName) |
| static bool | StatNearestDir (const char *FileName, struct stat *Stat) |
| bool | HardLinkVideoFile (const char *OldName, const char *NewName) |
| bool | VideoFileSpaceAvailable (int SizeMB) |
| int | VideoDiskSpace (int *FreeMB, int *UsedMB) |
| cString | PrefixVideoFileName (const char *FileName, char Prefix) |
| cString | NewVideoFileName (const char *FileName, const char *NewDirName) |
| void | RemoveEmptyVideoDirectories (void) |
| bool | IsOnVideoDirectoryFileSystem (const char *FileName) |
Variables | |
| const char * | VideoDirectory = VIDEODIR |
| int CloseVideoFile | ( | cUnbufferedFile * | File | ) |
Definition at line 150 of file videodir.c.
References cUnbufferedFile::Close().
Referenced by cFileName::Close().
| bool HardLinkVideoFile | ( | const char * | OldName, |
| const char * | NewName | ||
| ) |
Definition at line 188 of file videodir.c.
References cVideoDirectory::Adjust(), esyslog, cVideoDirectory::IsDistributed(), isyslog, LOG_ERROR_STR, MakeDirs(), cVideoDirectory::Next(), ReadLink(), StatNearestDir(), cVideoDirectory::Store(), and VideoDirectory.
Referenced by cCuttingThread::Action().
| bool IsOnVideoDirectoryFileSystem | ( | const char * | FileName | ) |
Definition at line 368 of file videodir.c.
References EntriesOnSameFileSystem(), cVideoDirectory::Name(), and cVideoDirectory::Next().
Referenced by AssertFreeDiskSpace(), cRecordings::MBperMinute(), and cRecordings::TotalFileSizeMB().
| cString NewVideoFileName | ( | const char * | FileName, |
| const char * | NewDirName | ||
| ) |
Definition at line 344 of file videodir.c.
References ExchangeChars(), cString::sprintf(), and VideoDirectory.
Referenced by cMenuEditRecording::ProcessKey(), and cFileTransfer::Start().
| cUnbufferedFile* OpenVideoFile | ( | const char * | FileName, |
| int | Flags | ||
| ) |
Definition at line 109 of file videodir.c.
References cVideoDirectory::Adjust(), cUnbufferedFile::Create(), esyslog, FreeDiskSpaceMB(), cVideoDirectory::FreeMB(), cVideoDirectory::IsDistributed(), LOG_ERROR_STR, MakeDirs(), cVideoDirectory::Name(), cVideoDirectory::Next(), cVideoDirectory::Store(), cVideoDirectory::Stored(), and VideoDirectory.
Referenced by cFileName::Open().
| cString PrefixVideoFileName | ( | const char * | FileName, |
| char | Prefix | ||
| ) |
Definition at line 324 of file videodir.c.
Referenced by cRecording::PrefixFileName(), and cCutter::Start().
| void RemoveEmptyVideoDirectories | ( | void | ) |
Definition at line 360 of file videodir.c.
References cVideoDirectory::Name(), cVideoDirectory::Next(), and RemoveEmptyDirectories().
Referenced by cRemoveDeletedRecordingsThread::Action().
| bool RemoveVideoFile | ( | const char * | FileName | ) |
Definition at line 169 of file videodir.c.
References RemoveFileOrDir().
Referenced by cRecording::Delete(), cRecording::Remove(), cCutter::Start(), cFileTransfer::Stop(), and cCutter::Stop().
| bool RenameVideoFile | ( | const char * | OldName, |
| const char * | NewName | ||
| ) |
Definition at line 157 of file videodir.c.
References LOG_ERROR_STR.
Referenced by cRecording::Delete(), and cRecording::Undelete().
| static bool StatNearestDir | ( | const char * | FileName, |
| struct stat * | Stat | ||
| ) | [static] |
| int VideoDiskSpace | ( | int * | FreeMB, |
| int * | UsedMB | ||
| ) |
Definition at line 303 of file videodir.c.
References DeletedRecordings, cVideoDirectory::FreeMB(), cVideoDirectory::Next(), and cRecordings::TotalFileSizeMB().
Referenced by cMenuTimers::ActualiseDiskStatus(), cSVDRP::CmdSTAT(), cFreeDiskSpace::HasChanged(), and cRecordControls::Start().
| bool VideoFileSpaceAvailable | ( | int | SizeMB | ) |
Definition at line 288 of file videodir.c.
References cVideoDirectory::FreeMB(), cVideoDirectory::IsDistributed(), and cVideoDirectory::Next().
Referenced by AssertFreeDiskSpace().
| const char* VideoDirectory = VIDEODIR |
Definition at line 25 of file videodir.c.
Referenced by cCopyingThread::Action(), cRemoveDeletedRecordingsThread::Action(), AssertFreeDiskSpace(), cRecording::cRecording(), cVideoDirectory::cVideoDirectory(), cRecording::FileName(), cVideoDirectory::FreeMB(), HardLinkVideoFile(), main(), cVideoDirectory::Name(), NewVideoFileName(), OpenVideoFile(), cRecordings::Refresh(), cRecording::SortName(), and cRecordings::UpdateFileName().
1.8.0