summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY.LNBshare8
-rw-r--r--config.h2
-rw-r--r--device.c18
-rw-r--r--device.h2
-rw-r--r--vdr.c9
5 files changed, 30 insertions, 9 deletions
diff --git a/HISTORY.LNBshare b/HISTORY.LNBshare
index b5e7833..d6eeb7f 100644
--- a/HISTORY.LNBshare
+++ b/HISTORY.LNBshare
@@ -26,15 +26,17 @@ Version for VDR 1.4.3
- Write patch version number to log file (if logging is switched on).
- Adept to VDR 1.7.16
-2010-02-06 Version 0.1.1 for VDR version 1.7.16
+2011-02-06 Version 0.1.1 for VDR version 1.7.16
- Fix: If several DVB devices share one LNB, only the first of these devises will send signals like 22kHz. See README.LNBshare for details.
Thanks to Uwe (Licherkette @ vdr-portal.de) for finding and analyzing the error and testing the correction.
- README.LNBshare: Include warning about 1.3 FF cards with buggy Loop-Through that might result in destruction of LNBP-Chips if the Loop-Through is used
- Fix: Log file: Numbering of 'LNBs' not connected to a SAT DVB card
-2010-02-08 Version 0.1.2 for VDR version 1.7.16
+2011-02-08 Version 0.1.2 for VDR version 1.7.16
- Change: Make it easier to apply this patch together with the dynamite-Plugin patch. Note: this is mostly for maintainers of distributions and multi-patches. It will (must probably) not be possible for devices added with dynamite to share LNBs. Some concept work is required for this: How can VDR uniquely identify a device? How can a user identify such a device on OSD?
-2010-02-16 Version 0.1.3 for VDR version 1.7.16
+2011-02-16 Version 0.1.3 for VDR version 1.7.16
- Fix an error that can occur if devices are explizitly specified (-D or --device) during start of VDR. Thanks to Lars (mini73 @ vdr-portal.de) for reporting this error.
+2011-02-18 Version 0.1.4 for VDR version 1.7.16
+- 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
diff --git a/config.h b/config.h
index bbb62a6..d101f43 100644
--- a/config.h
+++ b/config.h
@@ -293,7 +293,7 @@ public:
int EmergencyExit;
//ML
- #define LNB_SHARING_VERSION "0.1.3"
+ #define LNB_SHARING_VERSION "0.1.4"
int VerboseLNBlog;
#define MAXDEVICES 16 // Since VDR 1.3.32 we can not #include "device.h" for MAXDEVICES anymore.
// With this workaround a warning will be shown during compilation if
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
diff --git a/device.h b/device.h
index 7df3cb5..5f92719 100644
--- a/device.h
+++ b/device.h
@@ -194,6 +194,8 @@ public:
///< (device recieving live view) would be affected by switching to the requested channel.
///< Returns -2 if there are no such devices and the actual device
///< would not be affected by switching to the requested channel.
+ bool IsShareAvoidDevice(const cChannel *Channel, const cDevice *AvoidDevice) const;
+ ///< Returns true if switching this device to Channel will result in a switch of AvoidDevice
//ML-Ende
diff --git a/vdr.c b/vdr.c
index 6825363..0f16d11 100644
--- a/vdr.c
+++ b/vdr.c
@@ -877,22 +877,21 @@ int main(int argc, char *argv[])
break;
}
bool timeout = Now - DeviceUsed[d->DeviceNumber()] > TIMERDEVICETIMEOUT; // only check other devices if they have been left alone for a while
- if (d->MaySwitchTransponder()) {
+ if (d->MaySwitchTransponder() && d->GetMaxBadPriority(Timer->Channel()) == -2 ) { // LNB Sharing
DeviceAvailable = true; // avoids using the actual device below
if (timeout)
- // Device = d; // only check other devices if they have been left alone for a while
- if( d->GetMaxBadPriority(Timer->Channel()) <= 0) Device = d; // LNB Sharing
+ Device = d; // only check other devices if they have been left alone for a while
}
else if (timeout && !Device && InVpsMargin && !d->Receiving() && d->ProvidesTransponderExclusively(Timer->Channel()))
// Device = d; // use this one only if no other with less impact can be found
- if( d->GetMaxBadPriority(Timer->Channel()) <= 0) Device = d; // LNB Sharing
+ if( d->GetMaxBadPriority(Timer->Channel()) <= -1) Device = d; // LNB Sharing
}
}
if (!Device && InVpsMargin && !DeviceAvailable) {
cDevice *d = cDevice::ActualDevice();
if (!d->Receiving() && d->ProvidesTransponder(Timer->Channel()) && Now - DeviceUsed[d->DeviceNumber()] > TIMERDEVICETIMEOUT)
// Device = d; // use the actual device as a last resort
- if( d->GetMaxBadPriority(Timer->Channel()) <= 0) Device = d; // LNB Sharing
+ if( d->GetMaxBadPriority(Timer->Channel()) <= -1) Device = d; // LNB Sharing
}
// Switch the device to the transponder: