diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-10-15 11:23:59 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-10-15 11:23:59 +0200 |
commit | 15bb8ca60db165833441e44da6d8861e9a7df0ad (patch) | |
tree | ae32fdeeef17952713495b1c46b2e41147028ed3 /recording.h | |
parent | 8c633a5f65da85769600f8867296f33cc30b9946 (diff) | |
download | vdr-15bb8ca60db165833441e44da6d8861e9a7df0ad.tar.gz vdr-15bb8ca60db165833441e44da6d8861e9a7df0ad.tar.bz2 |
If a frame position in the 'marks' file of a recording doesn't point to an I-frame, it will now be shifted towards the next I-frame
Diffstat (limited to 'recording.h')
-rw-r--r-- | recording.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/recording.h b/recording.h index ac44ad5b..22c5d3a7 100644 --- a/recording.h +++ b/recording.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.h 2.37 2012/09/17 08:53:23 kls Exp $ + * $Id: recording.h 2.38 2012/10/15 10:22:27 kls Exp $ */ #ifndef __RECORDING_H @@ -222,14 +222,17 @@ public: class cMarks : public cConfig<cMark> { private: + cString recordingFileName; cString fileName; double framesPerSecond; + bool isPesRecording; time_t nextUpdate; time_t lastFileTime; time_t lastChange; public: bool Load(const char *RecordingFileName, double FramesPerSecond = DEFAULTFRAMESPERSECOND, bool IsPesRecording = false); bool Update(void); + void Align(void); void Sort(void); cMark *Add(int Position); cMark *Get(int Position); @@ -291,6 +294,11 @@ public: 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); + ///< 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. int Get(uint16_t FileNumber, off_t FileOffset); int Last(void) { CatchUp(); return last; } int GetResume(void) { return resumeFile.Read(); } |