mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The DVB devices no longer send CA descriptors to the CAM while the EPG scanner is active
This commit is contained in:
parent
6d677e2a89
commit
ee10028dc6
3
HISTORY
3
HISTORY
@ -2372,3 +2372,6 @@ Video Disk Recorder Revision History
|
||||
- When setting an editing mark while in "Pause" mode, replay now immediately
|
||||
jumps to the marked frame (thanks to Oskar Signell for pointing out this
|
||||
problem).
|
||||
- The DVB devices no longer send CA descriptors to the CAM while the EPG scanner
|
||||
is active (sometimes the CAMs got irritated when the device tuned to channels
|
||||
they couldn't handle).
|
||||
|
14
dvbdevice.c
14
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.63 2003/08/30 11:40:41 kls Exp $
|
||||
* $Id: dvbdevice.c 1.64 2003/09/06 13:19:33 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbdevice.h"
|
||||
@ -74,6 +74,7 @@ private:
|
||||
cChannel channel;
|
||||
const char *diseqcCommands;
|
||||
bool active;
|
||||
bool useCa;
|
||||
time_t startTime;
|
||||
eTunerStatus tunerStatus;
|
||||
cMutex mutex;
|
||||
@ -84,7 +85,7 @@ public:
|
||||
cDvbTuner(int Fd_Frontend, int CardIndex, fe_type_t FrontendType, cCiHandler *CiHandler);
|
||||
virtual ~cDvbTuner();
|
||||
bool IsTunedTo(const cChannel *Channel) const;
|
||||
void Set(const cChannel *Channel, bool Tune);
|
||||
void Set(const cChannel *Channel, bool Tune, bool UseCa);
|
||||
bool Locked(void) { return tunerStatus == tsLocked; }
|
||||
};
|
||||
|
||||
@ -96,6 +97,7 @@ cDvbTuner::cDvbTuner(int Fd_Frontend, int CardIndex, fe_type_t FrontendType, cCi
|
||||
ciHandler = CiHandler;
|
||||
diseqcCommands = NULL;
|
||||
active = false;
|
||||
useCa = false;
|
||||
tunerStatus = tsIdle;
|
||||
startTime = time(NULL);
|
||||
Start();
|
||||
@ -114,7 +116,7 @@ bool cDvbTuner::IsTunedTo(const cChannel *Channel) const
|
||||
return tunerStatus != tsIdle && channel.Source() == Channel->Source() && channel.Frequency() == Channel->Frequency();
|
||||
}
|
||||
|
||||
void cDvbTuner::Set(const cChannel *Channel, bool Tune)
|
||||
void cDvbTuner::Set(const cChannel *Channel, bool Tune, bool UseCa)
|
||||
{
|
||||
cMutexLock MutexLock(&mutex);
|
||||
bool CaChange = !(Channel->GetChannelID() == channel.GetChannelID());
|
||||
@ -122,6 +124,7 @@ void cDvbTuner::Set(const cChannel *Channel, bool Tune)
|
||||
tunerStatus = tsSet;
|
||||
else if (tunerStatus == tsCam && CaChange)
|
||||
tunerStatus = tsTuned;
|
||||
useCa = UseCa;
|
||||
if (Channel->Ca() && CaChange)
|
||||
startTime = time(NULL);
|
||||
channel = *Channel;
|
||||
@ -267,7 +270,7 @@ void cDvbTuner::Action(void)
|
||||
}
|
||||
if (tunerStatus >= tsLocked) {
|
||||
if (ciHandler) {
|
||||
if (ciHandler->Process()) {
|
||||
if (ciHandler->Process() && useCa) {
|
||||
if (tunerStatus != tsCam) {//XXX TODO update in case the CA descriptors have changed
|
||||
for (int Slot = 0; Slot < ciHandler->NumSlots(); Slot++) {
|
||||
uchar buffer[2048];
|
||||
@ -673,6 +676,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
||||
StartTransferMode = false;
|
||||
#endif
|
||||
|
||||
// XXX 1.3: use the same mechanism as below (!EITScanner.UsesDevice(this))
|
||||
if (EITScanner.Active()) {
|
||||
StartTransferMode = false;
|
||||
TurnOnLivePIDs = false;
|
||||
@ -690,7 +694,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
||||
if (TurnOffLivePIDs)
|
||||
TurnOffLiveMode();
|
||||
|
||||
dvbTuner->Set(Channel, DoTune);
|
||||
dvbTuner->Set(Channel, DoTune, !EITScanner.UsesDevice(this)); //XXX 1.3: this is an ugly hack - find a cleaner solution
|
||||
|
||||
// PID settings:
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: eitscan.c 1.13 2003/05/24 13:34:59 kls Exp $
|
||||
* $Id: eitscan.c 1.14 2003/09/06 13:06:13 kls Exp $
|
||||
*/
|
||||
|
||||
#include "eitscan.h"
|
||||
@ -17,6 +17,7 @@ cEITScanner EITScanner;
|
||||
cEITScanner::cEITScanner(void)
|
||||
{
|
||||
lastScan = lastActivity = time(NULL);
|
||||
currentDevice = NULL;
|
||||
currentChannel = 0;
|
||||
memset(lastChannel, 0, sizeof(lastChannel));
|
||||
numTransponders = 0;
|
||||
@ -66,7 +67,9 @@ void cEITScanner::Process(void)
|
||||
if (Device == cDevice::PrimaryDevice() && !currentChannel) {
|
||||
currentChannel = Device->CurrentChannel();
|
||||
}
|
||||
currentDevice = Device;
|
||||
Device->SwitchChannel(Channel, false);
|
||||
currentDevice = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: eitscan.h 1.3 2003/05/24 13:21:36 kls Exp $
|
||||
* $Id: eitscan.h 1.4 2003/09/06 13:05:51 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __EITSCAN_H
|
||||
@ -19,6 +19,7 @@ private:
|
||||
ScanTimeout = 20
|
||||
};
|
||||
time_t lastScan, lastActivity;
|
||||
cDevice *currentDevice;
|
||||
int currentChannel;
|
||||
int lastChannel[MAXDEVICES];
|
||||
int numTransponders, *transponders;
|
||||
@ -27,6 +28,7 @@ public:
|
||||
cEITScanner(void);
|
||||
~cEITScanner();
|
||||
bool Active(void) { return currentChannel; }
|
||||
bool UsesDevice(const cDevice *Device) { return currentDevice == Device; }
|
||||
void Activity(void);
|
||||
void Process(void);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user