summaryrefslogtreecommitdiff
path: root/eitscan.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-09-08 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-09-08 18:00:00 +0200
commit523c4a07aa9112841743fca2ebcce957fde03bc8 (patch)
tree6980f2c5644d926410c359574fa11732860d7eac /eitscan.c
parenta2a215d5e12ad35df8d0731dd00b6e41d5dd77fa (diff)
downloadvdr-patch-lnbsharing-523c4a07aa9112841743fca2ebcce957fde03bc8.tar.gz
vdr-patch-lnbsharing-523c4a07aa9112841743fca2ebcce957fde03bc8.tar.bz2
Version 1.1.9vdr-1.1.9
- Fixed the 'newplugin' script to make it name the target for creating the distribution package 'dist', as stated in the PLUGINS.html documentation. If you have already created a plugin source directory and Makefile you may want to check it and replace the 'package' target with 'dist' if necessary. - Changed device handling for being able to do simultaneous recording and replay on the same device (Time Shifting). In order for this to work you need to use a driver with a firmware version that has this feature implemented. - cDevice::ProvidesCa() is no longer virtual. The new function cDevice::ProvidesChannel() is now used to determine whether a device can receive a given channel, and by default this function returns false. So a device that is a pure replaying device doesn't need to do anything here. - Increased the recorder buffer size to 5MB in order to be able to better handle multiple recordings. - Implemented cTSBuffer for better handling TS packet buffering in derived cDevice classes. - Changed the interface if cDevice::GetTSPacket() to avoid unnecessary copying of data. - Removed cDevice::Channel(), since this makes no more sense with devices receiving multiple channels. - Switching through channels with the 'Up' and 'Down' keys now skips channels that are currently not available (for instance because all devices are recording and these channels are on different transponders). - Implemented an SPU decoder (thanks to Andreas Schultz). - Fixed a crash when entering an integer value outside the limits (thanks to Stefan Huelswitt for reporting this one). - Added play mode pmAudioOnlyBlack (thanks to Stefan Huelswitt).
Diffstat (limited to 'eitscan.c')
-rw-r--r--eitscan.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/eitscan.c b/eitscan.c
index 7a2000d..069a133 100644
--- a/eitscan.c
+++ b/eitscan.c
@@ -4,11 +4,12 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: eitscan.c 1.5 2002/08/11 11:11:39 kls Exp $
+ * $Id: eitscan.c 1.7 2002/09/08 11:08:52 kls Exp $
*/
#include "eitscan.h"
#include <stdlib.h>
+#include "dvbdevice.h"
cEITScanner::cEITScanner(void)
{
@@ -49,9 +50,9 @@ void cEITScanner::Process(void)
if (Setup.EPGScanTimeout && Channels.MaxNumber() > 1) {
time_t now = time(NULL);
if (now - lastScan > ScanTimeout && now - lastActivity > ActivityTimeout) {
- for (int i = 0; i < MAXDEVICES; i++) {
- cDevice *Device = cDevice::GetDevice(i + 1, MAXPRIORITY + 1);
- if (Device) {
+ for (int i = 0; i < cDevice::NumDevices(); i++) {
+ cDevice *Device = cDevice::GetDevice(i);
+ if (Device && Device->CardIndex() < MAXDVBDEVICES) {
if (Device != cDevice::PrimaryDevice() || (cDevice::NumDevices() == 1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) {
if (!(Device->Receiving() || Device->Replaying())) {
int oldCh = lastChannel;
@@ -63,12 +64,12 @@ void cEITScanner::Process(void)
}
cChannel *Channel = Channels.GetByNumber(ch);
if (Channel) {
- if (Channel->ca <= MAXDEVICES && !Device->ProvidesCa(Channel->ca))
- break; // the channel says it explicitly needs a different card
+ if (!Device->ProvidesChannel(Channel))
+ break;
if (Channel->pnr && !TransponderScanned(Channel)) {
if (Device == cDevice::PrimaryDevice() && !currentChannel)
- currentChannel = Device->Channel();
- Channel->Switch(Device, false);
+ currentChannel = Device->CurrentChannel();
+ Device->SwitchChannel(Channel, false);
lastChannel = ch;
break;
}
@@ -78,6 +79,8 @@ void cEITScanner::Process(void)
}
}
}
+ else
+ lastChannel++; // avoid hangup in case the last channel in the list is not provided by a DVB card
}
lastScan = time(NULL);
}