diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-09-15 11:52:43 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-09-15 11:52:43 +0200 |
commit | 3a3d4c2a5ac69591c0c4cb922bd34a0c9dfd38e0 (patch) | |
tree | 2dfaf4b0156f5f108bb344d7331c57574a59744b /device.c | |
parent | 327c2a7dd2cb7c4060db6e590c977838e8fd7d52 (diff) | |
download | vdr-3a3d4c2a5ac69591c0c4cb922bd34a0c9dfd38e0.tar.gz vdr-3a3d4c2a5ac69591c0c4cb922bd34a0c9dfd38e0.tar.bz2 |
Only calling cStatus::MsgChannelSwitch() for actual switching
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.20 2002/09/15 11:05:41 kls Exp $ + * $Id: device.c 1.21 2002/09/15 11:50:19 kls Exp $ */ #include "device.h" @@ -326,8 +326,6 @@ bool cDevice::SwitchChannel(int Direction) eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView) { - cStatus::MsgChannelSwitch(this, 0); - if (LiveView) StopReplay(); @@ -344,6 +342,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView) if (NeedsTransferMode) { cDevice *CaDevice = GetDevice(Channel, 0); if (CaDevice) { + cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel if (CaDevice->SetChannel(Channel, false) == scrOk) // calling SetChannel() directly, not SwitchChannel()! cControl::Launch(new cTransferControl(CaDevice, Channel->vpid, Channel->apid1, 0, 0, 0));//XXX+ else @@ -352,15 +351,19 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView) else Result = scrNotAvailable; } - else if (!SetChannelDevice(Channel, LiveView)) - Result = scrFailed; - - if (Result == scrOk && LiveView && IsPrimaryDevice()) { - cSIProcessor::SetCurrentServiceID(Channel->pnr); - currentChannel = Channel->number; + else { + cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel + if (!SetChannelDevice(Channel, LiveView)) + Result = scrFailed; } - cStatus::MsgChannelSwitch(this, Channel->number); + if (Result == scrOk) { + if (LiveView && IsPrimaryDevice()) { + cSIProcessor::SetCurrentServiceID(Channel->pnr); + currentChannel = Channel->number; + } + cStatus::MsgChannelSwitch(this, Channel->number); // only report status if channel switch successfull + } return Result; } |