1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed channel switching in the EPG scanner on single device systems

This commit is contained in:
Klaus Schmidinger 2003-05-24 13:38:28 +02:00
parent 755835ce44
commit e26e6b2e5a
5 changed files with 18 additions and 8 deletions

View File

@ -2188,3 +2188,4 @@ Video Disk Recorder Revision History
Ralf Klueber for reporting this one). Ralf Klueber for reporting this one).
- Fixed volume display in case a plugin has its own OSD open (thanks to Marcel - Fixed volume display in case a plugin has its own OSD open (thanks to Marcel
Wiesweg). Wiesweg).
- Fixed channel switching in the EPG scanner on single device systems.

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.59 2003/05/03 14:03:20 kls Exp $ * $Id: dvbdevice.c 1.60 2003/05/24 13:23:51 kls Exp $
*/ */
#include "dvbdevice.h" #include "dvbdevice.h"
@ -27,6 +27,7 @@ extern "C" {
#include "channels.h" #include "channels.h"
#include "diseqc.h" #include "diseqc.h"
#include "dvbosd.h" #include "dvbosd.h"
#include "eitscan.h"
#include "player.h" #include "player.h"
#include "receiver.h" #include "receiver.h"
#include "status.h" #include "status.h"
@ -658,6 +659,11 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
StartTransferMode = false; StartTransferMode = false;
#endif #endif
if (EITScanner.Active()) {
StartTransferMode = false;
TurnOnLivePIDs = false;
}
// Stop SI filtering: // Stop SI filtering:
if (siProcessor) { if (siProcessor) {

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: eitscan.c 1.12 2003/03/16 13:29:55 kls Exp $ * $Id: eitscan.c 1.13 2003/05/24 13:34:59 kls Exp $
*/ */
#include "eitscan.h" #include "eitscan.h"
@ -12,6 +12,8 @@
#include "channels.h" #include "channels.h"
#include "dvbdevice.h" #include "dvbdevice.h"
cEITScanner EITScanner;
cEITScanner::cEITScanner(void) cEITScanner::cEITScanner(void)
{ {
lastScan = lastActivity = time(NULL); lastScan = lastActivity = time(NULL);
@ -61,8 +63,9 @@ void cEITScanner::Process(void)
if (Channel) { if (Channel) {
lastChannel[Device->DeviceNumber()] = Channel->Number(); lastChannel[Device->DeviceNumber()] = Channel->Number();
if (Channel->Sid() && Device->ProvidesChannel(Channel) && !TransponderScanned(Channel)) { if (Channel->Sid() && Device->ProvidesChannel(Channel) && !TransponderScanned(Channel)) {
if (Device == cDevice::PrimaryDevice() && !currentChannel) if (Device == cDevice::PrimaryDevice() && !currentChannel) {
currentChannel = Device->CurrentChannel(); currentChannel = Device->CurrentChannel();
}
Device->SwitchChannel(Channel, false); Device->SwitchChannel(Channel, false);
break; break;
} }

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: eitscan.h 1.2 2003/03/16 13:20:40 kls Exp $ * $Id: eitscan.h 1.3 2003/05/24 13:21:36 kls Exp $
*/ */
#ifndef __EITSCAN_H #ifndef __EITSCAN_H
@ -31,4 +31,6 @@ public:
void Process(void); void Process(void);
}; };
extern cEITScanner EITScanner;
#endif //__EITSCAN_H #endif //__EITSCAN_H

6
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/people/kls/vdr * The project's page is at http://www.cadsoft.de/people/kls/vdr
* *
* $Id: vdr.c 1.157 2003/05/24 12:11:43 kls Exp $ * $Id: vdr.c 1.158 2003/05/24 13:35:13 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -430,8 +430,6 @@ int main(int argc, char *argv[])
else else
cDevice::PrimaryDevice()->SetVolume(Setup.CurrentVolume, true); cDevice::PrimaryDevice()->SetVolume(Setup.CurrentVolume, true);
cEITScanner EITScanner;
cSIProcessor::Read(); cSIProcessor::Read();
// Signal handlers: // Signal handlers:
@ -470,7 +468,7 @@ int main(int argc, char *argv[])
// Attach launched player control: // Attach launched player control:
cControl::Attach(); cControl::Attach();
// Make sure we have a visible programme in case device usage has changed: // Make sure we have a visible programme in case device usage has changed:
if (cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) { if (!EITScanner.Active() && cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) {
static time_t lastTime = 0; static time_t lastTime = 0;
if (time(NULL) - lastTime > MINCHANNELWAIT) { if (time(NULL) - lastTime > MINCHANNELWAIT) {
if (!Channels.SwitchTo(cDevice::CurrentChannel())) if (!Channels.SwitchTo(cDevice::CurrentChannel()))