From 2f89413ca4e41b533151741efa9f4bcf1f8afd42 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 26 Oct 2002 11:08:12 +0200 Subject: Fixed handling 'Transfer Mode' on single device systems when recording an encrypted channel --- CONTRIBUTORS | 2 ++ HISTORY | 4 +++- dvbdevice.c | 10 ++++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d087b876..da16f2a5 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -156,6 +156,8 @@ Stefan Huelswitt for improving skipping channels that are (currently) not available for fixing checking the Ca() status of a cDevice for helping to fix switching audio tracks in 'Transfer Mode' on the primary DVB device + for fixing handling 'Transfer Mode' on single device systems when recording an + encrypted channel Ulrich Röder for pointing out that there are channels that have a symbol rate higher than diff --git a/HISTORY b/HISTORY index b7f74d52..2fa1f755 100644 --- a/HISTORY +++ b/HISTORY @@ -1611,7 +1611,7 @@ Video Disk Recorder Revision History shall be executed from the "Recordings" menu; see MANUAL and 'man vdr(5)' for details (suggested by Gerhard Steiner). -2002-10-20: Version 1.1.14 +2002-10-26: Version 1.1.14 - Fixed some faulty default parameter initializations (thanks to Robert Schiele). - Added further satellites to 'sources.conf' (thanks to Reinhard Walter Buchner @@ -1640,3 +1640,5 @@ Video Disk Recorder Revision History - Fixed channel switching in case of an active 'Transfer Mode' on the primary device ('Transfer Mode' is now launched with priority '-1'). - Fixed a ternary expression in dvbspu.c. +- Fixed handling 'Transfer Mode' on single device systems when recording an + encrypted channel (thanks to Stefan Huelswitt). diff --git a/dvbdevice.c b/dvbdevice.c index b68c16e3..99123644 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.27 2002/10/26 09:44:49 kls Exp $ + * $Id: dvbdevice.c 1.28 2002/10/26 10:53:20 kls Exp $ */ #include "dvbdevice.h" @@ -442,24 +442,26 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) LiveView = true; #endif + bool IsEncrypted = Channel->Ca() > CACONFBASE; + bool DoTune = !IsTunedTo(Channel); bool TurnOffLivePIDs = HasDecoder() && (DoTune - || Channel->Ca() > CACONFBASE && pidHandles[ptVideo].pid != Channel->Vpid() // CA channels can only be decrypted in "live" mode + || IsEncrypted && pidHandles[ptVideo].pid != Channel->Vpid() // CA channels can only be decrypted in "live" mode || IsPrimaryDevice() && (LiveView // for a new live view the old PIDs need to be turned off || pidHandles[ptVideo].pid == Channel->Vpid() // for recording the PIDs must be shifted from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER ) ); - bool StartTransferMode = IsPrimaryDevice() && !DoTune + bool StartTransferMode = IsPrimaryDevice() && !IsEncrypted && !DoTune && (LiveView && HasPid(Channel->Vpid()) && pidHandles[ptVideo].pid != Channel->Vpid() // the PID is already set as DMX_PES_OTHER || !LiveView && pidHandles[ptVideo].pid == Channel->Vpid() // a recording is going to shift the PIDs from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER ); bool TurnOnLivePIDs = HasDecoder() && !StartTransferMode - && (Channel->Ca() > CACONFBASE // CA channels can only be decrypted in "live" mode + && (IsEncrypted // CA channels can only be decrypted in "live" mode || LiveView ); -- cgit v1.2.3