|
vdr 2.7.9
|
#include <recording.h>
Public Member Functions | |
| cIndexFile (const char *FileName, bool Record, bool IsPesRecording=false, bool PauseLive=false) | |
| cIndexFile (const char *FileName, bool Record, bool IsPesRecording, bool PauseLive, bool Update) | |
| ~cIndexFile () | |
| bool | Ok (void) |
| bool | Write (bool Independent, uint16_t FileNumber, off_t FileOffset, bool Errors=false, bool Missing=false) |
| bool | Get (int Index, uint16_t *FileNumber, off_t *FileOffset, bool *Independent=NULL, int *Length=NULL, bool *Errors=NULL, bool *Missing=NULL) |
| const cErrors * | GetErrors (void) |
| int | GetNextIFrame (int Index, bool Forward, uint16_t *FileNumber=NULL, off_t *FileOffset=NULL, int *Length=NULL) |
| int | GetClosestIFrame (int Index) |
| 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) |
Private Member Functions | |
| void | ConvertFromPes (tIndexTs *IndexTs, int Count) |
| void | ConvertToPes (tIndexTs *IndexTs, int Count) |
| bool | CatchUp (int Index=-1) |
Private Attributes | |
| int | f |
| cString | fileName |
| int | size |
| int | last |
| int | lastErrorIndex |
| tIndexTs * | index |
| bool | isPesRecording |
| cResumeFile | resumeFile |
| cErrors | errors |
| cIndexFileGenerator * | indexFileGenerator |
| cMutex | mutex |
Definition at line 496 of file recording.h.
| cIndexFile::cIndexFile | ( | const char * | FileName, |
| bool | Record, | ||
| bool | IsPesRecording = false, | ||
| bool | PauseLive = false ) |
Definition at line 2823 of file recording.c.
References ConvertFromPes(), esyslog, f, fileName, FileSize(), index, INDEXFILECHECKINTERVAL, indexFileGenerator, IndexFileName(), INDEXFILETESTINTERVAL, isPesRecording, isyslog, last, lastErrorIndex, LastModifiedTime(), LOG_ERROR, LOG_ERROR_STR, MALLOC, MAXWAITFORINDEXFILE, resumeFile, safe_read(), size, cCondWait::SleepMs(), StillRecording(), and writechar().
Referenced by cIndexFile().
|
inline |
Definition at line 514 of file recording.h.
References cIndexFile().
| cIndexFile::~cIndexFile | ( | ) |
Definition at line 2913 of file recording.c.
References f, index, and indexFileGenerator.
|
private |
Definition at line 2951 of file recording.c.
References ConvertFromPes(), esyslog, f, fileName, index, INDEXCATCHUPWAIT, isPesRecording, last, LOG_ERROR_STR, MAXINDEXCATCHUP, mutex, safe_read(), size, and cCondVar::TimedWait().
Referenced by Get(), Get(), GetNextIFrame(), and Last().
|
private |
Definition at line 2926 of file recording.c.
Referenced by CatchUp(), and cIndexFile().
|
private |
Definition at line 2938 of file recording.c.
Referenced by Write().
| void cIndexFile::Delete | ( | void | ) |
Definition at line 3150 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 * | Errors = NULL, | ||
| bool * | Missing = NULL ) |
Definition at line 3024 of file recording.c.
| int cIndexFile::Get | ( | uint16_t | FileNumber, |
| off_t | FileOffset ) |
Definition at line 3131 of file recording.c.
| int cIndexFile::GetClosestIFrame | ( | int | Index | ) |
Returns the index of the I-frame that is closest to the given Index (or Index itself, if it already points to an I-frame).
Index may be any value, even outside the current range of frame indexes. If there is no actual index data available, 0 is returned.
Definition at line 3103 of file recording.c.
References constrain(), index, and last.
Referenced by cMarks::Align().
| const cErrors * cIndexFile::GetErrors | ( | void | ) |
Returns the frame indexes of errors in the recording (if any).
Definition at line 3054 of file recording.c.
References errors, index, last, and lastErrorIndex.
|
static |
Calculates the recording length (number of frames) without actually reading the index file.
Returns -1 in case of error.
Definition at line 3162 of file recording.c.
References IndexFileName().
Referenced by cRecording::NumFrames(), and cRecording::NumFramesAfterEdit().
| int cIndexFile::GetNextIFrame | ( | int | Index, |
| bool | Forward, | ||
| uint16_t * | FileNumber = NULL, | ||
| off_t * | FileOffset = NULL, | ||
| int * | Length = NULL ) |
Definition at line 3065 of file recording.c.
|
inline |
Definition at line 531 of file recording.h.
References resumeFile.
|
static |
Definition at line 2921 of file recording.c.
References INDEXFILESUFFIX, and cString::sprintf().
Referenced by cIndexFile(), and GetLength().
| bool cIndexFile::IsStillRecording | ( | void | ) |
Definition at line 3145 of file recording.c.
References f.
|
inline |
Returns the index of the last entry in this file, or -1 if the file is empty.
Definition at line 529 of file recording.h.
|
inline |
Definition at line 517 of file recording.h.
References index.
|
inline |
Definition at line 532 of file recording.h.
References resumeFile.
| bool cIndexFile::Write | ( | bool | Independent, |
| uint16_t | FileNumber, | ||
| off_t | FileOffset, | ||
| bool | Errors = false, | ||
| bool | Missing = false ) |
Definition at line 3007 of file recording.c.
References ConvertToPes(), f, fileName, isPesRecording, last, LOG_ERROR_STR, and safe_write().
Referenced by cIndexFileGenerator::Action().
|
private |
Definition at line 505 of file recording.h.
Referenced by GetErrors().
|
private |
Definition at line 498 of file recording.h.
Referenced by CatchUp(), cIndexFile(), Delete(), IsStillRecording(), Write(), and ~cIndexFile().
|
private |
Definition at line 499 of file recording.h.
Referenced by CatchUp(), cIndexFile(), Delete(), and Write().
|
private |
Definition at line 502 of file recording.h.
Referenced by CatchUp(), cIndexFile(), Get(), Get(), GetClosestIFrame(), GetErrors(), GetNextIFrame(), Ok(), and ~cIndexFile().
|
private |
Definition at line 506 of file recording.h.
Referenced by cIndexFile(), and ~cIndexFile().
|
private |
Definition at line 503 of file recording.h.
Referenced by CatchUp(), cIndexFile(), and Write().
|
private |
Definition at line 500 of file recording.h.
Referenced by CatchUp(), cIndexFile(), Get(), Get(), GetClosestIFrame(), GetErrors(), GetNextIFrame(), Last(), and Write().
|
private |
Definition at line 501 of file recording.h.
Referenced by cIndexFile(), and GetErrors().
|
private |
Definition at line 507 of file recording.h.
Referenced by CatchUp().
|
private |
Definition at line 504 of file recording.h.
Referenced by cIndexFile(), GetResume(), and StoreResume().
|
private |
Definition at line 500 of file recording.h.
Referenced by CatchUp(), and cIndexFile().