vdr  1.7.27
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
cIndexFile Class Reference

#include <recording.h>

List of all members.

Public Member Functions

 cIndexFile (const char *FileName, bool Record, bool IsPesRecording=false, bool PauseLive=false)
 ~cIndexFile ()
bool Ok (void)
bool Write (bool Independent, uint16_t FileNumber, off_t FileOffset)
bool Get (int Index, uint16_t *FileNumber, off_t *FileOffset, bool *Independent=NULL, int *Length=NULL)
int GetNextIFrame (int Index, bool Forward, uint16_t *FileNumber=NULL, off_t *FileOffset=NULL, int *Length=NULL)
int Get (uint16_t FileNumber, off_t FileOffset)
int Last (void)
int GetResume (void)
bool StoreResume (int Index)
bool IsStillRecording (void)
void Delete (void)
 cIndexFile (const char *FileName, bool Record, bool IsPesRecording=false, bool PauseLive=false)
 ~cIndexFile ()
bool Ok (void)
bool Write (bool Independent, uint16_t FileNumber, off_t FileOffset)
bool Get (int Index, uint16_t *FileNumber, off_t *FileOffset, bool *Independent=NULL, int *Length=NULL)
int GetNextIFrame (int Index, bool Forward, uint16_t *FileNumber=NULL, off_t *FileOffset=NULL, int *Length=NULL)
int Get (uint16_t FileNumber, off_t FileOffset)
int Last (void)
int GetResume (void)
bool StoreResume (int Index)
bool IsStillRecording (void)
void Delete (void)

Static Public Member Functions

static int GetLength (const char *FileName, bool IsPesRecording=false)
static int GetLength (const char *FileName, bool IsPesRecording=false)

Private Member Functions

void ConvertFromPes (tIndexTs *IndexTs, int Count)
void ConvertToPes (tIndexTs *IndexTs, int Count)
bool CatchUp (int Index=-1)
void ConvertFromPes (tIndexTs *IndexTs, int Count)
void ConvertToPes (tIndexTs *IndexTs, int Count)
bool CatchUp (int Index=-1)

Static Private Member Functions

static cString IndexFileName (const char *FileName, bool IsPesRecording)
static cString IndexFileName (const char *FileName, bool IsPesRecording)

Private Attributes

int f
cString fileName
int size
int last
tIndexTsindex
bool isPesRecording
cResumeFile resumeFile
cIndexFileGeneratorindexFileGenerator
cMutex mutex

Detailed Description

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


Constructor & Destructor Documentation

cIndexFile::cIndexFile ( const char *  FileName,
bool  Record,
bool  IsPesRecording = false,
bool  PauseLive = false 
)

Definition at line 1679 of file recording.c.

References f, index, and indexFileGenerator.

cIndexFile::cIndexFile ( const char *  FileName,
bool  Record,
bool  IsPesRecording = false,
bool  PauseLive = false 
)

Member Function Documentation

bool cIndexFile::CatchUp ( int  Index = -1) [private]
bool cIndexFile::CatchUp ( int  Index = -1) [private]
void cIndexFile::ConvertFromPes ( tIndexTs IndexTs,
int  Count 
) [private]
void cIndexFile::ConvertFromPes ( tIndexTs IndexTs,
int  Count 
) [private]
void cIndexFile::ConvertToPes ( tIndexTs IndexTs,
int  Count 
) [private]
void cIndexFile::ConvertToPes ( tIndexTs IndexTs,
int  Count 
) [private]
void cIndexFile::Delete ( void  )

Definition at line 1871 of file recording.c.

References dsyslog, f, and fileName.

Referenced by cIndexFileGenerator::Action().

void cIndexFile::Delete ( void  )
bool cIndexFile::Get ( int  Index,
uint16_t *  FileNumber,
off_t *  FileOffset,
bool *  Independent = NULL,
int *  Length = NULL 
)
bool cIndexFile::Get ( int  Index,
uint16_t *  FileNumber,
off_t *  FileOffset,
bool *  Independent = NULL,
int *  Length = NULL 
)
int cIndexFile::Get ( uint16_t  FileNumber,
off_t  FileOffset 
)

