/*
 * DV Player plugin for VDR
 *
 * Copyright (C) 2003, 2004 Erich Bachl <erich.bachl@vr-web.de>
 *
 * This code is distributed under the terms and conditions of the
 * GNU GENERAL PUBLIC LICENSE. See the file COPYING for details.
 *
 */

#ifndef DV_DEVICE_H
#define DV_DEVICE_H

#include <vdr/device.h>
//#include <vdr/plugin.h>
void dx(int level, const char *fmt, ...);

class cShellThread;

class cDVDevice: public cDevice {

private:
	int               fd_pvr;
	cTSBuffer         *m_TSBuffer;

protected:
	virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
	virtual bool OpenDvr(void);
	virtual void CloseDvr(void);
	 virtual bool GetTSPacket(uchar *&Data);

public:
  cDVDevice(void);
  virtual ~cDVDevice();
//  virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsSetChannel = NULL) const;
  virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
  virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);

  cShellThread *pShellThread;
};

#endif // DV_DEVICE_H
