- 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
This commit is contained in:
schmirl
2008-04-07 14:50:32 +00:00
parent 89735cbd95
commit 9c60fb4e42
14 changed files with 887 additions and 550 deletions

View File

@@ -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

View File

@@ -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 <vdr/menuitems.h>
@@ -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;

View File

@@ -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;