vdr-plugin-streamdev/server/streamer.h

45 lines
1.0 KiB
C
Raw Normal View History

2004-12-30 23:43:55 +01:00
/*
2005-02-08 14:59:16 +01:00
* $Id: streamer.h,v 1.2 2005/02/08 13:59:16 lordjaxom Exp $
2004-12-30 23:43:55 +01:00
*/
#ifndef VDR_STREAMDEV_STREAMER_H
#define VDR_STREAMDEV_STREAMER_H
#include <vdr/thread.h>
#include <vdr/ringbuffer.h>
#include <vdr/tools.h>
class cTBSocket;
class cStreamdevStreamer: public cThread {
private:
bool m_Active;
int m_Receivers;
uchar *m_Buffer;
const char *m_Name;
cTBSocket *m_Socket;
cRingBufferLinear *m_RingBuffer;
protected:
virtual uchar *Process(const uchar *Data, int &Count, int &Result);
virtual void Action(void);
const cTBSocket *Socket(void) const { return m_Socket; }
public:
cStreamdevStreamer(const char *Name);
virtual ~cStreamdevStreamer();
virtual void Start(cTBSocket *Socket);
virtual void Stop(void);
int Put(uchar *Data, int Length) { return m_RingBuffer->Put(Data, Length); }
2005-02-08 14:59:16 +01:00
void ReportOverflow(int Bytes) { m_RingBuffer->ReportOverflow(Bytes); }
2004-12-30 23:43:55 +01:00
virtual void Detach(void) = 0;
virtual void Attach(void) = 0;
};
#endif // VDR_STREAMDEV_STREAMER_H