2012-12-16 13:29:15 +01:00
|
|
|
#ifndef VDR_STREAMDEV_RECSTREAMER_H
|
|
|
|
#define VDR_STREAMDEV_RECSTREAMER_H
|
|
|
|
|
2014-08-30 23:58:11 +02:00
|
|
|
#include "common.h"
|
2012-12-16 13:29:15 +01:00
|
|
|
#include "server/streamer.h"
|
|
|
|
#include "server/recplayer.h"
|
|
|
|
|
|
|
|
#define RECBUFSIZE (174 * TS_SIZE)
|
|
|
|
|
|
|
|
// --- cStreamdevRecStreamer -------------------------------------------------
|
|
|
|
|
|
|
|
class cStreamdevRecStreamer: public cStreamdevStreamer {
|
|
|
|
private:
|
|
|
|
//Streamdev::cTSRemux *m_Remux;
|
2013-10-01 23:47:25 +02:00
|
|
|
RecPlayer *m_RecPlayer;
|
|
|
|
int64_t m_StartOffset;
|
2012-12-16 13:29:15 +01:00
|
|
|
int64_t m_From;
|
|
|
|
int64_t m_To;
|
|
|
|
uchar m_Buffer[RECBUFSIZE];
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual uchar* GetFromReceiver(int &Count);
|
|
|
|
virtual void DelFromReceiver(int Count) { m_From += Count; };
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual bool IsReceiving(void) const { return m_From <= m_To; };
|
2013-10-01 23:47:25 +02:00
|
|
|
uint64_t GetLength() { return m_RecPlayer->getLengthBytes() - m_StartOffset; }
|
2012-12-16 13:29:15 +01:00
|
|
|
int64_t SetRange(int64_t &From, int64_t &To);
|
|
|
|
virtual cString ToText() const;
|
2014-08-30 23:58:11 +02:00
|
|
|
cStreamdevRecStreamer(const cServerConnection *Connection, RecPlayer *RecPlayer, eStreamType StreamType, int64_t StartOffset = 0L, const int *Apids = NULL, const int *Dpids = NULL);
|
2012-12-16 13:29:15 +01:00
|
|
|
virtual ~cStreamdevRecStreamer();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VDR_STREAMDEV_RECSTREAMER_H
|