vdr  1.7.31
Classes | Macros | Functions | Variables
videodir.c File Reference
#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

Macros

#define DISKSPACECHEK   5
#define MB_PER_MINUTE   25.75

Functions

void SetVideoDirectory (const char *Directory)
cUnbufferedFileOpenVideoFile (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 (const char *IgnoreFiles[])
bool IsOnVideoDirectoryFileSystem (const char *FileName)

Variables

const char * VideoDirectory = VIDEODIR

Macro Definition Documentation

#define DISKSPACECHEK   5

Definition at line 385 of file videodir.c.

Referenced by cVideoDiskUsage::HasChanged().

#define MB_PER_MINUTE   25.75

Definition at line 386 of file videodir.c.

Referenced by cVideoDiskUsage::HasChanged().

Function Documentation

int CloseVideoFile ( cUnbufferedFile File)

Definition at line 155 of file videodir.c.

References cUnbufferedFile::Close().

Referenced by cFileName::Close().

bool HardLinkVideoFile ( const char *  OldName,
const char *  NewName 
)
bool IsOnVideoDirectoryFileSystem ( const char *  FileName)
cString NewVideoFileName ( const char *  FileName,
const char *  NewDirName 
)
cUnbufferedFile* OpenVideoFile ( const char *  FileName,
int  Flags 
)
cString PrefixVideoFileName ( const char *  FileName,
char  Prefix 
)

Definition at line 329 of file videodir.c.

Referenced by cRecording::PrefixFileName(), and cCutter::Start().

void RemoveEmptyVideoDirectories ( const char *  IgnoreFiles[])
bool RemoveVideoFile ( const char *  FileName)
bool RenameVideoFile ( const char *  OldName,
const char *  NewName 
)

Definition at line 162 of file videodir.c.

References LOG_ERROR_STR.

Referenced by cRecording::Delete(), and cRecording::Undelete().

void SetVideoDirectory ( const char *  Directory)

Definition at line 27 of file videodir.c.

References VideoDirectory.

Referenced by main().

static bool StatNearestDir ( const char *  FileName,
struct stat *  Stat 
)
static

Definition at line 179 of file videodir.c.

References isyslog.

Referenced by HardLinkVideoFile().

int VideoDiskSpace ( int *  FreeMB,
int *  UsedMB 
)
bool VideoFileSpaceAvailable ( int  SizeMB)

Variable Documentation

const char* VideoDirectory = VIDEODIR