vdr-plugin-streamdev/client/device.h

66 lines
1.7 KiB
C
Raw Normal View History

2004-12-30 23:43:55 +01:00
/*
2008-04-07 17:07:38 +02:00
* $Id: device.h,v 1.7.2.1 2008/04/07 15:07:39 schmirl Exp $
2004-12-30 23:43:55 +01:00
*/
#ifndef VDR_STREAMDEV_DEVICE_H
#define VDR_STREAMDEV_DEVICE_H
#include <vdr/device.h>
#include "client/socket.h"
#include "client/filter.h"
class cTBString;
#define CMD_LOCK_OBJ(x) cMutexLock CmdLock((cMutex*)&(x)->m_Mutex)
class cStreamdevDevice: public cDevice {
friend class cRemoteRecordings;
private:
const cChannel *m_Channel;
cTSBuffer *m_TSBuffer;
cStreamdevFilters *m_Filters;
int m_Pids;
bool m_DvrClosed;
2004-12-30 23:43:55 +01:00
static cStreamdevDevice *m_Device;
bool OpenDvrInt(void);
void CloseDvrInt(void);
2004-12-30 23:43:55 +01:00
protected:
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
2005-02-08 16:21:19 +01:00
virtual bool HasLock(int TimeoutMs)
{
//printf("HasLock is %d\n", (ClientSocket.DataSocket(siLive) != NULL));
//return ClientSocket.DataSocket(siLive) != NULL;
return true;
}
2004-12-30 23:43:55 +01:00
virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
virtual bool OpenDvr(void);
virtual void CloseDvr(void);
virtual bool GetTSPacket(uchar *&Data);
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
public:
cStreamdevDevice(void);
virtual ~cStreamdevDevice();
2008-04-07 17:07:38 +02:00
virtual int ProvidesCa(const cChannel *Channel) const;
2004-12-30 23:43:55 +01:00
virtual bool ProvidesSource(int Source) const;
virtual bool ProvidesTransponder(const cChannel *Channel) const;
2004-12-30 23:43:55 +01:00
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1,
bool *NeedsDetachReceivers = NULL) const;
virtual bool IsTunedToTransponder(const cChannel *Channel);
2004-12-30 23:43:55 +01:00
static bool Init(void);
static bool ReInit(void);
static cStreamdevDevice *GetDevice(void) { return m_Device; }
};
#endif // VDR_STREAMDEV_DEVICE_H