mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
7b8e396f77
Modified Files: HISTORY remux/ts2pes.c remux/ts2pes.h remux/tsremux.h server/livestreamer.c server/livestreamer.h
84 lines
2.2 KiB
C++
84 lines
2.2 KiB
C++
#ifndef VDR_STREAMDEV_LIVESTREAMER_H
|
|
#define VDR_STREAMDEV_LIVESTREAMER_H
|
|
|
|
#include <vdr/config.h>
|
|
#include <vdr/receiver.h>
|
|
|
|
#include "server/streamer.h"
|
|
#include "remux/tsremux.h"
|
|
#include "common.h"
|
|
|
|
namespace Streamdev {
|
|
class cTSRemux;
|
|
}
|
|
class cStreamdevPatFilter;
|
|
class cStreamdevLiveReceiver;
|
|
|
|
// --- cStreamdevLiveStreamer -------------------------------------------------
|
|
|
|
class cStreamdevLiveStreamer: public cStreamdevStreamer {
|
|
private:
|
|
int m_Priority;
|
|
std::string m_Parameter;
|
|
int m_Pids[MAXRECEIVEPIDS + 1];
|
|
int m_NumPids;
|
|
eStreamType m_StreamType;
|
|
const cChannel *m_Channel;
|
|
cDevice *m_Device;
|
|
cStreamdevLiveReceiver *m_Receiver;
|
|
cStreamdevPatFilter *m_PatFilter;
|
|
Streamdev::cTSRemux *m_Remux;
|
|
|
|
void StartReceiver(void);
|
|
bool HasPid(int Pid);
|
|
|
|
public:
|
|
cStreamdevLiveStreamer(int Priority, std::string Parameter = "");
|
|
virtual ~cStreamdevLiveStreamer();
|
|
|
|
void SetDevice(cDevice *Device) { m_Device = Device; }
|
|
bool SetPid(int Pid, bool On);
|
|
bool SetPids(int Pid, const int *Pids1 = NULL, const int *Pids2 = NULL, const int *Pids3 = NULL);
|
|
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);
|
|
};
|
|
|
|
|
|
// --- 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);
|
|
};
|
|
|
|
#endif // VDR_STREAMDEV_LIVESTREAMER_H
|