API change of VDR 1.7.26: Use "occupied" instead of "avoid device".

This commit is contained in:
Frank Schmirler 2012-03-10 23:44:51 +01:00
parent 173d2cbb7a
commit 5a3c535778
2 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,7 @@
VDR Plugin 'streamdev' Revision History
---------------------------------------
- API change of VDR 1.7.26: Use "occupied" instead of "avoid device".
- Fixed ProvidesChannel() on client always returning true since the new timeout
option has been added.
- Updated Finnish translation (thanks to Rolf Ahrenberg)

View File

@ -44,7 +44,12 @@ void cSwitchLive::Switch(void)
{
mutex.Lock();
if (channel && device) {
#if APIVERSNUM >= 10722
cDevice *d = device;
d->SetOccupied(10);
#else
cDevice::SetAvoidDevice(device);
#endif
if (!Channels.SwitchTo(cDevice::CurrentChannel())) {
if (StreamdevServerSetup.SuspendMode == smAlways) {
Channels.SwitchTo(channel->Number());
@ -55,6 +60,9 @@ void cSwitchLive::Switch(void)
device = NULL;
}
}
#if APIVERSNUM >= 10722
d->SetOccupied(0);
#endif
// make sure we don't come in here next time
channel = NULL;
switched.Signal();