vdr
1.7.27
|
#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 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 |
tIndexTs * | index |
bool | isPesRecording |
cResumeFile | resumeFile |
cIndexFileGenerator * | indexFileGenerator |
cMutex | mutex |
Definition at line 282 of file include/vdr/recording.h.
cIndexFile::cIndexFile | ( | const char * | FileName, |
bool | Record, | ||
bool | IsPesRecording = false , |
||
bool | PauseLive = false |
||
) |
Definition at line 1597 of file recording.c.
References ConvertFromPes(), cResumeFile::Delete(), esyslog, f, fileName, FileSize(), index, INDEXFILECHECKINTERVAL, indexFileGenerator, IndexFileName(), INDEXFILETESTINTERVAL, isPesRecording, isyslog, last, LOG_ERROR, LOG_ERROR_STR, MALLOC, MAXWAITFORINDEXFILE, resumeFile, safe_read(), size, cCondWait::SleepMs(), and writechar().
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 |
||
) |
bool cIndexFile::CatchUp | ( | int | Index = -1 | ) | [private] |
Definition at line 1717 of file recording.c.
References ConvertFromPes(), esyslog, f, fileName, index, isPesRecording, last, LOG_ERROR_STR, MININDEXAGE, mutex, safe_read(), size, and cCondWait::SleepMs().
Referenced by Get(), GetNextIFrame(), and Last().
bool cIndexFile::CatchUp | ( | int | Index = -1 | ) | [private] |
void cIndexFile::ConvertFromPes | ( | tIndexTs * | IndexTs, |
int | Count | ||
) | [private] |
Definition at line 1692 of file recording.c.
References tIndexTs::independent, tIndexPes::number, tIndexTs::number, tIndexPes::offset, tIndexTs::offset, and tIndexPes::type.
Referenced by CatchUp(), and cIndexFile().
void cIndexFile::ConvertFromPes | ( | tIndexTs * | IndexTs, |
int | Count | ||
) | [private] |
void cIndexFile::ConvertToPes | ( | tIndexTs * | IndexTs, |
int | Count | ||
) | [private] |
void cIndexFile::ConvertToPes | ( | tIndexTs * | IndexTs, |
int | Count | ||
) | [private] |
Definition at line 1704 of file recording.c.
References tIndexTs::independent, tIndexPes::number, tIndexTs::number, tIndexPes::offset, tIndexTs::offset, tIndexPes::reserved, and tIndexPes::type.
Referenced by Write().
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 |
||
) |
Definition at line 1793 of file recording.c.
References CatchUp(), tIndexTs::independent, index, last, tIndexTs::number, and tIndexTs::offset.
Referenced by cCuttingThread::Action(), cDvbPlayer::Action(), and cDvbPlayer::Resume().
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.
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 |
||
) |
Definition at line 1815 of file recording.c.
References CatchUp(), esyslog, index, last, tIndexTs::number, and tIndexTs::offset.
Referenced by cDvbPlayer::Action(), cDvbPlayer::GetIndex(), cDvbPlayer::Goto(), cDvbPlayer::Save(), cDvbPlayer::SkipFrames(), and cDvbPlayer::SkipSeconds().
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().
bool cIndexFile::IsStillRecording | ( | void | ) |
bool cIndexFile::IsStillRecording | ( | void | ) |
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.
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 | ||
) |
Definition at line 1776 of file recording.c.
References ConvertToPes(), f, fileName, isPesRecording, last, LOG_ERROR_STR, and safe_write().
Referenced by cCuttingThread::Action(), cRecorder::Action(), and cIndexFileGenerator::Action().
int cIndexFile::f [private] |
Definition at line 284 of file include/vdr/recording.h.
Referenced by CatchUp(), cIndexFile(), Delete(), IsStillRecording(), Write(), and ~cIndexFile().
cString cIndexFile::fileName [private] |
Definition at line 285 of file include/vdr/recording.h.
Referenced by CatchUp(), cIndexFile(), Delete(), and Write().
tIndexTs * cIndexFile::index [private] |
Definition at line 287 of file include/vdr/recording.h.
Referenced by CatchUp(), cIndexFile(), Get(), GetNextIFrame(), Ok(), and ~cIndexFile().
cIndexFileGenerator * cIndexFile::indexFileGenerator [private] |
Definition at line 290 of file include/vdr/recording.h.
Referenced by cIndexFile(), and ~cIndexFile().
bool cIndexFile::isPesRecording [private] |
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().
cMutex cIndexFile::mutex [private] |
Definition at line 291 of file include/vdr/recording.h.
Referenced by CatchUp().
cResumeFile cIndexFile::resumeFile [private] |
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().