00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _RECPLAYER_H
00009 #define _RECPLAYER_H
00010
00011 #include "../common.h"
00012 #include "filehandle.h"
00013 #include <vdr/recording.h>
00014
00024 class cRecordingPlayer : cFileHandle {
00025 public:
00035 static cRecordingPlayer *newInstance(cRecording *Recording);
00036 virtual ~cRecordingPlayer();
00037 virtual void open(UpnpOpenFileMode mode);
00038 virtual int read(char* buf, size_t buflen);
00039 virtual int write(char* buf, size_t buflen);
00040 virtual int seek(off_t offset, int origin);
00041 virtual void close();
00042 private:
00043 void Scan(void);
00044 cRecordingPlayer(cRecording *Recording);
00045 FILE* GetFile(int Index = 0);
00046 FILE* NextFile(void);
00047 int SeekInFile(int Index, off_t Offset);
00048 cRecording *mRecording;
00049 off_t* mOffsets;
00050 off_t mOffset;
00051 off_t mTotalLenght;
00052 int mIndex;
00053 FILE *mFile;
00054 };
00055
00056 #endif
00057