summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorMarkus Ehrnsperger <markus@vdr1.(none)>2011-02-18 22:39:16 +0100
committerMarkus Ehrnsperger <markus@vdr1.(none)>2011-02-18 22:39:16 +0100
commit6252a0fcd639e6f3fe6775044a2a996c21225c9c (patch)
tree9aefeb0dfcaebd8359bae9f73bcc957234d15db7 /device.c
parentb4e66d3d624cc1cfbe2f435f02810f544633d993 (diff)
downloadvdr-patch-lnbsharing-master.tar.gz
vdr-patch-lnbsharing-master.tar.bz2
Fix: Short before a recording starts, the system switches between black screen and channel. If VPS is used, the recording will not even start. Thanks to urknall @ vdr-portal.de for reporting this error and Uwe (Licherkette @ vdr-portal.de) for providing a Log
Diffstat (limited to 'device.c')
-rw-r--r--device.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/device.c b/device.c
index a3cecf9..1f9611f 100644
--- a/device.c
+++ b/device.c
@@ -286,6 +286,10 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView
for (int i = 0; i < numDevices; i++) {
if (device[i] == AvoidDevice)
continue; // this device shall be temporarily avoided
+ // LNB - Sharing
+ if (AvoidDevice && device[i]->IsShareAvoidDevice(Channel, AvoidDevice) )
+ continue; // this device shall be temporarily avoided
+ // LNB - Sharing END
if (Channel->Ca() && Channel->Ca() <= CA_DVB_MAX && Channel->Ca() != device[i]->CardIndex() + 1)
continue; // a specific card was requested, but not this one
if (NumUsableSlots && !CamSlots.Get(j)->Assign(device[i], true))
@@ -764,6 +768,20 @@ int cDevice::GetMaxBadPriority(const cChannel *Channel) const
}
return maxBadPriority;
}
+
+bool cDevice::IsShareAvoidDevice(const cChannel *Channel, const cDevice *AvoidDevice) const
+{
+ if(!cSource::IsSat(Channel->Source())) return false; // no conflict if the new channel is not on sat
+ if(!ProvidesSource(cSource::stSat)) return false; // no conflict if this device is not on sat
+
+ for (int i = 0; i < numDevices; i++) {
+ if (this != device[i] && device[i]->IsShareLnb(this) && device[i]->IsLnbConflict(Channel) ) {
+ // there is a conflict between device[i] and 'this' if we tune this to Channel
+ if(device[i] == AvoidDevice) return true;
+ }
+ }
+ return false;
+}
// ML Ende