vdr-plugin-streamdev/server/livestreamer.h

69 lines
1.7 KiB
C
Raw Normal View History

2004-12-30 23:43:55 +01:00
#ifndef VDR_STREAMDEV_LIVESTREAMER_H
#define VDR_STREAMDEV_LIVESTREAMER_H
#include <vdr/config.h>
#include <vdr/receiver.h>
#include "server/streamer.h"
#include "server/livefilter.h"
#include "common.h"
#if MAXRECEIVEPIDS < 16
# error Too few receiver pids allowed! Please contact sascha@akv-soft.de!
#endif
class cTSRemux;
class cStreamdevLiveReceiver: public cReceiver {
friend class cStreamdevLiveStreamer;
private:
cStreamdevLiveStreamer *m_Streamer;
protected:
virtual void Receive(uchar *Data, int Length);
public:
2005-02-08 14:59:16 +01:00
cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, int Ca, int Priority,
const int *Pids);
2004-12-30 23:43:55 +01:00
virtual ~cStreamdevLiveReceiver();
};
class cStreamdevLiveStreamer: public cStreamdevStreamer {
private:
int m_Priority;
2005-02-08 14:59:16 +01:00
int m_Pids[MAXRECEIVEPIDS + 1];
int m_NumPids;
2004-12-30 23:43:55 +01:00
const cChannel *m_Channel;
cDevice *m_Device;
cStreamdevLiveReceiver *m_Receiver;
cTSRemux *m_Remux;
uchar *m_Buffer;
int m_Sequence;
#if VDRVERSNUM >= 10300
cStreamdevLiveFilter *m_Filter;
#endif
protected:
virtual uchar *Process(const uchar *Data, int &Count, int &Result);
public:
cStreamdevLiveStreamer(int Priority);
virtual ~cStreamdevLiveStreamer();
void SetDevice(cDevice *Device) { m_Device = Device; }
bool SetPid(int Pid, bool On);
bool SetChannel(const cChannel *Channel, int StreamType, bool StreamPIDS);
bool SetFilter(u_short Pid, u_char Tid, u_char Mask, bool On);
virtual void Detach(void);
virtual void Attach(void);
virtual void Start(cTBSocket *Socket);
// Statistical purposes:
virtual cTBString Report(void);
};
#endif // VDR_STREAMDEV_LIVESTREAMER_H