diff --git a/HISTORY b/HISTORY index de456e5..fadb6df 100644 --- a/HISTORY +++ b/HISTORY @@ -228,3 +228,8 @@ VDR Plugin 'femon' Revision History - Updated for vdr-1.4.0. - Modified APIVERSION code in Makefile. - Updated german translation (Thanks to Andreas Brachold). + +2006-06-06: Version 1.0.1 + +- Fixed device switching priority (Thanks to Andreas Brugger). +- Fixed device switching back to the primary device. diff --git a/femon.h b/femon.h index 0dcd7fd..a10266f 100644 --- a/femon.h +++ b/femon.h @@ -11,7 +11,7 @@ #include -static const char VERSION[] = "1.0.0"; +static const char VERSION[] = "1.0.1"; static const char DESCRIPTION[] = "DVB Signal Information Monitor (OSD)"; static const char MAINMENUENTRY[] = "Signal Information"; diff --git a/femonosd.c b/femonosd.c index 23c287c..fed436d 100644 --- a/femonosd.c +++ b/femonosd.c @@ -995,24 +995,26 @@ void cFemonOsd::SetAudioTrack(int Index, const char * const *Tracks) bool cFemonOsd::DeviceSwitch(int direction) { Dprintf("%s()\n", __PRETTY_FUNCTION__); - int device = cDevice::ActualDevice()->DeviceNumber(); + int device = cDevice::ActualDevice()->DeviceNumber(); direction = sgn(direction); if (device >= 0) { cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); - for (int i = 0; i < cDevice::NumDevices() - 1; i++) { + for (int i = 0; i < cDevice::NumDevices() - 1; i++) { if (direction) { - if (++device >= cDevice::NumDevices()) device = 0; + if (++device >= cDevice::NumDevices()) + device = 0; } else { - if (--device < 0) device = cDevice::NumDevices() - 1; + if (--device < 0) + device = cDevice::NumDevices() - 1; } - if (cDevice::GetDevice(device)->ProvidesChannel(channel)) { + if (cDevice::GetDevice(device)->ProvidesChannel(channel, 0)) { Dprintf("%s(%d) device(%d)\n", __PRETTY_FUNCTION__, direction, device); - // here should be added some checks, if the device is really available (i.e. not recording) cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0); cControl::Shutdown(); cDevice::GetDevice(device)->SwitchChannel(channel, true); - // does this work with primary devices ? + if (cDevice::GetDevice(device) == cDevice::PrimaryDevice()) + cDevice::GetDevice(device)->ForceTransferMode(); cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel->Vpid(), channel->Apids(), channel->Dpids(), channel->Spids())); cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number()); return (true);