Fixed checking for a visible live programme in case a menu or the channel display is currently open

This commit is contained in:
Klaus Schmidinger 2012-06-13 11:35:16 +02:00
parent a8dc76a8ac
commit 2a18fb9687
4 changed files with 16 additions and 7 deletions

View File

@ -7183,3 +7183,5 @@ Video Disk Recorder Revision History
if the editing point merges two seamlessly fitting parts of the same stream (thanks if the editing point merges two seamlessly fitting parts of the same stream (thanks
to Torsten Lang). to Torsten Lang).
- Fixed displaying messages in the LCARS skin. - Fixed displaying messages in the LCARS skin.
- Fixed checking for a visible live programme in case a menu or the channel display
is currently open.

11
menu.c
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: menu.c 2.55 2012/06/09 14:27:02 kls Exp $ * $Id: menu.c 2.56 2012/06/13 11:24:40 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -1888,6 +1888,8 @@ eOSState cMenuCommands::ProcessKey(eKeys Key)
// --- cMenuCam -------------------------------------------------------------- // --- cMenuCam --------------------------------------------------------------
static bool CamMenuIsOpen = false;
class cMenuCam : public cOsdMenu { class cMenuCam : public cOsdMenu {
private: private:
cCamSlot *camSlot; cCamSlot *camSlot;
@ -1919,6 +1921,7 @@ cMenuCam::cMenuCam(cCamSlot *CamSlot)
lastCamExchange = time(NULL); lastCamExchange = time(NULL);
SetNeedsFastResponse(true); SetNeedsFastResponse(true);
QueryCam(); QueryCam();
CamMenuIsOpen = true;
} }
cMenuCam::~cMenuCam() cMenuCam::~cMenuCam()
@ -1930,6 +1933,7 @@ cMenuCam::~cMenuCam()
ciEnquiry->Abort(); ciEnquiry->Abort();
delete ciEnquiry; delete ciEnquiry;
free(input); free(input);
CamMenuIsOpen = false;
} }
void cMenuCam::GenerateTitle(const char *s) void cMenuCam::GenerateTitle(const char *s)
@ -2075,6 +2079,11 @@ cOsdObject *CamControl(void)
return NULL; return NULL;
} }
bool CamMenuActive(void)
{
return CamMenuIsOpen;
}
// --- cMenuRecording -------------------------------------------------------- // --- cMenuRecording --------------------------------------------------------
class cMenuRecording : public cOsdMenu { class cMenuRecording : public cOsdMenu {

3
menu.h
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: menu.h 2.10 2012/06/09 12:12:43 kls Exp $ * $Id: menu.h 2.11 2012/06/13 11:23:11 kls Exp $
*/ */
#ifndef __MENU_H #ifndef __MENU_H
@ -187,6 +187,7 @@ public:
}; };
cOsdObject *CamControl(void); cOsdObject *CamControl(void);
bool CamMenuActive(void);
class cMenuRecordingItem; class cMenuRecordingItem;

7
vdr.c
View File

@ -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.36 2012/06/02 13:10:00 kls Exp $ * $Id: vdr.c 2.37 2012/06/13 11:28:41 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -570,7 +570,6 @@ int main(int argc, char *argv[])
int MaxLatencyTime = 0; int MaxLatencyTime = 0;
bool InhibitEpgScan = false; bool InhibitEpgScan = false;
bool IsInfoMenu = false; bool IsInfoMenu = false;
bool CheckHasProgramme = false;
cSkin *CurrentSkin = NULL; cSkin *CurrentSkin = NULL;
// Load plugins: // Load plugins:
@ -761,7 +760,7 @@ int main(int argc, char *argv[])
// 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() && !cDevice::PrimaryDevice()->HasProgramme()) {
static time_t lastTime = 0; static time_t lastTime = 0;
if ((!Menu || CheckHasProgramme) && Now - lastTime > MINCHANNELWAIT) { // !Menu to avoid interfering with the CAM if a CAM menu is open if (!CamMenuActive() && Now - lastTime > MINCHANNELWAIT) { // !CamMenuActive() to avoid interfering with the CAM if a CAM menu is open
cChannel *Channel = Channels.GetByNumber(cDevice::CurrentChannel()); cChannel *Channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (Channel && (Channel->Vpid() || Channel->Apid(0) || Channel->Dpid(0))) { 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... if (cDevice::GetDeviceForTransponder(Channel, LIVEPRIORITY) && Channels.SwitchTo(Channel->Number())) // try to switch to the original channel...
@ -774,7 +773,6 @@ int main(int argc, char *argv[])
} }
lastTime = Now; // don't do this too often lastTime = Now; // don't do this too often
LastTimerChannel = -1; LastTimerChannel = -1;
CheckHasProgramme = false;
} }
} }
// Update the OSD size: // Update the OSD size:
@ -1140,7 +1138,6 @@ int main(int argc, char *argv[])
DELETE_MENU; DELETE_MENU;
cControl::Shutdown(); cControl::Shutdown();
Menu = new cMenuMain(osRecordings); Menu = new cMenuMain(osRecordings);
CheckHasProgramme = true; // to have live tv after stopping replay with 'Back'
break; break;
case osReplay: DELETE_MENU; case osReplay: DELETE_MENU;
cControl::Shutdown(); cControl::Shutdown();