mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Modified cEITScanner::Process() so that it works on systems with only budget cards or a mix of DVB-S, DVB-C or DVB-T cards
This commit is contained in:
parent
eb8ad6b46d
commit
f41e3f327b
2
HISTORY
2
HISTORY
@ -3604,3 +3604,5 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed handling page up/down in menu lists in case there are several non selectable
|
- Fixed handling page up/down in menu lists in case there are several non selectable
|
||||||
items in a row (thanks to Udo Richter for reporting this one).
|
items in a row (thanks to Udo Richter for reporting this one).
|
||||||
- Added cOsdMenu::SetCols() to allow adjusting the menu columns.
|
- Added cOsdMenu::SetCols() to allow adjusting the menu columns.
|
||||||
|
- Modified cEITScanner::Process() so that it works on systems with only budget cards
|
||||||
|
or a mix of DVB-S, DVB-C or DVB-T cards.
|
||||||
|
11
device.c
11
device.c
@ -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: device.c 1.102 2005/06/05 13:28:03 kls Exp $
|
* $Id: device.c 1.103 2005/06/12 13:39:11 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@ -505,6 +505,15 @@ bool cDevice::ProvidesTransponder(const cChannel *Channel) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cDevice::ProvidesTransponderExclusively(const cChannel *Channel) const
|
||||||
|
{
|
||||||
|
for (int i = 0; i < numDevices; i++) {
|
||||||
|
if (device[i] && device[i] != this && device[i]->ProvidesTransponder(Channel))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool cDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
|
bool cDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
5
device.h
5
device.h
@ -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: device.h 1.58 2005/06/05 12:56:08 kls Exp $
|
* $Id: device.h 1.59 2005/06/12 13:35:47 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DEVICE_H
|
#ifndef __DEVICE_H
|
||||||
@ -186,6 +186,9 @@ public:
|
|||||||
///< Returns true if this device can provide the given source.
|
///< Returns true if this device can provide the given source.
|
||||||
virtual bool ProvidesTransponder(const cChannel *Channel) const;
|
virtual bool ProvidesTransponder(const cChannel *Channel) const;
|
||||||
///< XXX -> PLUGINS.html!
|
///< XXX -> PLUGINS.html!
|
||||||
|
virtual bool ProvidesTransponderExclusively(const cChannel *Channel) const;
|
||||||
|
///< Returns true if this is the only device that is able to provide
|
||||||
|
///< the given channel's transponder.
|
||||||
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
|
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
|
||||||
///< Returns true if this device can provide the given channel.
|
///< Returns true if this device can provide the given channel.
|
||||||
///< In case the device has cReceivers attached to it or it is the primary
|
///< In case the device has cReceivers attached to it or it is the primary
|
||||||
|
41
eitscan.c
41
eitscan.c
@ -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: eitscan.c 1.25 2005/06/05 14:43:29 kls Exp $
|
* $Id: eitscan.c 1.26 2005/06/12 14:09:45 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "eitscan.h"
|
#include "eitscan.h"
|
||||||
@ -12,6 +12,7 @@
|
|||||||
#include "channels.h"
|
#include "channels.h"
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
#include "skins.h"
|
#include "skins.h"
|
||||||
|
#include "transfer.h"
|
||||||
|
|
||||||
// --- cScanData -------------------------------------------------------------
|
// --- cScanData -------------------------------------------------------------
|
||||||
|
|
||||||
@ -139,47 +140,43 @@ void cEITScanner::Process(void)
|
|||||||
transponderList = NULL;
|
transponderList = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (bool AnyDeviceSwitched = false; !AnyDeviceSwitched; ) {
|
bool AnyDeviceSwitched = false;
|
||||||
cScanData *ScanData = NULL;
|
|
||||||
for (int i = 0; i < cDevice::NumDevices(); i++) {
|
for (int i = 0; i < cDevice::NumDevices(); i++) {
|
||||||
if (ScanData || (ScanData = scanList->First()) != NULL) {
|
|
||||||
cDevice *Device = cDevice::GetDevice(i);
|
cDevice *Device = cDevice::GetDevice(i);
|
||||||
if (Device) {
|
if (Device) {
|
||||||
if (Device != cDevice::PrimaryDevice() || (cDevice::NumDevices() == 1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) {
|
for (cScanData *ScanData = scanList->First(); ScanData; ScanData = scanList->Next(ScanData)) {
|
||||||
if (!(Device->Receiving(true) || Device->Replaying())) {
|
|
||||||
const cChannel *Channel = ScanData->GetChannel();
|
const cChannel *Channel = ScanData->GetChannel();
|
||||||
if (Channel) {
|
if (Channel) {
|
||||||
if ((!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= 0x0100) && Device->ProvidesTransponder(Channel)) {
|
if (!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= 0x0100) {
|
||||||
if (Device == cDevice::PrimaryDevice() && !currentChannel) {
|
if (Device->ProvidesTransponder(Channel)) {
|
||||||
|
if (!Device->Receiving()) {
|
||||||
|
if (Device != cDevice::ActualDevice() || (Device->ProvidesTransponderExclusively(Channel) && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) {
|
||||||
|
if (Device == cDevice::ActualDevice() && !currentChannel) {
|
||||||
|
if (cTransferControl::ReceiverDevice())
|
||||||
|
cDevice::PrimaryDevice()->StopReplay(); // stop transfer mode
|
||||||
currentChannel = Device->CurrentChannel();
|
currentChannel = Device->CurrentChannel();
|
||||||
Skins.Message(mtInfo, tr("Starting EPG scan"));
|
Skins.Message(mtInfo, tr("Starting EPG scan"));
|
||||||
}
|
}
|
||||||
currentDevice = Device;//XXX see also dvbdevice.c!!!
|
currentDevice = Device;//XXX see also dvbdevice.c!!!
|
||||||
|
//dsyslog("EIT scan: device %d source %-8s tp %5d", Device->DeviceNumber() + 1, *cSource::ToString(Channel->Source()), Channel->Transponder());
|
||||||
Device->SwitchChannel(Channel, false);
|
Device->SwitchChannel(Channel, false);
|
||||||
currentDevice = NULL;
|
currentDevice = NULL;
|
||||||
scanList->Del(ScanData);
|
scanList->Del(ScanData);
|
||||||
ScanData = NULL;
|
|
||||||
AnyDeviceSwitched = true;
|
AnyDeviceSwitched = true;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ScanData && !AnyDeviceSwitched) {
|
|
||||||
scanList->Del(ScanData);
|
|
||||||
ScanData = NULL;
|
|
||||||
}
|
}
|
||||||
if (!scanList->Count()) {
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!scanList->Count() || !AnyDeviceSwitched) {
|
||||||
delete scanList;
|
delete scanList;
|
||||||
scanList = NULL;
|
scanList = NULL;
|
||||||
if (lastActivity == 0) // this was a triggered scan
|
if (lastActivity == 0) // this was a triggered scan
|
||||||
Activity();
|
Activity();
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Channels.Unlock();
|
Channels.Unlock();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user