Definition at line 1852 of file recording.c.

References CatchUp(), index, and last.

int cIndexFile::Get ( uint16_t  FileNumber,
off_t  FileOffset 
)
static int cIndexFile::GetLength ( const char *  FileName,
bool  IsPesRecording = false 
) [static]

Calculates the recording length (number of frames) without actually reading the index file.

Returns -1 in case of error.

int cIndexFile::GetLength ( const char *  FileName,
bool  IsPesRecording = false 
) [static]

Calculates the recording length (number of frames) without actually reading the index file.

Returns -1 in case of error.

Definition at line 1883 of file recording.c.

References IndexFileName().

int cIndexFile::GetNextIFrame ( int  Index,
bool  Forward,
uint16_t *  FileNumber = NULL,
off_t *  FileOffset = NULL,
int *  Length = NULL 
)
int cIndexFile::GetNextIFrame ( int  Index,
bool  Forward,
uint16_t *  FileNumber = NULL,
off_t *  FileOffset = NULL,
int *  Length = NULL 
)
int cIndexFile::GetResume ( void  ) [inline]

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

References cResumeFile::Read(), and resumeFile.

Referenced by cDvbPlayer::Resume().

int cIndexFile::GetResume ( void  ) [inline]

Definition at line 305 of file recording.h.

References cResumeFile::Read(), and resumeFile.

static cString cIndexFile::IndexFileName ( const char *  FileName,
bool  IsPesRecording 
) [static, private]
cString cIndexFile::IndexFileName ( const char *  FileName,
bool  IsPesRecording 
) [static, private]

Definition at line 1687 of file recording.c.

References INDEXFILESUFFIX, and cString::sprintf().

Referenced by cIndexFile(), and GetLength().

Definition at line 1866 of file recording.c.

References f.

Referenced by cDvbPlayer::Action().

int cIndexFile::Last ( void  ) [inline]

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

References CatchUp(), and last.

Referenced by cCuttingThread::Action(), cDvbPlayer::Action(), and cDvbPlayer::GetIndex().

int cIndexFile::Last ( void  ) [inline]

Definition at line 304 of file recording.h.

References CatchUp(), and last.

bool cIndexFile::Ok ( void  ) [inline]

Definition at line 299 of file recording.h.

References index.

bool cIndexFile::Ok ( void  ) [inline]

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

References index.

Referenced by cDvbPlayer::cDvbPlayer().

bool cIndexFile::StoreResume ( int  Index) [inline]

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

References resumeFile, and cResumeFile::Save().

Referenced by cDvbPlayer::Save().

bool cIndexFile::StoreResume ( int  Index) [inline]

Definition at line 306 of file recording.h.

References resumeFile, and cResumeFile::Save().

bool cIndexFile::Write ( bool  Independent,
uint16_t  FileNumber,
off_t  FileOffset 
)
bool cIndexFile::Write ( bool  Independent,
uint16_t  FileNumber,
off_t  FileOffset 
)

Member Data Documentation

int cIndexFile::f [private]

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

Referenced by CatchUp(), cIndexFile(), Delete(), and Write().

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

Referenced by CatchUp(), cIndexFile(), Get(), GetNextIFrame(), Ok(), and ~cIndexFile().

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

Referenced by cIndexFile(), and ~cIndexFile().

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

Referenced by CatchUp(), cIndexFile(), and Write().

int cIndexFile::last [private]

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

Referenced by CatchUp(), cIndexFile(), Get(), GetNextIFrame(), Last(), and Write().

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

Referenced by CatchUp().

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

Referenced by cIndexFile(), GetResume(), and StoreResume().

int cIndexFile::size [private]

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

Referenced by CatchUp(), and cIndexFile().


The documentation for this class was generated from the following files: