summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-10-26 11:51:37 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-10-26 11:51:37 +0200
commit41320eca4d534aa803f0aeab1258965aa937752e (patch)
tree29e68ea874557f87d217f42a1c8558d65cb9de76 /device.c
parentffb615332619822f891c8c378e4ceeb6d58529bc (diff)
downloadvdr-41320eca4d534aa803f0aeab1258965aa937752e.tar.gz
vdr-41320eca4d534aa803f0aeab1258965aa937752e.tar.bz2
Fixed blocking replaying in case an encrypted channel is being recorded on the primary device
Diffstat (limited to 'device.c')
-rw-r--r--device.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/device.c b/device.c
index 2b9d2ee6..2d3d1d9e 100644
--- a/device.c
+++ b/device.c
@@ -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;