vdr 2.6.6
|
#include <recording.h>
Public Member Functions | |
cIndexFile (const char *FileName, bool Record, bool IsPesRecording=false, bool PauseLive=false, bool Update=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 | 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 |
tIndexTs * | index |
bool | isPesRecording |
cResumeFile | resumeFile |
cIndexFileGenerator * | indexFileGenerator |
cMutex | mutex |
Definition at line 469 of file recording.h.
cIndexFile::cIndexFile | ( | const char * | FileName, |
bool | Record, | ||
bool | IsPesRecording = false, | ||
bool | PauseLive = false, | ||
bool | Update = false ) |
Definition at line 2645 of file recording.c.
References ConvertFromPes(), cResumeFile::Delete(), esyslog, f, fileName, FileSize(), index, INDEXFILECHECKINTERVAL, indexFileGenerator, IndexFileName(), INDEXFILETESTINTERVAL, isPesRecording, isyslog, last, LastModifiedTime(), LOG_ERROR, LOG_ERROR_STR, MALLOC, MAXWAITFORINDEXFILE, resumeFile, safe_read(), size, cCondWait::SleepMs(), StillRecording(), and writechar().
cIndexFile::~cIndexFile | ( | ) |
Definition at line 2734 of file recording.c.
References f, index, and indexFileGenerator.
|
private |
Definition at line 2772 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 2747 of file recording.c.
Referenced by CatchUp(), and cIndexFile().
|
private |
Definition at line 2759 of file recording.c.
Referenced by Write().
void cIndexFile::Delete | ( | void | ) |
Definition at line 2956 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 ) |
Definition at line 2845 of file recording.c.
References CatchUp(), index, and last.
Referenced by cDvbPlayer::Action(), cIndexFileGenerator::Action(), cCuttingThread::LoadFrame(), and cDvbPlayer::Resume().
int cIndexFile::Get | ( | uint16_t | FileNumber, |
off_t | FileOffset ) |
Definition at line 2937 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 2909 of file recording.c.
References constrain(), index, and last.
Referenced by cMarks::Align().
|
static |
Calculates the recording length (number of frames) without actually reading the index file.
Returns -1 in case of error.
Definition at line 2968 of file recording.c.
References IndexFileName().
Referenced by cRecording::NumFrames().
int cIndexFile::GetNextIFrame | ( | int | Index, |
bool | Forward, | ||
uint16_t * | FileNumber = NULL, | ||
off_t * | FileOffset = NULL, | ||
int * | Length = NULL ) |
Definition at line 2871 of file recording.c.
References CatchUp(), index, and last.
Referenced by cDvbPlayer::Action(), cDvbPlayer::GetIndex(), cDvbPlayer::Goto(), cDvbPlayer::Save(), cDvbPlayer::SkipFrames(), and cDvbPlayer::SkipSeconds().
|
inline |
Definition at line 497 of file recording.h.
References cResumeFile::Read(), and resumeFile.
Referenced by cDvbPlayer::Resume().
|
static |
Definition at line 2742 of file recording.c.
References INDEXFILESUFFIX, and cString::sprintf().
Referenced by cIndexFile(), and GetLength().
bool cIndexFile::IsStillRecording | ( | void | ) |
|
inline |
Returns the index of the last entry in this file, or -1 if the file is empty.
Definition at line 495 of file recording.h.
References CatchUp(), and last.
Referenced by cCuttingThread::Action(), cDvbPlayer::Action(), cIndexFileGenerator::Action(), cDvbPlayer::GetFrameNumber(), cDvbPlayer::GetIndex(), and cCuttingThread::ProcessSequence().
|
inline |
Definition at line 485 of file recording.h.
References index.
Referenced by cDvbPlayer::cDvbPlayer().
|
inline |
Definition at line 498 of file recording.h.
References resumeFile, and cResumeFile::Save().
Referenced by cDvbPlayer::Save().
bool cIndexFile::Write | ( | bool | Independent, |
uint16_t | FileNumber, | ||
off_t | FileOffset ) |
Definition at line 2828 of file recording.c.
References ConvertToPes(), f, fileName, isPesRecording, last, LOG_ERROR_STR, and safe_write().
Referenced by cRecorder::Action(), cIndexFileGenerator::Action(), and cCuttingThread::ProcessSequence().
|
private |
Definition at line 471 of file recording.h.
Referenced by CatchUp(), cIndexFile(), Delete(), IsStillRecording(), Write(), and ~cIndexFile().
|
private |
Definition at line 472 of file recording.h.
Referenced by CatchUp(), cIndexFile(), Delete(), and Write().
|
private |
Definition at line 474 of file recording.h.
Referenced by CatchUp(), cIndexFile(), Get(), Get(), GetClosestIFrame(), GetNextIFrame(), Ok(), and ~cIndexFile().
|
private |
Definition at line 477 of file recording.h.
Referenced by cIndexFile(), and ~cIndexFile().
|
private |
Definition at line 475 of file recording.h.
Referenced by CatchUp(), cIndexFile(), and Write().
|
private |
Definition at line 473 of file recording.h.
Referenced by CatchUp(), cIndexFile(), Get(), Get(), GetClosestIFrame(), GetNextIFrame(), Last(), and Write().
|
private |
Definition at line 478 of file recording.h.
Referenced by CatchUp().
|
private |
Definition at line 476 of file recording.h.
Referenced by cIndexFile(), GetResume(), and StoreResume().
|
private |
Definition at line 473 of file recording.h.
Referenced by CatchUp(), and cIndexFile().