mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 17:16:51 +00:00
Support for non-cycle-free setups (e.g. where two VDRs mutually share
their DVB cards through streamdev-client/-server). Must be enabled in streamdev-server setup. Obsoletes recursion patches.
This commit is contained in:
@@ -732,8 +732,24 @@ bool cLSTRHandler::Next(bool &Last)
|
||||
return false;
|
||||
}
|
||||
|
||||
class cStreamdevLoopPrevention {
|
||||
private:
|
||||
bool Unlock;
|
||||
public:
|
||||
cStreamdevLoopPrevention(const cChannel* Channel, bool LoopPrevention): Unlock(LoopPrevention) {
|
||||
if (LoopPrevention)
|
||||
cPluginManager::CallAllServices(LOOP_PREVENTION_SERVICE, (void *)Channel);
|
||||
}
|
||||
~cStreamdevLoopPrevention() {
|
||||
if (Unlock)
|
||||
cPluginManager::CallAllServices(LOOP_PREVENTION_SERVICE, NULL);
|
||||
}
|
||||
};
|
||||
|
||||
// --- cConnectionVTP ---------------------------------------------------------
|
||||
|
||||
#define LOOP_PREVENTION(c) cStreamdevLoopPrevention LoopPrevention(c, m_LoopPrevention);
|
||||
|
||||
cConnectionVTP::cConnectionVTP(void):
|
||||
cServerConnection("VTP"),
|
||||
m_LiveSocket(NULL),
|
||||
@@ -753,6 +769,10 @@ cConnectionVTP::cConnectionVTP(void):
|
||||
m_LSTTHandler(NULL),
|
||||
m_LSTRHandler(NULL)
|
||||
{
|
||||
m_LoopPrevention = StreamdevServerSetup.LoopPrevention;
|
||||
if (m_LoopPrevention)
|
||||
// Loop prevention enabled - but is there anybody out there?
|
||||
m_LoopPrevention = cPluginManager::CallFirstService(LOOP_PREVENTION_SERVICE);
|
||||
}
|
||||
|
||||
cConnectionVTP::~cConnectionVTP()
|
||||
@@ -921,6 +941,8 @@ bool cConnectionVTP::CmdPROV(char *Opts)
|
||||
if ((chan = ChannelFromString(Opts)) == NULL)
|
||||
return Respond(550, "Undefined channel \"%s\"", Opts);
|
||||
|
||||
LOOP_PREVENTION(chan);
|
||||
|
||||
if (ProvidesChannel(chan, prio)) {
|
||||
m_TuneChannel = chan;
|
||||
m_TunePriority = prio;
|
||||
@@ -1088,6 +1110,8 @@ bool cConnectionVTP::CmdTUNE(char *Opts)
|
||||
if ((chan = ChannelFromString(Opts)) == NULL)
|
||||
return Respond(550, "Undefined channel \"%s\"", Opts);
|
||||
|
||||
LOOP_PREVENTION(chan);
|
||||
|
||||
if (chan != m_TuneChannel) {
|
||||
isyslog("streamdev-server TUNE %s: Priority unknown - using 0", Opts);
|
||||
prio = 0;
|
||||
|
@@ -29,6 +29,7 @@ private:
|
||||
char *m_LastCommand;
|
||||
eStreamType m_StreamType;
|
||||
bool m_FiltersSupport;
|
||||
bool m_LoopPrevention;
|
||||
RecPlayer *m_RecPlayer;
|
||||
|
||||
// Priority is only known in PROV command
|
||||
|
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: streamdev 0.5.0\n"
|
||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||
"POT-Creation-Date: 2011-12-08 12:50+0100\n"
|
||||
"POT-Creation-Date: 2011-12-11 11:25+0100\n"
|
||||
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
|
||||
"Last-Translator: Frank Schmirler <vdrdev@schmirler.de>\n"
|
||||
"Language-Team: <vdr@linuxtv.org>\n"
|
||||
@@ -66,6 +66,9 @@ msgstr "Port des VDR-zu-VDR Servers"
|
||||
msgid "Bind to IP"
|
||||
msgstr "Binde an IP"
|
||||
|
||||
msgid "Loop Prevention"
|
||||
msgstr "Schleifen verhindern"
|
||||
|
||||
msgid "HTTP Server"
|
||||
msgstr "HTTP Server"
|
||||
|
||||
|
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: streamdev 0.5.0\n"
|
||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||
"POT-Creation-Date: 2011-12-08 12:50+0100\n"
|
||||
"POT-Creation-Date: 2011-12-11 11:25+0100\n"
|
||||
"PO-Revision-Date: 2010-06-19 03:58+0100\n"
|
||||
"Last-Translator: Javier Bradineras <jbradi@hotmail.com>\n"
|
||||
"Language-Team: <vdr@linuxtv.org>\n"
|
||||
@@ -66,6 +66,9 @@ msgstr "Puerto del Servidor VDR-a-VDR"
|
||||
msgid "Bind to IP"
|
||||
msgstr "IP asociada"
|
||||
|
||||
msgid "Loop Prevention"
|
||||
msgstr ""
|
||||
|
||||
msgid "HTTP Server"
|
||||
msgstr "Servidor HTTP"
|
||||
|
||||
|
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: streamdev 0.5.0\n"
|
||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||
"POT-Creation-Date: 2011-12-08 12:50+0100\n"
|
||||
"POT-Creation-Date: 2011-12-11 11:25+0100\n"
|
||||
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
|
||||
"Last-Translator: Rolf Ahrenberg\n"
|
||||
"Language-Team: Finnish <vdr@linuxtv.org>\n"
|
||||
@@ -67,6 +67,9 @@ msgstr "VDR-palvelimen portti"
|
||||
msgid "Bind to IP"
|
||||
msgstr "Sido osoitteeseen"
|
||||
|
||||
msgid "Loop Prevention"
|
||||
msgstr ""
|
||||
|
||||
msgid "HTTP Server"
|
||||
msgstr "HTTP-palvelin"
|
||||
|
||||
|
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: streamdev 0.5.0\n"
|
||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||
"POT-Creation-Date: 2011-12-08 12:50+0100\n"
|
||||
"POT-Creation-Date: 2011-12-11 11:25+0100\n"
|
||||
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
|
||||
"Last-Translator: micky979 <micky979@free.fr>\n"
|
||||
"Language-Team: <vdr@linuxtv.org>\n"
|
||||
@@ -66,6 +66,9 @@ msgstr "Port du serveur VDR-to-VDR"
|
||||
msgid "Bind to IP"
|
||||
msgstr "Attacher aux IP"
|
||||
|
||||
msgid "Loop Prevention"
|
||||
msgstr ""
|
||||
|
||||
msgid "HTTP Server"
|
||||
msgstr "Serveur HTTP"
|
||||
|
||||
|
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: streamdev 0.5.0\n"
|
||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||
"POT-Creation-Date: 2011-12-08 12:50+0100\n"
|
||||
"POT-Creation-Date: 2011-12-11 11:25+0100\n"
|
||||
"PO-Revision-Date: 2010-06-19 03:58+0100\n"
|
||||
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
|
||||
"Language-Team: <vdr@linuxtv.org>\n"
|
||||
@@ -68,6 +68,9 @@ msgstr "Porta Server VDR-a-VDR"
|
||||
msgid "Bind to IP"
|
||||
msgstr "IP associati"
|
||||
|
||||
msgid "Loop Prevention"
|
||||
msgstr ""
|
||||
|
||||
msgid "HTTP Server"
|
||||
msgstr "Server HTTP"
|
||||
|
||||
|
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: streamdev 0.5.0\n"
|
||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||
"POT-Creation-Date: 2011-12-08 12:50+0100\n"
|
||||
"POT-Creation-Date: 2011-12-11 11:25+0100\n"
|
||||
"PO-Revision-Date: 2009-11-26 21:57+0200\n"
|
||||
"Last-Translator: Valdemaras Pipiras <varas@ambernet.lt>\n"
|
||||
"Language-Team: Lietuvių\n"
|
||||
@@ -66,6 +66,9 @@ msgstr "VDR-su-VDR Serverio portas"
|
||||
msgid "Bind to IP"
|
||||
msgstr "Pririšti IP"
|
||||
|
||||
msgid "Loop Prevention"
|
||||
msgstr ""
|
||||
|
||||
msgid "HTTP Server"
|
||||
msgstr "HTTP Serveris"
|
||||
|
||||
|
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: streamdev 0.5.0\n"
|
||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||
"POT-Creation-Date: 2011-12-08 12:50+0100\n"
|
||||
"POT-Creation-Date: 2011-12-11 11:25+0100\n"
|
||||
"PO-Revision-Date: 2008-06-26 15:36+0100\n"
|
||||
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
|
||||
"Language-Team: <vdr@linuxtv.org>\n"
|
||||
@@ -66,6 +66,9 @@ msgstr "VDR-to-VDR
|
||||
msgid "Bind to IP"
|
||||
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> IP"
|
||||
|
||||
msgid "Loop Prevention"
|
||||
msgstr ""
|
||||
|
||||
msgid "HTTP Server"
|
||||
msgstr "HTTP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
|
||||
|
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: streamdev_SK\n"
|
||||
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
|
||||
"POT-Creation-Date: 2011-12-08 12:50+0100\n"
|
||||
"POT-Creation-Date: 2011-12-11 11:25+0100\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
||||
"Language-Team: Slovak <hrala.milan@gmail.com>\n"
|
||||
@@ -68,6 +68,9 @@ msgstr "Port serveru pre VDR-do-VDR"
|
||||
msgid "Bind to IP"
|
||||
msgstr "viaza<7A> na IP"
|
||||
|
||||
msgid "Loop Prevention"
|
||||
msgstr ""
|
||||
|
||||
msgid "HTTP Server"
|
||||
msgstr "server HTTP"
|
||||
|
||||
|
@@ -14,6 +14,7 @@ cStreamdevServerSetup::cStreamdevServerSetup(void) {
|
||||
MaxClients = 5;
|
||||
StartVTPServer = true;
|
||||
VTPServerPort = 2004;
|
||||
LoopPrevention = false;
|
||||
StartHTTPServer = true;
|
||||
HTTPServerPort = 3000;
|
||||
HTTPStreamType = stTS;
|
||||
@@ -33,6 +34,7 @@ bool cStreamdevServerSetup::SetupParse(const char *Name, const char *Value) {
|
||||
else if (strcmp(Name, "StartServer") == 0) StartVTPServer = atoi(Value);
|
||||
else if (strcmp(Name, "ServerPort") == 0) VTPServerPort = atoi(Value);
|
||||
else if (strcmp(Name, "VTPBindIP") == 0) strcpy(VTPBindIP, Value);
|
||||
else if (strcmp(Name, "LoopPrevention") == 0) LoopPrevention = atoi(Value);
|
||||
else if (strcmp(Name, "StartHTTPServer") == 0) StartHTTPServer = atoi(Value);
|
||||
else if (strcmp(Name, "HTTPServerPort") == 0) HTTPServerPort = atoi(Value);
|
||||
else if (strcmp(Name, "HTTPStreamType") == 0) HTTPStreamType = atoi(Value);
|
||||
@@ -89,6 +91,8 @@ void cStreamdevServerMenuSetupPage::Set(void) {
|
||||
Add(new cMenuEditBoolItem(tr("Start VDR-to-VDR Server"), &m_NewSetup.StartVTPServer));
|
||||
Add(new cMenuEditIntItem (tr("VDR-to-VDR Server Port"), &m_NewSetup.VTPServerPort, 0, 65535));
|
||||
Add(new cMenuEditIpItem (tr("Bind to IP"), m_NewSetup.VTPBindIP));
|
||||
if (cPluginManager::CallFirstService(LOOP_PREVENTION_SERVICE))
|
||||
Add(new cMenuEditBoolItem(tr("Loop Prevention"), &m_NewSetup.LoopPrevention));
|
||||
|
||||
AddCategory (tr("HTTP Server"));
|
||||
Add(new cMenuEditBoolItem(tr("Start HTTP Server"), &m_NewSetup.StartHTTPServer));
|
||||
@@ -134,6 +138,7 @@ void cStreamdevServerMenuSetupPage::Store(void) {
|
||||
SetupStore("StartServer", m_NewSetup.StartVTPServer);
|
||||
SetupStore("ServerPort", m_NewSetup.VTPServerPort);
|
||||
SetupStore("VTPBindIP", m_NewSetup.VTPBindIP);
|
||||
SetupStore("LoopPrevention", m_NewSetup.LoopPrevention);
|
||||
SetupStore("StartHTTPServer", m_NewSetup.StartHTTPServer);
|
||||
SetupStore("HTTPServerPort", m_NewSetup.HTTPServerPort);
|
||||
SetupStore("HTTPStreamType", m_NewSetup.HTTPStreamType);
|
||||
|
@@ -17,6 +17,7 @@ struct cStreamdevServerSetup {
|
||||
int StartVTPServer;
|
||||
int VTPServerPort;
|
||||
char VTPBindIP[20];
|
||||
int LoopPrevention;
|
||||
int StartHTTPServer;
|
||||
int HTTPServerPort;
|
||||
int HTTPStreamType;
|
||||
|
Reference in New Issue
Block a user