vdr 2.6.1
Classes | Macros | Enumerations | Functions | Variables
include/vdr/recording.h File Reference
#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
 
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   (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 , ruNone = 0x0000 , ruTimer = 0x0001 ,
  ruReplay = 0x0002 , ruCut = 0x0004 , ruMove = 0x0008 , ruCopy = 0x0010 ,
  ruSrc = 0x0020 , ruDst = 0x0040 , ruPending = 0x0080 , ruCanceled = 0x8000
}
 
enum  eRecordingsSortDir { rsdAscending , rsdDescending , rsdAscending , rsdDescending }
 
enum  eRecordingsSortMode { rsmName , rsmTime , 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 Update=false)
 
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)
 

Variables

int DirectoryPathMax
 
int DirectoryNameMax
 
bool DirectoryEncoding
 
int InstanceId
 
cRecordingsHandler RecordingsHandler
 
cDoneRecordings DoneRecordingsPattern
 
eRecordingsSortMode RecordingsSortMode
 

Macro Definition Documentation

◆ DEFAULTFRAMESPERSECOND

#define DEFAULTFRAMESPERSECOND   25.0

Definition at line 352 of file include/vdr/recording.h.

◆ FOLDERDELIMCHAR

#define FOLDERDELIMCHAR   '~'

Definition at line 21 of file include/vdr/recording.h.

◆ LOCK_DELETEDRECORDINGS_READ

#define LOCK_DELETEDRECORDINGS_READ   USE_LIST_LOCK_READ2(Recordings, DeletedRecordings)

Definition at line 309 of file include/vdr/recording.h.

◆ LOCK_DELETEDRECORDINGS_WRITE

#define LOCK_DELETEDRECORDINGS_WRITE   USE_LIST_LOCK_WRITE2(Recordings, DeletedRecordings)

Definition at line 310 of file include/vdr/recording.h.

◆ LOCK_RECORDINGS_READ

#define LOCK_RECORDINGS_READ   USE_LIST_LOCK_READ(Recordings)

Definition at line 307 of file include/vdr/recording.h.

◆ LOCK_RECORDINGS_WRITE

#define LOCK_RECORDINGS_WRITE   USE_LIST_LOCK_WRITE(Recordings)

Definition at line 308 of file include/vdr/recording.h.

◆ MAXFRAMESIZE

#define MAXFRAMESIZE   (KILOBYTE(1024) / TS_SIZE * TS_SIZE)

Definition at line 441 of file include/vdr/recording.h.

◆ MAXVIDEOFILESIZEDEFAULT

#define MAXVIDEOFILESIZEDEFAULT   MAXVIDEOFILESIZEPES

Definition at line 451 of file include/vdr/recording.h.

◆ MAXVIDEOFILESIZEPES

#define MAXVIDEOFILESIZEPES   2000

Definition at line 449 of file include/vdr/recording.h.

◆ MAXVIDEOFILESIZETS

#define MAXVIDEOFILESIZETS   1048570

Definition at line 448 of file include/vdr/recording.h.

◆ MINVIDEOFILESIZE

#define MINVIDEOFILESIZE   100

Definition at line 450 of file include/vdr/recording.h.

◆ RUC_AFTERRECORDING

#define RUC_AFTERRECORDING   "after"

Definition at line 423 of file include/vdr/recording.h.

◆ RUC_BEFORERECORDING

#define RUC_BEFORERECORDING   "before"

Definition at line 421 of file include/vdr/recording.h.

◆ RUC_COPIEDRECORDING

#define RUC_COPIEDRECORDING   "copied"

Definition at line 430 of file include/vdr/recording.h.

◆ RUC_COPYINGRECORDING

#define RUC_COPYINGRECORDING   "copying"

Definition at line 429 of file include/vdr/recording.h.

◆ RUC_DELETERECORDING

#define RUC_DELETERECORDING   "deleted"

Definition at line 426 of file include/vdr/recording.h.

◆ RUC_EDITEDRECORDING

#define RUC_EDITEDRECORDING   "edited"

Definition at line 425 of file include/vdr/recording.h.

◆ RUC_EDITINGRECORDING

#define RUC_EDITINGRECORDING   "editing"

Definition at line 424 of file include/vdr/recording.h.

◆ RUC_MOVEDRECORDING

#define RUC_MOVEDRECORDING   "moved"

Definition at line 428 of file include/vdr/recording.h.

◆ RUC_RENAMEDRECORDING

#define RUC_RENAMEDRECORDING   "renamed"

Definition at line 427 of file include/vdr/recording.h.

◆ RUC_STARTRECORDING

#define RUC_STARTRECORDING   "started"

Definition at line 422 of file include/vdr/recording.h.

Enumeration Type Documentation

◆ eRecordingsSortDir

