diff options
author | schmirl <schmirl> | 2009-09-30 10:02:26 +0000 |
---|---|---|
committer | schmirl <schmirl> | 2009-09-30 10:02:26 +0000 |
commit | e0f60bbd8153191c9f89d7d1c3c62ea71634a34b (patch) | |
tree | 07773b7051bff4ed30264d5731f51fe43be7ab67 /server/recplayer.h | |
parent | 7ea2353728b0474b0829a0bf98b8d2332753787e (diff) | |
download | vdr-plugin-streamdev-e0f60bbd8153191c9f89d7d1c3c62ea71634a34b.tar.gz vdr-plugin-streamdev-e0f60bbd8153191c9f89d7d1c3c62ea71634a34b.tar.bz2 |
adapted and included xmbc patch for VDR 1.4.x
Modified Files:
Tag: v0_4
CONTRIBUTORS HISTORY Makefile common.h server/connectionVTP.c
server/connectionVTP.h
Added Files:
Tag: v0_4
server/recplayer.c server/recplayer.h
Diffstat (limited to 'server/recplayer.h')
-rw-r--r-- | server/recplayer.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/server/recplayer.h b/server/recplayer.h new file mode 100644 index 0000000..3da6c89 --- /dev/null +++ b/server/recplayer.h @@ -0,0 +1,63 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef RECPLAYER_H +#define RECPLAYER_H + +#include <stdio.h> +#include <vdr/recording.h> + +#include "server/streamer.h" + +class Segment +{ + public: + uint64_t start; + uint64_t end; +}; + +class RecPlayer +{ + public: + RecPlayer(cRecording* rec); + ~RecPlayer(); + uint64_t getLengthBytes(); + uint32_t getLengthFrames(); + unsigned long getBlock(unsigned char* buffer, uint64_t position, unsigned long amount); + int openFile(int index); + uint64_t getLastPosition(); + cRecording* getCurrentRecording(); + void scan(); + uint64_t positionFromFrameNumber(uint32_t frameNumber); + uint32_t frameNumberFromPosition(uint64_t position); + bool getNextIFrame(uint32_t frameNumber, uint32_t direction, uint64_t* rfilePosition, uint32_t* rframeNumber, uint32_t* rframeLength); + + private: + cRecording* recording; + cIndexFile* indexFile; + FILE* file; + int fileOpen; + Segment* segments[1000]; + uint64_t totalLength; + uint64_t lastPosition; + uint32_t totalFrames; +}; + +#endif |