mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The timeout for trying to switch to a valid programme is now reset immediately once a programme has been found
This commit is contained in:
parent
d2cfd52013
commit
9455b9a2b0
4
HISTORY
4
HISTORY
@ -7585,7 +7585,7 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed formatting and removed some superfluous break statements in vdr.c's command
|
- Fixed formatting and removed some superfluous break statements in vdr.c's command
|
||||||
line option switch.
|
line option switch.
|
||||||
|
|
||||||
2013-02-13: Version 1.7.38
|
2013-02-14: Version 1.7.38
|
||||||
|
|
||||||
- Updated the Ukrainian OSD texts (thanks to Yarema Aka Knedlyk).
|
- Updated the Ukrainian OSD texts (thanks to Yarema Aka Knedlyk).
|
||||||
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
|
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
|
||||||
@ -7610,3 +7610,5 @@ Video Disk Recorder Revision History
|
|||||||
- Added demos of the DrawEllipse() and DrawSlope() function to the 'osddemo'
|
- Added demos of the DrawEllipse() and DrawSlope() function to the 'osddemo'
|
||||||
plugin (press '1' or '2', respectively).
|
plugin (press '1' or '2', respectively).
|
||||||
- Updated the Lithuanian OSD texts (thanks to Valdemaras Pipiras).
|
- Updated the Lithuanian OSD texts (thanks to Valdemaras Pipiras).
|
||||||
|
- The timeout for trying to switch to a valid programme is now reset immediately once
|
||||||
|
a programme has been found.
|
||||||
|
28
vdr.c
28
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.tvdr.de
|
* The project's page is at http://www.tvdr.de
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 2.48 2013/02/08 10:47:02 kls Exp $
|
* $Id: vdr.c 2.49 2013/02/14 10:49:06 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -834,22 +834,26 @@ int main(int argc, char *argv[])
|
|||||||
time_t Now = time(NULL);
|
time_t Now = time(NULL);
|
||||||
|
|
||||||
// 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 (!EITScanner.Active() && cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) {
|
if (!EITScanner.Active() && cDevice::PrimaryDevice()->HasDecoder()) {
|
||||||
static time_t lastTime = 0;
|
static time_t lastTime = 0;
|
||||||
if (!CamMenuActive() && Now - lastTime > MINCHANNELWAIT) { // !CamMenuActive() to avoid interfering with the CAM if a CAM menu is open
|
if (!cDevice::PrimaryDevice()->HasProgramme()) {
|
||||||
cChannel *Channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
if (!CamMenuActive() && Now - lastTime > MINCHANNELWAIT) { // !CamMenuActive() to avoid interfering with the CAM if a CAM menu is open
|
||||||
if (Channel && (Channel->Vpid() || Channel->Apid(0) || Channel->Dpid(0))) {
|
cChannel *Channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||||
if (cDevice::GetDeviceForTransponder(Channel, LIVEPRIORITY) && Channels.SwitchTo(Channel->Number())) // try to switch to the original channel...
|
if (Channel && (Channel->Vpid() || Channel->Apid(0) || Channel->Dpid(0))) {
|
||||||
;
|
if (cDevice::GetDeviceForTransponder(Channel, LIVEPRIORITY) && Channels.SwitchTo(Channel->Number())) // try to switch to the original channel...
|
||||||
else if (LastTimerChannel > 0) {
|
|
||||||
Channel = Channels.GetByNumber(LastTimerChannel);
|
|
||||||
if (Channel && cDevice::GetDeviceForTransponder(Channel, LIVEPRIORITY) && Channels.SwitchTo(LastTimerChannel)) // ...or the one used by the last timer
|
|
||||||
;
|
;
|
||||||
|
else if (LastTimerChannel > 0) {
|
||||||
|
Channel = Channels.GetByNumber(LastTimerChannel);
|
||||||
|
if (Channel && cDevice::GetDeviceForTransponder(Channel, LIVEPRIORITY) && Channels.SwitchTo(LastTimerChannel)) // ...or the one used by the last timer
|
||||||
|
;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
lastTime = Now; // don't do this too often
|
||||||
|
LastTimerChannel = -1;
|
||||||
}
|
}
|
||||||
lastTime = Now; // don't do this too often
|
|
||||||
LastTimerChannel = -1;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
lastTime = 0; // makes sure we immediately try again next time
|
||||||
}
|
}
|
||||||
// Update the OSD size:
|
// Update the OSD size:
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user