2004-12-30 23:43:55 +01:00
|
|
|
/*
|
2008-10-22 13:59:31 +02:00
|
|
|
* $Id: server.h,v 1.6 2008/10/22 11:59:32 schmirl Exp $
|
2004-12-30 23:43:55 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VDR_STREAMDEV_SERVER_H
|
|
|
|
#define VDR_STREAMDEV_SERVER_H
|
|
|
|
|
|
|
|
#include <vdr/thread.h>
|
|
|
|
|
|
|
|
#include "server/component.h"
|
|
|
|
#include "server/connection.h"
|
|
|
|
|
2008-04-29 09:00:53 +02:00
|
|
|
#define DEFAULT_EXTERNREMUX (*AddDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N), "externremux.sh"))
|
2008-04-07 16:50:32 +02:00
|
|
|
#define STREAMDEVHOSTSPATH (*AddDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N), "streamdevhosts.conf"))
|
2005-05-09 22:22:29 +02:00
|
|
|
|
2008-10-14 13:05:46 +02:00
|
|
|
extern char *opt_auth;
|
2008-04-29 09:00:53 +02:00
|
|
|
extern char *opt_remux;
|
|
|
|
|
2004-12-30 23:43:55 +01:00
|
|
|
class cStreamdevServer: public cThread {
|
|
|
|
private:
|
2005-05-09 22:22:29 +02:00
|
|
|
static cStreamdevServer *m_Instance;
|
|
|
|
static cList<cServerComponent> m_Servers;
|
|
|
|
static cList<cServerConnection> m_Clients;
|
2004-12-30 23:43:55 +01:00
|
|
|
|
|
|
|
protected:
|
2005-05-09 22:22:29 +02:00
|
|
|
void Stop(void);
|
|
|
|
|
2004-12-30 23:43:55 +01:00
|
|
|
virtual void Action(void);
|
|
|
|
|
2005-05-09 22:22:29 +02:00
|
|
|
static void Register(cServerComponent *Server);
|
2004-12-30 23:43:55 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
cStreamdevServer(void);
|
|
|
|
virtual ~cStreamdevServer();
|
|
|
|
|
2005-05-09 22:22:29 +02:00
|
|
|
static void Initialize(void);
|
|
|
|
static void Destruct(void);
|
2004-12-30 23:43:55 +01:00
|
|
|
static bool Active(void);
|
2011-11-22 01:15:09 +01:00
|
|
|
|
|
|
|
static const cList<cServerConnection>& Clients(cThreadLock& Lock);
|
2004-12-30 23:43:55 +01:00
|
|
|
};
|
|
|
|
|
2005-05-09 22:22:29 +02:00
|
|
|
inline bool cStreamdevServer::Active(void)
|
|
|
|
{
|
|
|
|
return m_Instance != NULL
|
|
|
|
&& m_Instance->m_Clients.Count() > 0;
|
2004-12-30 23:43:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
extern cSVDRPhosts StreamdevHosts;
|
|
|
|
|
|
|
|
#endif // VDR_STREAMDEV_SERVER_H
|