/*
 * externalplayer-player.h: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */

#ifndef _EXTERNALPLAYER_PLAYER_H_
#define _EXTERNALPLAYER_PLAYER_H_

#include <vdr/player.h>
#include <vdr/thread.h>

class cRemotesDisable {
private:
  char * lircDevice;
  char * rcuDevice;
  bool kbdFound;
  bool lircFound;
  bool rcuFound;
  bool deactivated;
public:
  cRemotesDisable(char * nLircDevice, char * nRcuDevice);
  ~cRemotesDisable();
  void deactivateRemotes();
  void reactivateRemotes();
};

class cPlayerExternalplayer : public cPlayer {
private:
  pid_t pid;
  char * playerCommand;
  cRemotesDisable * remotesLock;
protected:
  virtual void Activate(bool On);
public:
  cPlayerExternalplayer(ePlayMode playMode, cRemotesDisable * nRemotesDisable, char * nPlayerCommand);
  virtual ~cPlayerExternalplayer();
  bool isActive();
};

class cControlExternalplayer : public cControl {
public:
  cControlExternalplayer(ePlayMode playMode, cRemotesDisable * remotesDisable, char * playerCommand);
  virtual ~cControlExternalplayer() {}
  virtual void Hide() {}
  virtual eOSState ProcessKey(eKeys key);
};

#endif /*_EXTERNALPLAYER_PLAYER_H_*/
