mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
Added server menu with list of clients. Connections can be terminated
with the "red" key. The former main menu action of suspending live TV moved to the "blue" key. Squashed commit of the following: commit7175d7de91
Author: Frank Schmirler <vdr@schmirler.de> Date: Sun Nov 27 11:51:26 2011 +0100 Updated README commit94aef85adc
Author: Frank Schmirler <vdr@schmirler.de> Date: Sun Nov 27 11:32:16 2011 +0100 Moved "closing connection" log message to overload of cTBSocket::Close() in cServerConnection. commit9b91301d94
Author: Frank Schmirler <vdr@schmirler.de> Date: Fri Nov 25 00:24:37 2011 +0100 Don't keep a pointer to the connection in components MulticastGroup structure as the connection may now be deleted from outside via menu. commit7347e24123
Author: Frank Schmirler <vdr@schmirler.de> Date: Thu Nov 24 23:45:59 2011 +0100 Fixed missing Display() call after disconnecting a client. commitc652e8fa81
Author: Frank Schmirler <vdr@schmirler.de> Date: Tue Nov 22 01:15:09 2011 +0100 Added server menu with list of clients. Connections can be terminated with the "red" key. The former main menu action of suspending live TV moved to the "blue" key.
This commit is contained in:
parent
ce1583a756
commit
afe255aa0b
3
HISTORY
3
HISTORY
@ -1,6 +1,9 @@
|
|||||||
VDR Plugin 'streamdev' Revision History
|
VDR Plugin 'streamdev' Revision History
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
|
- Added server menu with list of clients. Connections can be terminated
|
||||||
|
with the "red" key. The former main menu action of suspending live TV
|
||||||
|
moved to the "blue" key.
|
||||||
- code cleanup and optimization (thanks to Ville Skyttä)
|
- code cleanup and optimization (thanks to Ville Skyttä)
|
||||||
- properly shutdown IGMP timeout handler thread when the plugin is stopped.
|
- properly shutdown IGMP timeout handler thread when the plugin is stopped.
|
||||||
Fixes occasional segfaults on VDR exit.
|
Fixes occasional segfaults on VDR exit.
|
||||||
|
18
README
18
README
@ -175,10 +175,16 @@ Start the server core itself by specifying -Pstreamdev-server on your VDR
|
|||||||
commandline. To use the client core, specify -Pstreamdev-client. Both parts
|
commandline. To use the client core, specify -Pstreamdev-client. Both parts
|
||||||
can run in one VDR instance, if necessary.
|
can run in one VDR instance, if necessary.
|
||||||
|
|
||||||
|
On the server, the main menu entry "Streamdev Connections" gives you a list
|
||||||
|
of currently connected clients. Use the "red" key to terminate a connection.
|
||||||
|
Note that depending on connection type and client, the client might re-connect
|
||||||
|
sooner or later. Depending on the server setup, the "blue" key might be enabled
|
||||||
|
as well. Please read below.
|
||||||
|
|
||||||
The parameter "Suspend behaviour" allows you to specify how the server should
|
The parameter "Suspend behaviour" allows you to specify how the server should
|
||||||
react in case the client requests a channel that would require switching the
|
react in case the client requests a channel that would require switching the
|
||||||
primary device (i.e. disrupt live-tv). If set to "Offer suspend mode", you will
|
primary device (i.e. disrupt live-tv). If set to "Offer suspend mode", you
|
||||||
have a new entry in the main menu. Activating that will put the server into
|
enable the "blue" key in the server's main menu. It will put the server into
|
||||||
"Suspend Mode" (a picture is displayed on TV). Then, a client may switch the
|
"Suspend Mode" (a picture is displayed on TV). Then, a client may switch the
|
||||||
primary card to wherever it likes to. While watching TV (Suspend deactivated),
|
primary card to wherever it likes to. While watching TV (Suspend deactivated),
|
||||||
the client may not switch the transponder on the primary device. If you set
|
the client may not switch the transponder on the primary device. If you set
|
||||||
@ -190,10 +196,10 @@ suspend" to yes, the client can suspend the server remotely (this only applies
|
|||||||
if "Offer suspend mode" is selected).
|
if "Offer suspend mode" is selected).
|
||||||
|
|
||||||
NOTE: This mainly applies to One-Card-Systems, since with multiple cards there
|
NOTE: This mainly applies to One-Card-Systems, since with multiple cards there
|
||||||
is no need to switch transponders on the primary interface, if the secondary
|
is no need to switch transponders on the primary interface, if on of the other
|
||||||
can stream a given channel (i.e. if it is not blocked by a recording). If both
|
cards is idle (i.e. if it is not blocked by a recording). If all cards are in
|
||||||
cards are in use (i.e. when something is recorded, or by multiple clients),
|
use (i.e. when something is recorded, or by multiple clients), this applies to
|
||||||
this applies to Multiple-Card-Systems as well.
|
Multiple-Card-Systems as well.
|
||||||
|
|
||||||
3.1 Usage HTTP server:
|
3.1 Usage HTTP server:
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -23,7 +23,7 @@ SERVEROBJS = $(PLUGIN).o \
|
|||||||
componentHTTP.o connectionHTTP.o menuHTTP.o \
|
componentHTTP.o connectionHTTP.o menuHTTP.o \
|
||||||
componentIGMP.o connectionIGMP.o \
|
componentIGMP.o connectionIGMP.o \
|
||||||
streamer.o livestreamer.o livefilter.o recplayer.o \
|
streamer.o livestreamer.o livefilter.o recplayer.o \
|
||||||
suspend.o setup.o
|
menu.o suspend.o setup.o
|
||||||
|
|
||||||
### The main target:
|
### The main target:
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "server/componentIGMP.h"
|
#include "server/componentIGMP.h"
|
||||||
#include "server/connectionIGMP.h"
|
#include "server/connectionIGMP.h"
|
||||||
|
#include "server/server.h"
|
||||||
#include "server/setup.h"
|
#include "server/setup.h"
|
||||||
|
|
||||||
#ifndef IGMP_ALL_HOSTS
|
#ifndef IGMP_ALL_HOSTS
|
||||||
@ -37,7 +38,6 @@
|
|||||||
class cMulticastGroup: public cListObject
|
class cMulticastGroup: public cListObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cConnectionIGMP *connection;
|
|
||||||
in_addr_t group;
|
in_addr_t group;
|
||||||
in_addr_t reporter;
|
in_addr_t reporter;
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
@ -48,7 +48,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
cMulticastGroup::cMulticastGroup(in_addr_t Group) :
|
cMulticastGroup::cMulticastGroup(in_addr_t Group) :
|
||||||
connection(NULL),
|
|
||||||
group(Group),
|
group(Group),
|
||||||
reporter(0)
|
reporter(0)
|
||||||
{
|
{
|
||||||
@ -235,10 +234,7 @@ cServerConnection* cComponentIGMP::ProcessMessage(struct igmp *Igmp, in_addr_t G
|
|||||||
group = new cMulticastGroup(Group);
|
group = new cMulticastGroup(Group);
|
||||||
m_Groups.Add(group);
|
m_Groups.Add(group);
|
||||||
}
|
}
|
||||||
if (!group->connection) {
|
conn = IGMPStartMulticast(group);
|
||||||
IGMPStartMulticast(group);
|
|
||||||
conn = group->connection;
|
|
||||||
}
|
|
||||||
IGMPStartTimer(group, Sender);
|
IGMPStartTimer(group, Sender);
|
||||||
if (Igmp->igmp_type == IGMP_V1_MEMBERSHIP_REPORT)
|
if (Igmp->igmp_type == IGMP_V1_MEMBERSHIP_REPORT)
|
||||||
IGMPStartV1HostTimer(group);
|
IGMPStartV1HostTimer(group);
|
||||||
@ -430,20 +426,36 @@ void cComponentIGMP::IGMPSendGroupQuery(cMulticastGroup* Group)
|
|||||||
IGMPSendQuery(Group->group, IGMP_LAST_MEMBER_QUERY_INTERVAL_TS);
|
IGMPSendQuery(Group->group, IGMP_LAST_MEMBER_QUERY_INTERVAL_TS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cComponentIGMP::IGMPStartMulticast(cMulticastGroup* Group)
|
cServerConnection* cComponentIGMP::IGMPStartMulticast(cMulticastGroup* Group)
|
||||||
{
|
{
|
||||||
|
cServerConnection *conn = NULL;
|
||||||
in_addr_t g = ntohl(Group->group);
|
in_addr_t g = ntohl(Group->group);
|
||||||
if (g > MULTICAST_PRIV_MIN && g <= MULTICAST_PRIV_MAX) {
|
if (g > MULTICAST_PRIV_MIN && g <= MULTICAST_PRIV_MAX) {
|
||||||
|
cThreadLock lock;
|
||||||
cChannel *channel = Channels.GetByNumber(g - MULTICAST_PRIV_MIN);
|
cChannel *channel = Channels.GetByNumber(g - MULTICAST_PRIV_MIN);
|
||||||
Group->connection = (cConnectionIGMP*) NewClient();
|
const cList<cServerConnection>& clients = cStreamdevServer::Clients(lock);
|
||||||
if (!Group->connection->SetChannel(channel, Group->group)) {
|
cServerConnection *s = clients.First();
|
||||||
DELETENULL(Group->connection);
|
while (s) {
|
||||||
|
if (s->RemoteIpAddr() == Group->group)
|
||||||
|
break;
|
||||||
|
s = clients.Next(s);
|
||||||
|
}
|
||||||
|
if (!s) {
|
||||||
|
conn = NewClient();
|
||||||
|
if (!((cConnectionIGMP *)conn)->SetChannel(channel, Group->group)) {
|
||||||
|
DELETENULL(conn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cComponentIGMP::IGMPStopMulticast(cMulticastGroup* Group)
|
void cComponentIGMP::IGMPStopMulticast(cMulticastGroup* Group)
|
||||||
{
|
{
|
||||||
if (Group->connection)
|
cThreadLock lock;
|
||||||
Group->connection->Stop();
|
const cList<cServerConnection>& clients = cStreamdevServer::Clients(lock);
|
||||||
|
for (cServerConnection *s = clients.First(); s; s = clients.Next(s)) {
|
||||||
|
if (s->RemoteIpAddr() == Group->group)
|
||||||
|
s->Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include <vdr/thread.h>
|
#include <vdr/thread.h>
|
||||||
#include "server/component.h"
|
#include "server/component.h"
|
||||||
|
|
||||||
class cConnectionIGMP;
|
|
||||||
class cMulticastGroup;
|
class cMulticastGroup;
|
||||||
|
|
||||||
class cComponentIGMP: public cServerComponent, public cThread {
|
class cComponentIGMP: public cServerComponent, public cThread {
|
||||||
@ -42,7 +41,7 @@ private:
|
|||||||
void IGMPStartRetransmitTimer(cMulticastGroup* Group);
|
void IGMPStartRetransmitTimer(cMulticastGroup* Group);
|
||||||
void IGMPClearRetransmitTimer(cMulticastGroup* Group);
|
void IGMPClearRetransmitTimer(cMulticastGroup* Group);
|
||||||
void IGMPSendGroupQuery(cMulticastGroup* Group);
|
void IGMPSendGroupQuery(cMulticastGroup* Group);
|
||||||
void IGMPStartMulticast(cMulticastGroup* Group);
|
cServerConnection* IGMPStartMulticast(cMulticastGroup* Group);
|
||||||
void IGMPStopMulticast(cMulticastGroup* Group);
|
void IGMPStopMulticast(cMulticastGroup* Group);
|
||||||
|
|
||||||
virtual void Action();
|
virtual void Action();
|
||||||
|
@ -237,6 +237,13 @@ bool cServerConnection::Respond(const char *Message, bool Last, ...)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cServerConnection::Close()
|
||||||
|
{
|
||||||
|
if (IsOpen())
|
||||||
|
isyslog("streamdev-server: closing %s connection to %s:%d", Protocol(), RemoteIp().c_str(), RemotePort());
|
||||||
|
return cTBSocket::Close();
|
||||||
|
}
|
||||||
|
|
||||||
#if APIVERSNUM >= 10700
|
#if APIVERSNUM >= 10700
|
||||||
static int GetClippedNumProvidedSystems(int AvailableBits, cDevice *Device)
|
static int GetClippedNumProvidedSystems(int AvailableBits, cDevice *Device)
|
||||||
{
|
{
|
||||||
@ -407,3 +414,6 @@ void cServerConnection::MainThreadHook()
|
|||||||
{
|
{
|
||||||
m_SwitchLive->Switch();
|
m_SwitchLive->Switch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cString cServerConnection::ToText() const
|
||||||
|
{ return cString::sprintf("%s\t%s:%d", Protocol(), RemoteIp().c_str(), RemotePort()); }
|
||||||
|
@ -103,6 +103,9 @@ public:
|
|||||||
/* Will make the socket close after sending all queued output data */
|
/* Will make the socket close after sending all queued output data */
|
||||||
void DeferClose(void) { m_DeferClose = true; }
|
void DeferClose(void) { m_DeferClose = true; }
|
||||||
|
|
||||||
|
/* Close the socket */
|
||||||
|
virtual bool Close(void);
|
||||||
|
|
||||||
/* Will retrieve an unused device for transmitting data. Receivers have
|
/* Will retrieve an unused device for transmitting data. Receivers have
|
||||||
already been attached from the device if necessary. Use the returned
|
already been attached from the device if necessary. Use the returned
|
||||||
cDevice in a following call to StartTransfer */
|
cDevice in a following call to StartTransfer */
|
||||||
@ -122,6 +125,9 @@ public:
|
|||||||
/* This connections protocol name */
|
/* This connections protocol name */
|
||||||
virtual const char* Protocol(void) const { return m_Protocol; }
|
virtual const char* Protocol(void) const { return m_Protocol; }
|
||||||
|
|
||||||
|
/* Representation in menu */
|
||||||
|
virtual cString ToText(void) const;
|
||||||
|
|
||||||
/* std::map with additional information */
|
/* std::map with additional information */
|
||||||
const tStrStrMap& Headers(void) const { return m_Headers; }
|
const tStrStrMap& Headers(void) const { return m_Headers; }
|
||||||
};
|
};
|
||||||
|
@ -359,3 +359,8 @@ bool cConnectionHTTP::ProcessURI(const std::string& PathInfo)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cString cConnectionHTTP::ToText() const
|
||||||
|
{
|
||||||
|
cString str = cServerConnection::ToText();
|
||||||
|
return m_LiveStreamer ? cString::sprintf("%s\t%s", *str, *m_LiveStreamer->ToText()) : str;
|
||||||
|
}
|
||||||
|
@ -47,6 +47,8 @@ public:
|
|||||||
virtual void Attach(void) { if (m_LiveStreamer != NULL) m_LiveStreamer->Attach(); }
|
virtual void Attach(void) { if (m_LiveStreamer != NULL) m_LiveStreamer->Attach(); }
|
||||||
virtual void Detach(void) { if (m_LiveStreamer != NULL) m_LiveStreamer->Detach(); }
|
virtual void Detach(void) { if (m_LiveStreamer != NULL) m_LiveStreamer->Detach(); }
|
||||||
|
|
||||||
|
virtual cString ToText() const;
|
||||||
|
|
||||||
virtual bool CanAuthenticate(void);
|
virtual bool CanAuthenticate(void);
|
||||||
|
|
||||||
virtual bool Command(char *Cmd);
|
virtual bool Command(char *Cmd);
|
||||||
@ -57,7 +59,7 @@ public:
|
|||||||
|
|
||||||
inline bool cConnectionHTTP::Abort(void) const
|
inline bool cConnectionHTTP::Abort(void) const
|
||||||
{
|
{
|
||||||
return m_LiveStreamer && m_LiveStreamer->Abort();
|
return !IsOpen() || (m_LiveStreamer && m_LiveStreamer->Abort());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // VDR_STREAMDEV_SERVERS_CONNECTIONVTP_H
|
#endif // VDR_STREAMDEV_SERVERS_CONNECTIONVTP_H
|
||||||
|
@ -64,10 +64,15 @@ void cConnectionIGMP::Welcome()
|
|||||||
esyslog("streamdev-server IGMP: GetDevice failed");
|
esyslog("streamdev-server IGMP: GetDevice failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
void cConnectionIGMP::Stop()
|
bool cConnectionIGMP::Close()
|
||||||
{
|
{
|
||||||
if (m_LiveStreamer) {
|
if (m_LiveStreamer)
|
||||||
m_LiveStreamer->Stop();
|
m_LiveStreamer->Stop();
|
||||||
DELETENULL(m_LiveStreamer);
|
return cServerConnection::Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cString cConnectionIGMP::ToText() const
|
||||||
|
{
|
||||||
|
cString str = cServerConnection::ToText();
|
||||||
|
return m_LiveStreamer ? cString::sprintf("%s\t%s", *str, *m_LiveStreamer->ToText()) : str;
|
||||||
}
|
}
|
||||||
|
@ -28,20 +28,21 @@ public:
|
|||||||
|
|
||||||
bool SetChannel(cChannel *Channel, in_addr_t Dst);
|
bool SetChannel(cChannel *Channel, in_addr_t Dst);
|
||||||
virtual void Welcome(void);
|
virtual void Welcome(void);
|
||||||
void Stop();
|
virtual cString ToText() const;
|
||||||
|
|
||||||
/* Not used here */
|
/* Not used here */
|
||||||
virtual bool Command(char *Cmd) { return false; }
|
virtual bool Command(char *Cmd) { return false; }
|
||||||
|
|
||||||
virtual void Attach(void) { if (m_LiveStreamer != NULL) m_LiveStreamer->Attach(); }
|
virtual void Attach(void) { if (m_LiveStreamer != NULL) m_LiveStreamer->Attach(); }
|
||||||
virtual void Detach(void) { if (m_LiveStreamer != NULL) m_LiveStreamer->Detach(); }
|
virtual void Detach(void) { if (m_LiveStreamer != NULL) m_LiveStreamer->Detach(); }
|
||||||
|
virtual bool Close(void);
|
||||||
|
|
||||||
virtual bool Abort(void) const;
|
virtual bool Abort(void) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool cConnectionIGMP::Abort(void) const
|
inline bool cConnectionIGMP::Abort(void) const
|
||||||
{
|
{
|
||||||
return !m_LiveStreamer || m_LiveStreamer->Abort();
|
return !IsOpen() || !m_LiveStreamer || m_LiveStreamer->Abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // VDR_STREAMDEV_SERVERS_CONNECTIONIGMP_H
|
#endif // VDR_STREAMDEV_SERVERS_CONNECTIONIGMP_H
|
||||||
|
@ -774,7 +774,7 @@ cConnectionVTP::~cConnectionVTP()
|
|||||||
|
|
||||||
bool cConnectionVTP::Abort(void) const
|
bool cConnectionVTP::Abort(void) const
|
||||||
{
|
{
|
||||||
return (m_LiveStreamer && m_LiveStreamer->Abort()) ||
|
return !IsOpen() || (m_LiveStreamer && m_LiveStreamer->Abort()) ||
|
||||||
(m_FilterStreamer && m_FilterStreamer->Abort());
|
(m_FilterStreamer && m_FilterStreamer->Abort());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1811,3 +1811,14 @@ bool cConnectionVTP::Respond(int Code, const char *Message, ...)
|
|||||||
Code < 0 ? -Code : Code,
|
Code < 0 ? -Code : Code,
|
||||||
Code < 0 ? '-' : ' ', *str);
|
Code < 0 ? '-' : ' ', *str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cString cConnectionVTP::ToText() const
|
||||||
|
{
|
||||||
|
cString str = cServerConnection::ToText();
|
||||||
|
if (m_LiveStreamer)
|
||||||
|
return cString::sprintf("%s\t%s", *str, *m_LiveStreamer->ToText());
|
||||||
|
else if (m_RecPlayer)
|
||||||
|
return cString::sprintf("%s\t%s", *str, m_RecPlayer->getCurrentRecording()->Name());
|
||||||
|
else
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
@ -53,6 +53,8 @@ public:
|
|||||||
virtual void Welcome(void);
|
virtual void Welcome(void);
|
||||||
virtual void Reject(void);
|
virtual void Reject(void);
|
||||||
|
|
||||||
|
virtual cString ToText() const;
|
||||||
|
|
||||||
virtual bool Abort(void) const;
|
virtual bool Abort(void) const;
|
||||||
virtual void Detach(void);
|
virtual void Detach(void);
|
||||||
virtual void Attach(void);
|
virtual void Attach(void);
|
||||||
|
@ -460,6 +460,14 @@ void cStreamdevLiveStreamer::GetSignal(int *DevNum, int *Strength, int *Quality)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cString cStreamdevLiveStreamer::ToText() const
|
||||||
|
{
|
||||||
|
if (m_Device && m_Channel) {
|
||||||
|
return cString::sprintf("DVB%-2d %3d %s", m_Device->DeviceNumber() + 1, m_Channel->Number(), m_Channel->Name());
|
||||||
|
}
|
||||||
|
return cString("");
|
||||||
|
}
|
||||||
|
|
||||||
void cStreamdevLiveStreamer::StartReceiver(void)
|
void cStreamdevLiveStreamer::StartReceiver(void)
|
||||||
{
|
{
|
||||||
if (m_NumPids > 0) {
|
if (m_NumPids > 0) {
|
||||||
|
@ -40,6 +40,7 @@ public:
|
|||||||
bool SetChannel(const cChannel *Channel, eStreamType StreamType, const int* Apid = NULL, const int* Dpid = NULL);
|
bool SetChannel(const cChannel *Channel, eStreamType StreamType, const int* Apid = NULL, const int* Dpid = NULL);
|
||||||
void SetPriority(int Priority);
|
void SetPriority(int Priority);
|
||||||
void GetSignal(int *DevNum, int *Strength, int *Quality) const;
|
void GetSignal(int *DevNum, int *Strength, int *Quality) const;
|
||||||
|
cString ToText() const;
|
||||||
|
|
||||||
virtual int Put(const uchar *Data, int Count);
|
virtual int Put(const uchar *Data, int Count);
|
||||||
virtual uchar *Get(int &Count);
|
virtual uchar *Get(int &Count);
|
||||||
|
68
server/menu.c
Normal file
68
server/menu.c
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
* $Id: menu.c,v 1.10 2010/07/19 13:49:31 schmirl Exp $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <vdr/menuitems.h>
|
||||||
|
#include <vdr/thread.h>
|
||||||
|
#include <vdr/player.h>
|
||||||
|
|
||||||
|
#include "server/menu.h"
|
||||||
|
#include "server/setup.h"
|
||||||
|
#include "server/server.h"
|
||||||
|
#include "server/suspend.h"
|
||||||
|
|
||||||
|
cStreamdevServerMenu::cStreamdevServerMenu(): cOsdMenu(tr("Streamdev Connections"), 4, 20) {
|
||||||
|
cThreadLock lock;
|
||||||
|
const cList<cServerConnection>& clients = cStreamdevServer::Clients(lock);
|
||||||
|
for (cServerConnection *s = clients.First(); s; s = clients.Next(s))
|
||||||
|
Add(new cOsdItem(s->ToText()));
|
||||||
|
SetHelpKeys();
|
||||||
|
Display();
|
||||||
|
}
|
||||||
|
|
||||||
|
cStreamdevServerMenu::~cStreamdevServerMenu() {
|
||||||
|
}
|
||||||
|
|
||||||
|
void cStreamdevServerMenu::SetHelpKeys() {
|
||||||
|
SetHelp(Count() ? tr("Disconnect") : NULL, NULL, NULL, StreamdevServerSetup.SuspendMode == smOffer ? tr("Suspend") : NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
eOSState cStreamdevServerMenu::Disconnect() {
|
||||||
|
cOsdItem *item = Get(Current());
|
||||||
|
if (item) {
|
||||||
|
cThreadLock lock;
|
||||||
|
const cList<cServerConnection>& clients = cStreamdevServer::Clients(lock);
|
||||||
|
const char *text = item->Text();
|
||||||
|
for (cServerConnection *s = clients.First(); s; s = clients.Next(s)) {
|
||||||
|
if (!strcmp(text, s->ToText())) {
|
||||||
|
s->Close();
|
||||||
|
Del(Current());
|
||||||
|
SetHelpKeys();
|
||||||
|
Display();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return osContinue;
|
||||||
|
}
|
||||||
|
|
||||||
|
eOSState cStreamdevServerMenu::Suspend() {
|
||||||
|
if (StreamdevServerSetup.SuspendMode == smOffer && !cSuspendCtl::IsActive()) {
|
||||||
|
cControl::Launch(new cSuspendCtl);
|
||||||
|
return osBack;
|
||||||
|
}
|
||||||
|
return osContinue;
|
||||||
|
}
|
||||||
|
|
||||||
|
eOSState cStreamdevServerMenu::ProcessKey(eKeys Key) {
|
||||||
|
eOSState state = cOsdMenu::ProcessKey(Key);
|
||||||
|
if (state == osUnknown) {
|
||||||
|
switch (Key) {
|
||||||
|
case kRed: return Disconnect();
|
||||||
|
case kBlue: return Suspend();
|
||||||
|
case kOk: return osBack;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
24
server/menu.h
Normal file
24
server/menu.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* $Id: menu.h,v 1.4 2010/07/19 13:49:31 schmirl Exp $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef VDR_STREAMDEV_MENU_H
|
||||||
|
#define VDR_STREAMDEV_MENU_H
|
||||||
|
|
||||||
|
#include <vdr/osdbase.h>
|
||||||
|
#include "connection.h"
|
||||||
|
|
||||||
|
class cStreamdevServerMenu: public cOsdMenu {
|
||||||
|
private:
|
||||||
|
void SetHelpKeys();
|
||||||
|
eOSState Disconnect();
|
||||||
|
eOSState Suspend();
|
||||||
|
protected:
|
||||||
|
virtual eOSState ProcessKey(eKeys Key);
|
||||||
|
|
||||||
|
public:
|
||||||
|
cStreamdevServerMenu();
|
||||||
|
virtual ~cStreamdevServerMenu();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // VDR_STREAMDEV_MENU_H
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: streamdev 0.5.0\n"
|
"Project-Id-Version: streamdev 0.5.0\n"
|
||||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||||
"POT-Creation-Date: 2010-06-14 13:06+0200\n"
|
"POT-Creation-Date: 2011-11-22 01:05+0100\n"
|
||||||
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
|
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
|
||||||
"Last-Translator: Frank Schmirler <vdrdev@schmirler.de>\n"
|
"Last-Translator: Frank Schmirler <vdrdev@schmirler.de>\n"
|
||||||
"Language-Team: <vdr@linuxtv.org>\n"
|
"Language-Team: <vdr@linuxtv.org>\n"
|
||||||
@ -21,8 +21,14 @@ msgstr "VDR Streaming Server"
|
|||||||
msgid "Streaming active"
|
msgid "Streaming active"
|
||||||
msgstr "Streamen im Gange"
|
msgstr "Streamen im Gange"
|
||||||
|
|
||||||
msgid "Suspend Live TV"
|
msgid "Streamdev Connections"
|
||||||
msgstr "Live-TV pausieren"
|
msgstr "Streamdev Verbindungen"
|
||||||
|
|
||||||
|
msgid "Disconnect"
|
||||||
|
msgstr "Trennen"
|
||||||
|
|
||||||
|
msgid "Suspend"
|
||||||
|
msgstr "Pausieren"
|
||||||
|
|
||||||
msgid "Offer suspend mode"
|
msgid "Offer suspend mode"
|
||||||
msgstr "Pausieren anbieten"
|
msgstr "Pausieren anbieten"
|
||||||
@ -80,4 +86,3 @@ msgstr "Port des Multicast Clients"
|
|||||||
|
|
||||||
msgid "Multicast Streamtype"
|
msgid "Multicast Streamtype"
|
||||||
msgstr "Multicast Streamtyp"
|
msgstr "Multicast Streamtyp"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: streamdev 0.5.0\n"
|
"Project-Id-Version: streamdev 0.5.0\n"
|
||||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||||
"POT-Creation-Date: 2010-06-14 13:06+0200\n"
|
"POT-Creation-Date: 2011-11-22 01:05+0100\n"
|
||||||
"PO-Revision-Date: 2010-06-19 03:58+0100\n"
|
"PO-Revision-Date: 2010-06-19 03:58+0100\n"
|
||||||
"Last-Translator: Javier Bradineras <jbradi@hotmail.com>\n"
|
"Last-Translator: Javier Bradineras <jbradi@hotmail.com>\n"
|
||||||
"Language-Team: <vdr@linuxtv.org>\n"
|
"Language-Team: <vdr@linuxtv.org>\n"
|
||||||
@ -21,8 +21,14 @@ msgstr "Servidor de transmisiones del VDR"
|
|||||||
msgid "Streaming active"
|
msgid "Streaming active"
|
||||||
msgstr "Trasmisión activa"
|
msgstr "Trasmisión activa"
|
||||||
|
|
||||||
msgid "Suspend Live TV"
|
msgid "Streamdev Connections"
|
||||||
msgstr "Suspender TV en vivo"
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Suspend"
|
||||||
|
msgstr "Suspender"
|
||||||
|
|
||||||
msgid "Offer suspend mode"
|
msgid "Offer suspend mode"
|
||||||
msgstr "Ofrecer modo de suspensión"
|
msgstr "Ofrecer modo de suspensión"
|
||||||
@ -80,5 +86,3 @@ msgstr "Puerto del Cliente Multicast"
|
|||||||
|
|
||||||
msgid "Multicast Streamtype"
|
msgid "Multicast Streamtype"
|
||||||
msgstr "Tipo de flujo Multicast"
|
msgstr "Tipo de flujo Multicast"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: streamdev 0.5.0\n"
|
"Project-Id-Version: streamdev 0.5.0\n"
|
||||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||||
"POT-Creation-Date: 2010-06-14 13:06+0200\n"
|
"POT-Creation-Date: 2011-11-22 01:05+0100\n"
|
||||||
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
|
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
|
||||||
"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
|
"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
|
||||||
"Language-Team: <vdr@linuxtv.org>\n"
|
"Language-Team: <vdr@linuxtv.org>\n"
|
||||||
@ -21,8 +21,14 @@ msgstr "VDR-suoratoistopalvelin"
|
|||||||
msgid "Streaming active"
|
msgid "Streaming active"
|
||||||
msgstr "Suoratoistopalvelin aktiivinen"
|
msgstr "Suoratoistopalvelin aktiivinen"
|
||||||
|
|
||||||
msgid "Suspend Live TV"
|
msgid "Streamdev Connections"
|
||||||
msgstr "Pysäytä suora TV-lähetys"
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Suspend"
|
||||||
|
msgstr "Pysäytä"
|
||||||
|
|
||||||
msgid "Offer suspend mode"
|
msgid "Offer suspend mode"
|
||||||
msgstr "tyrkytä"
|
msgstr "tyrkytä"
|
||||||
@ -80,4 +86,3 @@ msgstr "Multicast-portti"
|
|||||||
|
|
||||||
msgid "Multicast Streamtype"
|
msgid "Multicast Streamtype"
|
||||||
msgstr "Multicast-lähetysmuoto"
|
msgstr "Multicast-lähetysmuoto"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: streamdev 0.5.0\n"
|
"Project-Id-Version: streamdev 0.5.0\n"
|
||||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||||
"POT-Creation-Date: 2010-06-14 13:06+0200\n"
|
"POT-Creation-Date: 2011-11-22 01:05+0100\n"
|
||||||
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
|
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
|
||||||
"Last-Translator: micky979 <micky979@free.fr>\n"
|
"Last-Translator: micky979 <micky979@free.fr>\n"
|
||||||
"Language-Team: <vdr@linuxtv.org>\n"
|
"Language-Team: <vdr@linuxtv.org>\n"
|
||||||
@ -21,8 +21,14 @@ msgstr "Serveur de streaming VDR"
|
|||||||
msgid "Streaming active"
|
msgid "Streaming active"
|
||||||
msgstr "Streaming actif"
|
msgstr "Streaming actif"
|
||||||
|
|
||||||
msgid "Suspend Live TV"
|
msgid "Streamdev Connections"
|
||||||
msgstr "Suspendre Live TV"
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Suspend"
|
||||||
|
msgstr "Suspendre"
|
||||||
|
|
||||||
msgid "Offer suspend mode"
|
msgid "Offer suspend mode"
|
||||||
msgstr "Offrir le mode suspendre"
|
msgstr "Offrir le mode suspendre"
|
||||||
@ -80,4 +86,3 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "Multicast Streamtype"
|
msgid "Multicast Streamtype"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: streamdev 0.5.0\n"
|
"Project-Id-Version: streamdev 0.5.0\n"
|
||||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||||
"POT-Creation-Date: 2010-06-14 13:06+0200\n"
|
"POT-Creation-Date: 2011-11-22 01:05+0100\n"
|
||||||
"PO-Revision-Date: 2010-06-19 03:58+0100\n"
|
"PO-Revision-Date: 2010-06-19 03:58+0100\n"
|
||||||
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
|
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
|
||||||
"Language-Team: <vdr@linuxtv.org>\n"
|
"Language-Team: <vdr@linuxtv.org>\n"
|
||||||
@ -23,8 +23,14 @@ msgstr "Server trasmissione VDR"
|
|||||||
msgid "Streaming active"
|
msgid "Streaming active"
|
||||||
msgstr "Trasmissione attiva"
|
msgstr "Trasmissione attiva"
|
||||||
|
|
||||||
msgid "Suspend Live TV"
|
msgid "Streamdev Connections"
|
||||||
msgstr "Sospendi TV dal vivo"
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Suspend"
|
||||||
|
msgstr "Sospendi"
|
||||||
|
|
||||||
msgid "Offer suspend mode"
|
msgid "Offer suspend mode"
|
||||||
msgstr "Offri mod. sospensione"
|
msgstr "Offri mod. sospensione"
|
||||||
@ -82,4 +88,3 @@ msgstr "Porta Client Multicast"
|
|||||||
|
|
||||||
msgid "Multicast Streamtype"
|
msgid "Multicast Streamtype"
|
||||||
msgstr "Tipo flusso Multicast"
|
msgstr "Tipo flusso Multicast"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: streamdev 0.5.0\n"
|
"Project-Id-Version: streamdev 0.5.0\n"
|
||||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||||
"POT-Creation-Date: 2010-06-14 13:06+0200\n"
|
"POT-Creation-Date: 2011-11-22 01:05+0100\n"
|
||||||
"PO-Revision-Date: 2009-11-26 21:57+0200\n"
|
"PO-Revision-Date: 2009-11-26 21:57+0200\n"
|
||||||
"Last-Translator: Valdemaras Pipiras <varas@ambernet.lt>\n"
|
"Last-Translator: Valdemaras Pipiras <varas@ambernet.lt>\n"
|
||||||
"Language-Team: Lietuvių\n"
|
"Language-Team: Lietuvių\n"
|
||||||
@ -21,8 +21,14 @@ msgstr "VDR transliavimo serveris"
|
|||||||
msgid "Streaming active"
|
msgid "Streaming active"
|
||||||
msgstr "Transliavimas vyksta"
|
msgstr "Transliavimas vyksta"
|
||||||
|
|
||||||
msgid "Suspend Live TV"
|
msgid "Streamdev Connections"
|
||||||
msgstr "Pristabdyti Live TV"
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Suspend"
|
||||||
|
msgstr "Pristabdyti"
|
||||||
|
|
||||||
msgid "Offer suspend mode"
|
msgid "Offer suspend mode"
|
||||||
msgstr "Klausti dėl sustabdymo"
|
msgstr "Klausti dėl sustabdymo"
|
||||||
@ -80,4 +86,3 @@ msgstr "Multicast kliento portas"
|
|||||||
|
|
||||||
msgid "Multicast Streamtype"
|
msgid "Multicast Streamtype"
|
||||||
msgstr "Multicast transliavimo tipas"
|
msgstr "Multicast transliavimo tipas"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: streamdev 0.5.0\n"
|
"Project-Id-Version: streamdev 0.5.0\n"
|
||||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||||
"POT-Creation-Date: 2010-06-14 13:06+0200\n"
|
"POT-Creation-Date: 2011-11-22 01:05+0100\n"
|
||||||
"PO-Revision-Date: 2008-06-26 15:36+0100\n"
|
"PO-Revision-Date: 2008-06-26 15:36+0100\n"
|
||||||
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
|
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
|
||||||
"Language-Team: <vdr@linuxtv.org>\n"
|
"Language-Team: <vdr@linuxtv.org>\n"
|
||||||
@ -21,8 +21,14 @@ msgstr "VDR Streaming
|
|||||||
msgid "Streaming active"
|
msgid "Streaming active"
|
||||||
msgstr "ÁâàØÜØÝÓ ÐÚâØÒÕÝ"
|
msgstr "ÁâàØÜØÝÓ ÐÚâØÒÕÝ"
|
||||||
|
|
||||||
msgid "Suspend Live TV"
|
msgid "Streamdev Connections"
|
||||||
msgstr "¾áâÐÝÞÒÚÐ Live TV"
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Suspend"
|
||||||
|
msgstr "¾áâÐÝÞÒÚÐ"
|
||||||
|
|
||||||
msgid "Offer suspend mode"
|
msgid "Offer suspend mode"
|
||||||
msgstr "¿àÕÔÛÐÓÐâì ÞáâÐÝÞÒÚã"
|
msgstr "¿àÕÔÛÐÓÐâì ÞáâÐÝÞÒÚã"
|
||||||
@ -80,4 +86,3 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "Multicast Streamtype"
|
msgid "Multicast Streamtype"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: streamdev_SK\n"
|
"Project-Id-Version: streamdev_SK\n"
|
||||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||||
"POT-Creation-Date: 2010-06-14 13:06+0200\n"
|
"POT-Creation-Date: 2011-11-22 01:05+0100\n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
||||||
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
||||||
"Language-Team: Slovak <hrala.milan@gmail.com>\n"
|
"Language-Team: Slovak <hrala.milan@gmail.com>\n"
|
||||||
@ -23,8 +23,14 @@ msgstr "VDR pr
|
|||||||
msgid "Streaming active"
|
msgid "Streaming active"
|
||||||
msgstr "streamovanie aktivne"
|
msgstr "streamovanie aktivne"
|
||||||
|
|
||||||
msgid "Suspend Live TV"
|
msgid "Streamdev Connections"
|
||||||
msgstr "Pozastavenie živého vysielania"
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Suspend"
|
||||||
|
msgstr "Pozastavenie"
|
||||||
|
|
||||||
msgid "Offer suspend mode"
|
msgid "Offer suspend mode"
|
||||||
msgstr "Výber re¾ímu pozastavenia"
|
msgstr "Výber re¾ímu pozastavenia"
|
||||||
@ -82,4 +88,3 @@ msgstr "Port klienta Multicast"
|
|||||||
|
|
||||||
msgid "Multicast Streamtype"
|
msgid "Multicast Streamtype"
|
||||||
msgstr "Multicast typ streamu"
|
msgstr "Multicast typ streamu"
|
||||||
|
|
||||||
|
@ -152,9 +152,8 @@ void cStreamdevServer::Action(void)
|
|||||||
|
|
||||||
cServerConnection *next = m_Clients.Next(s);
|
cServerConnection *next = m_Clients.Next(s);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
isyslog("streamdev: closing streamdev connection to %s:%d",
|
if (s->IsOpen())
|
||||||
s->RemoteIp().c_str(), s->RemotePort());
|
s->Close();
|
||||||
s->Close();
|
|
||||||
Lock();
|
Lock();
|
||||||
m_Clients.Del(s);
|
m_Clients.Del(s);
|
||||||
Unlock();
|
Unlock();
|
||||||
@ -178,9 +177,8 @@ void cStreamdevServer::Action(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cStreamdevServer::MainThreadHook(void)
|
const cList<cServerConnection>& cStreamdevServer::Clients(cThreadLock& Lock)
|
||||||
{
|
{
|
||||||
cThreadLock lock(m_Instance);
|
Lock.Lock(m_Instance);
|
||||||
for (cServerConnection *s = m_Clients.First(); s; s = m_Clients.Next(s))
|
return m_Clients;
|
||||||
s->MainThreadHook();
|
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,8 @@ public:
|
|||||||
static void Initialize(void);
|
static void Initialize(void);
|
||||||
static void Destruct(void);
|
static void Destruct(void);
|
||||||
static bool Active(void);
|
static bool Active(void);
|
||||||
static void MainThreadHook(void);
|
|
||||||
|
static const cList<cServerConnection>& Clients(cThreadLock& Lock);
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool cStreamdevServer::Active(void)
|
inline bool cStreamdevServer::Active(void)
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <vdr/tools.h>
|
#include <vdr/tools.h>
|
||||||
#include "streamdev-server.h"
|
#include "streamdev-server.h"
|
||||||
|
#include "server/menu.h"
|
||||||
#include "server/setup.h"
|
#include "server/setup.h"
|
||||||
#include "server/server.h"
|
#include "server/server.h"
|
||||||
#include "server/suspend.h"
|
|
||||||
|
|
||||||
#if !defined(APIVERSNUM) || APIVERSNUM < 10516
|
#if !defined(APIVERSNUM) || APIVERSNUM < 10516
|
||||||
#error "VDR-1.5.16 API version or greater is required!"
|
#error "VDR-1.5.16 API version or greater is required!"
|
||||||
@ -119,20 +119,20 @@ cString cPluginStreamdevServer::Active(void)
|
|||||||
|
|
||||||
const char *cPluginStreamdevServer::MainMenuEntry(void)
|
const char *cPluginStreamdevServer::MainMenuEntry(void)
|
||||||
{
|
{
|
||||||
if (StreamdevServerSetup.SuspendMode == smOffer && !cSuspendCtl::IsActive())
|
return tr("Streamdev Connections");
|
||||||
return tr("Suspend Live TV");
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cOsdObject *cPluginStreamdevServer::MainMenuAction(void)
|
cOsdObject *cPluginStreamdevServer::MainMenuAction(void)
|
||||||
{
|
{
|
||||||
cControl::Launch(new cSuspendCtl);
|
return new cStreamdevServerMenu();
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cPluginStreamdevServer::MainThreadHook(void)
|
void cPluginStreamdevServer::MainThreadHook(void)
|
||||||
{
|
{
|
||||||
cStreamdevServer::MainThreadHook();
|
cThreadLock lock;
|
||||||
|
const cList<cServerConnection>& clients = cStreamdevServer::Clients(lock);
|
||||||
|
for (cServerConnection *s = clients.First(); s; s = clients.Next(s))
|
||||||
|
s->MainThreadHook();
|
||||||
}
|
}
|
||||||
|
|
||||||
cMenuSetupPage *cPluginStreamdevServer::SetupMenu(void)
|
cMenuSetupPage *cPluginStreamdevServer::SetupMenu(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user