From 9c60fb4e42bce2fd3b6d7d9c011f1688cddd4394 Mon Sep 17 00:00:00 2001 From: schmirl Date: Mon, 7 Apr 2008 14:50:32 +0000 Subject: - changed location of streamdevhosts.conf to VDRCONFDIR/plugins/streamdev - changed externremux.sh's default location to VDRCONFDIR/plugins/streamdev - added sample externremux.sh from http://www.vdr-wiki.de/ - stop providing channels after client has been disabled at runtime - added logging of the client device's card index - changed default suspend mode to "Always suspended" - added "Hide Mainmenu Entry" setup option on client --- client/device.c | 7 ++++++- client/setup.c | 8 +++++--- client/setup.h | 3 ++- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'client') diff --git a/client/device.c b/client/device.c index 708b1dc..570bab2 100644 --- a/client/device.c +++ b/client/device.c @@ -1,5 +1,5 @@ /* - * $Id: device.c,v 1.17 2008/04/07 14:40:39 schmirl Exp $ + * $Id: device.c,v 1.18 2008/04/07 14:50:32 schmirl Exp $ */ #include "client/device.h" @@ -28,6 +28,7 @@ cStreamdevDevice::cStreamdevDevice(void) { m_Filters = new cStreamdevFilters; StartSectionHandler(); + isyslog("streamdev-client: got device number %d", CardIndex() + 1); m_Device = this; m_Pids = 0; @@ -78,6 +79,10 @@ bool cStreamdevDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool res = false; bool prio = Priority < 0 || Priority > this->Priority(); bool ndr = false; + + if (!StreamdevClientSetup.StartClient) + return false; + Dprintf("ProvidesChannel, Channel=%s, Prio=%d\n", Channel->Name(), Priority); if (ClientSocket.DataSocket(siLive) != NULL diff --git a/client/setup.c b/client/setup.c index 31e20ad..5c04c61 100644 --- a/client/setup.c +++ b/client/setup.c @@ -1,5 +1,5 @@ /* - * $Id: setup.c,v 1.4 2008/04/07 14:40:40 schmirl Exp $ + * $Id: setup.c,v 1.5 2008/04/07 14:50:32 schmirl Exp $ */ #include @@ -15,6 +15,7 @@ cStreamdevClientSetup::cStreamdevClientSetup(void) { RemotePort = 2004; StreamFilters = false; SyncEPG = false; + HideMenuEntry = false; strcpy(RemoteIp, ""); } @@ -29,6 +30,7 @@ bool cStreamdevClientSetup::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "RemotePort") == 0) RemotePort = atoi(Value); else if (strcmp(Name, "StreamFilters") == 0) StreamFilters = atoi(Value); else if (strcmp(Name, "SyncEPG") == 0) SyncEPG = atoi(Value); + else if (strcmp(Name, "HideMenuEntry") == 0) HideMenuEntry = atoi(Value); else return false; return true; } @@ -36,6 +38,7 @@ bool cStreamdevClientSetup::SetupParse(const char *Name, const char *Value) { cStreamdevClientMenuSetupPage::cStreamdevClientMenuSetupPage(void) { m_NewSetup = StreamdevClientSetup; + AddBoolEdit (tr("Hide Mainmenu Entry"),m_NewSetup.HideMenuEntry); AddBoolEdit (tr("Start Client"), m_NewSetup.StartClient); AddIpEdit (tr("Remote IP"), m_NewSetup.RemoteIp); AddShortEdit(tr("Remote Port"), m_NewSetup.RemotePort); @@ -51,8 +54,6 @@ void cStreamdevClientMenuSetupPage::Store(void) { if (m_NewSetup.StartClient != StreamdevClientSetup.StartClient) { if (m_NewSetup.StartClient) cStreamdevDevice::Init(); - else - Skins.Message(mtInfo, tr("Please restart VDR to activate changes")); } SetupStore("StartClient", m_NewSetup.StartClient); @@ -63,6 +64,7 @@ void cStreamdevClientMenuSetupPage::Store(void) { SetupStore("RemotePort", m_NewSetup.RemotePort); SetupStore("StreamFilters", m_NewSetup.StreamFilters); SetupStore("SyncEPG", m_NewSetup.SyncEPG); + SetupStore("HideMenuEntry", m_NewSetup.HideMenuEntry); StreamdevClientSetup = m_NewSetup; diff --git a/client/setup.h b/client/setup.h index c1908e0..e220c22 100644 --- a/client/setup.h +++ b/client/setup.h @@ -1,5 +1,5 @@ /* - * $Id: setup.h,v 1.3 2008/04/07 14:27:28 schmirl Exp $ + * $Id: setup.h,v 1.4 2008/04/07 14:50:32 schmirl Exp $ */ #ifndef VDR_STREAMDEV_SETUPCLIENT_H @@ -17,6 +17,7 @@ struct cStreamdevClientSetup { int RemotePort; int StreamFilters; int SyncEPG; + int HideMenuEntry; }; extern cStreamdevClientSetup StreamdevClientSetup; -- cgit v1.2.3