Enumerator
rsdAscending 
rsdDescending 
rsdAscending 
rsdDescending 

Definition at line 549 of file include/vdr/recording.h.

◆ eRecordingsSortMode

Enumerator
rsmName 
rsmTime 
rsmName 
rsmTime 

Definition at line 550 of file include/vdr/recording.h.

◆ eRecordingUsage

Enumerator
ruNone 
ruTimer 
ruReplay 
ruCut 
ruMove 
ruCopy 
ruSrc 
ruDst 
ruPending 
ruCanceled 
ruNone 
ruTimer 
ruReplay 
ruCut 
ruMove 
ruCopy 
ruSrc 
ruDst 
ruPending 
ruCanceled 

Definition at line 28 of file include/vdr/recording.h.

Function Documentation

◆ AssertFreeDiskSpace()

void AssertFreeDiskSpace ( int  Priority = 0,
bool  Force = false 
)

◆ DEF_LIST_LOCK()

DEF_LIST_LOCK ( Recordings  )

◆ DEF_LIST_LOCK2()

DEF_LIST_LOCK2 ( Recordings  ,
DeletedRecordings   
)

◆ ExchangeChars()

char * ExchangeChars ( char *  s,
bool  ToFileSystem 
)

◆ GenerateIndex()

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 2891 of file recording.c.

References cThread::Active(), AddDirectory(), DirectoryOk(), INDEXFILECHECKINTERVAL, INDEXFILESUFFIX, cRecording::IsPesRecording(), cRecording::Name(), and cCondWait::SleepMs().

Referenced by main().

◆ GetRecordingsSortMode()

void GetRecordingsSortMode ( const char *  Directory)

◆ GetRecordingTimerId()

cString GetRecordingTimerId ( const char *  Directory)

Definition at line 3283 of file recording.c.

References AddDirectory(), stripspace(), and TIMERRECFILE.

Referenced by TimerStillRecording().

◆ HasRecordingsSortMode()

bool HasRecordingsSortMode ( const char *  Directory)

Definition at line 3230 of file recording.c.

References AddDirectory(), and SORTMODEFILE.

◆ HMSFToIndex()

int HMSFToIndex ( const char *  HMSF,
double  FramesPerSecond = DEFAULTFRAMESPERSECOND 
)

Definition at line 3194 of file recording.c.

Referenced by cSVDRPServer::CmdPLAY().

◆ IncRecordingsSortMode()

void IncRecordingsSortMode ( const char *  Directory)

◆ IndexToHMSF()

cString IndexToHMSF ( int  Index,
bool  WithFrame = false,
double  FramesPerSecond = DEFAULTFRAMESPERSECOND 
)

Definition at line 3178 of file recording.c.

References cString::sprintf().

Referenced by cDvbPlayer::Action(), and cReplayControl::ShowProgress().

◆ ReadFrame()

int ReadFrame ( cUnbufferedFile f,
uchar b,
int  Length,
int  Max 
)

Definition at line 3212 of file recording.c.

References esyslog, LOG_ERROR, and cUnbufferedFile::Read().

Referenced by cDvbPlayer::Goto(), and cCuttingThread::LoadFrame().

◆ RemoveDeletedRecordings()

void RemoveDeletedRecordings ( void  )

◆ SecondsToFrames()

int SecondsToFrames ( int  Seconds,
double  FramesPerSecond = DEFAULTFRAMESPERSECOND 
)

◆ SetRecordingsSortMode()

void SetRecordingsSortMode ( const char *  Directory,
eRecordingsSortMode  SortMode 
)

Definition at line 3246 of file recording.c.

References AddDirectory(), SORTMODEFILE, and cString::sprintf().

◆ SetRecordingTimerId()

void SetRecordingTimerId ( const char *  Directory,
const char *  TimerId 
)

Variable Documentation

◆ DirectoryEncoding

bool DirectoryEncoding
extern

Definition at line 78 of file recording.c.

Referenced by main().

◆ DirectoryNameMax

int DirectoryNameMax
extern

Definition at line 77 of file recording.c.

Referenced by main().

◆ DirectoryPathMax

int DirectoryPathMax
extern

Definition at line 76 of file recording.c.

Referenced by main().

◆ DoneRecordingsPattern

cDoneRecordings DoneRecordingsPattern
extern

Definition at line 3085 of file recording.c.

Referenced by main(), cTimer::Matches(), and cRecordControl::Stop().

◆ InstanceId

int InstanceId
extern

Definition at line 79 of file recording.c.

Referenced by main().

◆ RecordingsHandler

cRecordingsHandler RecordingsHandler
extern

◆ RecordingsSortMode

eRecordingsSortMode RecordingsSortMode
extern

Definition at line 3228 of file recording.c.

Referenced by cMenuRecordings::Set().