vdr  1.7.31
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
cIndexFile Class Reference

#include <recording.h>

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 cString IndexFileName (const char *FileName, bool IsPesRecording)
static int GetLength (const char *FileName, bool IsPesRecording=false)
static cString IndexFileName (const char *FileName, bool IsPesRecording)

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 void AddToIndexList (const cIndexFile *IndexFile)
static void RemoveFromIndexList (const cIndexFile *IndexFile)
static bool IsInIndexList (const cIndexFile *IndexFile)
static void AddToIndexList (const cIndexFile *IndexFile)
static void RemoveFromIndexList (const cIndexFile *IndexFile)
static bool IsInIndexList (const cIndexFile *IndexFile)

Private Attributes

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

Static Private Attributes

static cMutex indexListMutex
static cVector< const
cIndexFile * > 
indexList

Detailed Description

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

Constructor & Destructor Documentation

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

Definition at line 1722 of file recording.c.

References f, index, indexFileGenerator, and RemoveFromIndexList().

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

Member Function Documentation

void cIndexFile::AddToIndexList ( const cIndexFile IndexFile)
staticprivate

Definition at line 1935 of file recording.c.

References cVector< T >::Append(), indexList, indexListMutex, and cVector< T >::Size().

Referenced by cIndexFile().

static void cIndexFile::AddToIndexList ( const cIndexFile IndexFile)
staticprivate
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  )
void cIndexFile::Delete ( void  )

Definition at line 1914 of file recording.c.

References dsyslog, f, and fileName.

Referenced by cIndexFileGenerator::Action().

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

References CatchUp(), index, and last.

int cIndexFile::Get ( uint16_t  FileNumber,
off_t  FileOffset 
)
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 1926 of file recording.c.

References IndexFileName().

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::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
cString cIndexFile::IndexFileName ( const char *  FileName,
bool  IsPesRecording 
)
static
static bool cIndexFile::IsInIndexList ( const cIndexFile IndexFile)
staticprivate
bool cIndexFile::IsInIndexList ( const cIndexFile IndexFile)
staticprivate

Definition at line 1958 of file recording.c.

References fileName, indexList, indexListMutex, and cVector< T >::Size().

Referenced by CatchUp().

bool cIndexFile::IsStillRecording ( void  )

Definition at line 1909 of file recording.c.

References f.

Referenced by cDvbPlayer::Action().

bool cIndexFile::IsStillRecording ( void  )
int cIndexFile::Last ( void  )
inline

Definition at line 304 of file recording.h.

References CatchUp(), and last.

int cIndexFile::Last ( void  )
inline
bool cIndexFile::Ok ( void  )
inline

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

References index.

Referenced by cDvbPlayer::cDvbPlayer().

bool cIndexFile::Ok ( void  )
inline

Definition at line 299 of file recording.h.

References index.

static void cIndexFile::RemoveFromIndexList ( const cIndexFile IndexFile)
staticprivate
void cIndexFile::RemoveFromIndexList ( const cIndexFile IndexFile)
staticprivate

Definition at line 1947 of file recording.c.

References indexList, indexListMutex, and cVector< T >::Size().

Referenced by ~cIndexFile().

bool cIndexFile::StoreResume ( int  Index)
inline

Definition at line 306 of file recording.h.

References resumeFile, and cResumeFile::Save().

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::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
cString cIndexFile::fileName
private

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

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

tIndexTs * cIndexFile::index
private

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

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

cIndexFileGenerator * cIndexFile::indexFileGenerator
private

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

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

static cVector< const cIndexFile * > cIndexFile::indexList
staticprivate

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

Referenced by AddToIndexList(), IsInIndexList(), and RemoveFromIndexList().

static cMutex cIndexFile::indexListMutex
staticprivate

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

Referenced by AddToIndexList(), IsInIndexList(), and RemoveFromIndexList().

bool cIndexFile::isPesRecording
private

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

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

int cIndexFile::last
private

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

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

cMutex cIndexFile::mutex
private

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

Referenced by CatchUp().

cResumeFile cIndexFile::resumeFile
private

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

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

int cIndexFile::size
private

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

Referenced by CatchUp(), and cIndexFile().


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