2010-12-02 08:53:01 +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 "common.h"
|
|
|
|
|
|
|
|
class cTS2PSRemux;
|
|
|
|
class cTS2ESRemux;
|
|
|
|
class cExternRemux;
|
2010-12-02 09:43:13 +01:00
|
|
|
#if APIVERSNUM < 10703
|
2010-12-02 08:53:01 +01:00
|
|
|
class cRemux;
|
2010-12-02 09:43:13 +01:00
|
|
|
#endif
|
2010-12-02 08:59:14 +01:00
|
|
|
class cStreamdevPatFilter;
|
|
|
|
class cStreamdevLiveReceiver;
|
2010-12-02 08:53:01 +01:00
|
|
|
|
|
|
|
// --- cStreamdevLiveStreamer -------------------------------------------------
|
|
|
|
|
|
|
|
class cStreamdevLiveStreamer: public cStreamdevStreamer {
|
|
|
|
private:
|
|
|
|
int m_Priority;
|
2010-12-02 09:02:31 +01:00
|
|
|
std::string m_Parameter;
|
2010-12-02 08:53:01 +01:00
|
|
|
int m_Pids[MAXRECEIVEPIDS + 1];
|
|
|
|
int m_NumPids;
|
|
|
|
eStreamType m_StreamType;
|
|
|
|
const cChannel *m_Channel;
|
|
|
|
cDevice *m_Device;
|
|
|
|
cStreamdevLiveReceiver *m_Receiver;
|
2010-12-02 08:59:14 +01:00
|
|
|
cStreamdevPatFilter *m_PatFilter;
|
2010-12-02 09:43:13 +01:00
|
|
|
#if APIVERSNUM < 10703
|
2010-12-02 08:53:01 +01:00
|
|
|
cRemux *m_PESRemux;
|
2010-12-02 09:43:13 +01:00
|
|
|
#endif
|
2010-12-02 08:53:01 +01:00
|
|
|
cTS2ESRemux *m_ESRemux;
|
|
|
|
cTS2PSRemux *m_PSRemux;
|
|
|
|
cExternRemux *m_ExtRemux;
|
|
|
|
|
2010-12-02 08:59:14 +01:00
|
|
|
void StartReceiver(void);
|
|
|
|
bool HasPid(int Pid);
|
|
|
|
|
2010-12-02 08:53:01 +01:00
|
|
|
public:
|
2010-12-02 09:02:31 +01:00
|
|
|
cStreamdevLiveStreamer(int Priority, std::string Parameter = "");
|
2010-12-02 08:53:01 +01:00
|
|
|
virtual ~cStreamdevLiveStreamer();
|
|
|
|
|
|
|
|
void SetDevice(cDevice *Device) { m_Device = Device; }
|
|
|
|
bool SetPid(int Pid, bool On);
|
2010-12-02 08:59:14 +01:00
|
|
|
bool SetPids(int Pid, const int *Pids1 = NULL, const int *Pids2 = NULL, const int *Pids3 = NULL);
|
2010-12-02 08:53:01 +01:00
|
|
|
bool SetChannel(const cChannel *Channel, eStreamType StreamType, int Apid = 0);
|
|
|
|
|
|
|
|
virtual int Put(const uchar *Data, int Count);
|
|
|
|
virtual uchar *Get(int &Count);
|
|
|
|
virtual void Del(int Count);
|
|
|
|
|
|
|
|
virtual void Attach(void);
|
|
|
|
virtual void Detach(void);
|
|
|
|
|
|
|
|
// Statistical purposes:
|
|
|
|
virtual std::string Report(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-12-02 08:59:14 +01:00
|
|
|
// --- cStreamdevFilterStreamer -------------------------------------------------
|
|
|
|
|
|
|
|
//#include <vdr/status.h>
|
|
|
|
|
|
|
|
class cStreamdevLiveFilter;
|
|
|
|
|
|
|
|
class cStreamdevFilterStreamer: public cStreamdevStreamer /*, public cStatus*/ {
|
|
|
|
private:
|
|
|
|
cDevice *m_Device;
|
|
|
|
cStreamdevLiveFilter *m_Filter;
|
|
|
|
//const cChannel *m_Channel;
|
|
|
|
|
|
|
|
public:
|
|
|
|
cStreamdevFilterStreamer();
|
|
|
|
virtual ~cStreamdevFilterStreamer();
|
|
|
|
|
|
|
|
void SetDevice(cDevice *Device);
|
|
|
|
//void SetChannel(const cChannel *Channel);
|
|
|
|
bool SetFilter(u_short Pid, u_char Tid, u_char Mask, bool On);
|
|
|
|
|
|
|
|
virtual void Attach(void);
|
|
|
|
virtual void Detach(void);
|
|
|
|
|
|
|
|
// cStatus message handlers
|
|
|
|
//virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
|
|
|
|
};
|
|
|
|
|
2010-12-02 08:53:01 +01:00
|
|
|
#endif // VDR_STREAMDEV_LIVESTREAMER_H
|