diff options
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 13 |
1 files changed, 9 insertions, 4 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.31 2002/10/26 10:23:20 kls Exp $ + * $Id: device.c 1.32 2002/10/26 11:43:52 kls Exp $ */ #include "device.h" @@ -324,7 +324,7 @@ bool cDevice::SwitchChannel(int Direction) cChannel *channel; while ((channel = Channels.GetByNumber(n, Direction)) != NULL) { // try only channels which are currently available - if (PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit) || GetDevice(channel, 0)) + if (PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit) || PrimaryDevice()->CanReplay() && GetDevice(channel, 0)) break; n = channel->Number() + Direction; } @@ -360,7 +360,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView) if (NeedsTransferMode) { cDevice *CaDevice = GetDevice(Channel, 0); - if (CaDevice) { + if (CaDevice && CanReplay()) { 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(), Channel->Apid2(), Channel->Dpid1(), Channel->Dpid2()));//XXX+ @@ -446,6 +446,11 @@ void cDevice::SetAudioTrack(int Index) SetAudioTrackDevice(Index); } +bool cDevice::CanReplay(void) const +{ + return HasDecoder(); +} + bool cDevice::SetPlayMode(ePlayMode PlayMode) { return false; @@ -482,7 +487,7 @@ bool cDevice::Replaying(void) const bool cDevice::AttachPlayer(cPlayer *Player) { - if (HasDecoder()) { + if (CanReplay()) { if (player) Detach(player); player = Player; |