Re-enabled CAM communication during replay and on non-Ca channels

This commit is contained in:
Klaus Schmidinger 2003-04-19 10:59:53 +02:00
parent d7c5e26d31
commit 2c4da57287
4 changed files with 7 additions and 18 deletions

View File

@ -2034,10 +2034,12 @@ Video Disk Recorder Revision History
- Fixed handling of Ca parameters with values <= MAXDEVICES, which don't indicate - Fixed handling of Ca parameters with values <= MAXDEVICES, which don't indicate
an actual encrypted channel (thanks to Stefan Huelswitt for reporting this one). an actual encrypted channel (thanks to Stefan Huelswitt for reporting this one).
2003-04-18: Version 1.1.28 2003-04-19: Version 1.1.28
- Using masks in EIT filtering to reduce the number of filters (thanks to Andreas - Using masks in EIT filtering to reduce the number of filters (thanks to Andreas
Schultz). Schultz).
- Fixed handling Ca descriptors (thanks to Stefan Huelswitt). - Fixed handling Ca descriptors (thanks to Stefan Huelswitt).
- Now only those Ca descriptors are sent to a CAM that are actually understood - Now only those Ca descriptors are sent to a CAM that are actually understood
by that CAM. by that CAM.
- Re-enabled CAM communication during replay and on non-Ca channels. This requires
a DVB driver with firmware version 2613 or later.

5
ci.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: ci.c 1.12 2003/04/18 14:16:32 kls Exp $ * $Id: ci.c 1.13 2003/04/19 10:59:53 kls Exp $
*/ */
/* XXX TODO /* XXX TODO
@ -1286,7 +1286,6 @@ void cCiCaPmt::AddCaDescriptor(int Length, uint8_t *Data)
cCiHandler::cCiHandler(int Fd, int NumSlots) cCiHandler::cCiHandler(int Fd, int NumSlots)
{ {
numSlots = NumSlots; numSlots = NumSlots;
enabled = true;
newCaSupport = false; newCaSupport = false;
for (int i = 0; i < MAX_CI_SESSION; i++) for (int i = 0; i < MAX_CI_SESSION; i++)
sessions[i] = NULL; sessions[i] = NULL;
@ -1443,8 +1442,6 @@ int cCiHandler::CloseAllSessions(int Slot)
bool cCiHandler::Process(void) bool cCiHandler::Process(void)
{ {
if (!enabled)
return false;
bool result = true; bool result = true;
cMutexLock MutexLock(&mutex); cMutexLock MutexLock(&mutex);
for (int Slot = 0; Slot < numSlots; Slot++) { for (int Slot = 0; Slot < numSlots; Slot++) {

4
ci.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: ci.h 1.5 2003/04/18 12:41:48 kls Exp $ * $Id: ci.h 1.6 2003/04/19 10:25:24 kls Exp $
*/ */
#ifndef __CI_H #ifndef __CI_H
@ -80,7 +80,6 @@ class cCiHandler {
private: private:
cMutex mutex; cMutex mutex;
int numSlots; int numSlots;
bool enabled;
bool newCaSupport; bool newCaSupport;
cCiSession *sessions[MAX_CI_SESSION]; cCiSession *sessions[MAX_CI_SESSION];
cCiTransportLayer *tpl; cCiTransportLayer *tpl;
@ -98,7 +97,6 @@ public:
~cCiHandler(); ~cCiHandler();
static cCiHandler *CreateCiHandler(const char *FileName); static cCiHandler *CreateCiHandler(const char *FileName);
int NumSlots(void) { return numSlots; } int NumSlots(void) { return numSlots; }
void SetEnabled(bool Enabled) { enabled = Enabled; }
bool Process(void); bool Process(void);
bool EnterMenu(int Slot); bool EnterMenu(int Slot);
cCiMenu *GetMenu(void); cCiMenu *GetMenu(void);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: dvbdevice.c 1.52 2003/04/18 11:35:08 kls Exp $ * $Id: dvbdevice.c 1.53 2003/04/19 10:29:09 kls Exp $
*/ */
#include "dvbdevice.h" #include "dvbdevice.h"
@ -264,7 +264,7 @@ void cDvbTuner::Action(void)
} }
} }
if (tunerStatus >= tsLocked) { if (tunerStatus >= tsLocked) {
if (ciHandler && channel.Ca() > CACONFBASE) { if (ciHandler) {
if (ciHandler->Process()) { if (ciHandler->Process()) {
if (tunerStatus != tsCam) {//XXX TODO update in case the CA descriptors have changed if (tunerStatus != tsCam) {//XXX TODO update in case the CA descriptors have changed
for (int Slot = 0; Slot < ciHandler->NumSlots(); Slot++) { for (int Slot = 0; Slot < ciHandler->NumSlots(); Slot++) {
@ -777,15 +777,11 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode)
CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, false)); CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, false));
if (siProcessor) if (siProcessor)
siProcessor->SetStatus(true); siProcessor->SetStatus(true);
if (ciHandler)
ciHandler->SetEnabled(true);
break; break;
case pmAudioVideo: case pmAudioVideo:
case pmAudioOnlyBlack: case pmAudioOnlyBlack:
if (siProcessor) if (siProcessor)
siProcessor->SetStatus(false); siProcessor->SetStatus(false);
if (ciHandler)
ciHandler->SetEnabled(false);
CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true)); CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true));
CHECK(ioctl(fd_audio, AUDIO_SELECT_SOURCE, AUDIO_SOURCE_MEMORY)); CHECK(ioctl(fd_audio, AUDIO_SELECT_SOURCE, AUDIO_SOURCE_MEMORY));
CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, PlayMode == pmAudioVideo)); CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, PlayMode == pmAudioVideo));
@ -796,8 +792,6 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode)
case pmAudioOnly: case pmAudioOnly:
if (siProcessor) if (siProcessor)
siProcessor->SetStatus(false); siProcessor->SetStatus(false);
if (ciHandler)
ciHandler->SetEnabled(false);
CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true)); CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true));
CHECK(ioctl(fd_audio, AUDIO_STOP, true)); CHECK(ioctl(fd_audio, AUDIO_STOP, true));
CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER)); CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER));
@ -809,8 +803,6 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode)
case pmExtern_THIS_SHOULD_BE_AVOIDED: case pmExtern_THIS_SHOULD_BE_AVOIDED:
if (siProcessor) if (siProcessor)
siProcessor->SetStatus(false); siProcessor->SetStatus(false);
if (ciHandler)
ciHandler->SetEnabled(false);
close(fd_video); close(fd_video);
close(fd_audio); close(fd_audio);
fd_video = fd_audio = -1; fd_video = fd_audio = -1;