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:
@@ -22,6 +22,7 @@ using namespace std;
|
||||
#define VIDEOBUFSIZE MEGABYTE(3)
|
||||
|
||||
cStreamdevDevice *cStreamdevDevice::m_Device = NULL;
|
||||
const cChannel *cStreamdevDevice::m_DenyChannel = NULL;
|
||||
|
||||
cStreamdevDevice::cStreamdevDevice(void) {
|
||||
m_Channel = NULL;
|
||||
@@ -91,7 +92,7 @@ bool cStreamdevDevice::ProvidesChannel(const cChannel *Channel, int Priority,
|
||||
bool prio = Priority < 0 || Priority > this->Priority();
|
||||
bool ndr = false;
|
||||
|
||||
if (!StreamdevClientSetup.StartClient)
|
||||
if (!StreamdevClientSetup.StartClient || Channel == m_DenyChannel)
|
||||
return false;
|
||||
|
||||
Dprintf("ProvidesChannel, Channel=%s, Prio=%d\n", Channel->Name(), Priority);
|
||||
|
@@ -26,6 +26,7 @@ private:
|
||||
bool m_DvrClosed;
|
||||
|
||||
static cStreamdevDevice *m_Device;
|
||||
static const cChannel *m_DenyChannel;
|
||||
|
||||
bool OpenDvrInt(void);
|
||||
void CloseDvrInt(void);
|
||||
@@ -70,6 +71,7 @@ public:
|
||||
virtual int SignalQuality(void) const;
|
||||
|
||||
static void UpdatePriority(void);
|
||||
static void DenyChannel(const cChannel *Channel) { m_DenyChannel = Channel; }
|
||||
static bool Init(void);
|
||||
static bool ReInit(void);
|
||||
|
||||
|
@@ -52,6 +52,14 @@ bool cPluginStreamdevClient::SetupParse(const char *Name, const char *Value) {
|
||||
return StreamdevClientSetup.SetupParse(Name, Value);
|
||||
}
|
||||
|
||||
bool cPluginStreamdevClient::Service(const char *Id, void *Data) {
|
||||
if (!strcmp(Id, LOOP_PREVENTION_SERVICE)) {
|
||||
cStreamdevDevice::DenyChannel((const cChannel*) Data);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void cPluginStreamdevClient::MainThreadHook(void) {
|
||||
cStreamdevDevice::UpdatePriority();
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@ public:
|
||||
virtual cOsdObject *MainMenuAction(void);
|
||||
virtual cMenuSetupPage *SetupMenu(void);
|
||||
virtual bool SetupParse(const char *Name, const char *Value);
|
||||
virtual bool Service(const char *Id, void *Data = NULL);
|
||||
virtual void MainThreadHook(void);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user