From af2a135212088f0cba6bd8f98544b271c2f71bef Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 4 May 2003 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.1.30=20-=20Fixed=20minimum=20lifespan=20of?= =?UTF-8?q?=20deleted=20recordings=20(thanks=20to=20Jaakko=20Hyv=C3=A4tti)?= =?UTF-8?q?.=20-=20Updated=20French=20OSD=20texts=20(thanks=20to=20Olivier?= =?UTF-8?q?=20Jacques).=20-=20Fixed=20paging=20through=20lists=20with=20re?= =?UTF-8?q?peated=20Left/Right=20keys.=20-=20Fixed=20setting=20the=20PCR-P?= =?UTF-8?q?ID=20in=20case=20it=20is=20equal=20to=20one=20of=20the=20other?= =?UTF-8?q?=20PIDs=20(thanks=20=20=20to=20Oliver=20Endriss=20for=20reporti?= =?UTF-8?q?ng=20this=20one).=20-=20Fixed=20double=20call=20to=20MainMenuAc?= =?UTF-8?q?tion()=20of=20a=20plugin=20if=20invoked=20via=20a=20hotkey=20(t?= =?UTF-8?q?hanks=20=20=20to=20Kai=20Moeller=20for=20reporting=20this=20one?= =?UTF-8?q?).=20-=20Fixed=20handling=20dedicated=20keys.=20-=20Now=20turni?= =?UTF-8?q?ng=20off=20live=20PIDs=20when=20replaying.=20This=20avoids=20sh?= =?UTF-8?q?ort=20spikes=20from=20other=20=20=20channels=20when=20switching?= =?UTF-8?q?=20between=20Transfer=20Mode=20channels,=20and=20also=20lets=20?= =?UTF-8?q?an=20ongoing=20=20=20replay=20continue=20even=20if=20a=20record?= =?UTF-8?q?ing=20is=20started=20on=20the=20primary=20device.=20-=20The=20R?= =?UTF-8?q?CU=20channel=20display=20no=20longer=20changes=20when=20a=20rec?= =?UTF-8?q?ording=20on=20a=20different=20=20=20channel=20starts=20on=20the?= =?UTF-8?q?=20primary=20device.=20-=20Restoring=20the=20current=20channel?= =?UTF-8?q?=20in=20case=20a=20recording=20has=20switched=20the=20transpond?= =?UTF-8?q?er.=20=20=20If=20all=20devices=20are=20busy=20and=20none=20of?= =?UTF-8?q?=20them=20can=20provide=20the=20current=20channel,=20the=20=20?= =?UTF-8?q?=20message=20"Channel=20not=20available!"=20will=20be=20display?= =?UTF-8?q?ed.=20-=20Removed=20the=20(no=20longer=20necessary)=20'panic'?= =?UTF-8?q?=20stuff=20from=20cThread.=20-=20Added=20cStatus::OsdItem()=20t?= =?UTF-8?q?o=20provide=20the=20entire=20list=20of=20menu=20items=20to=20a?= =?UTF-8?q?=20plugin=20=20=20(thanks=20to=20Carsten=20Siebholz).=20-=20The?= =?UTF-8?q?=20red=20("Record")=20and=20yellow=20("Pause")=20button=20in=20?= =?UTF-8?q?the=20"Main"=20menu=20are=20no=20longer=20=20=20available=20whe?= =?UTF-8?q?n=20replaying.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vdr.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'vdr.c') diff --git a/vdr.c b/vdr.c index a160e4c..ae4edd5 100644 --- a/vdr.c +++ b/vdr.c @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.150 2003/04/21 14:41:41 kls Exp $ + * $Id: vdr.c 1.152 2003/05/03 13:39:57 kls Exp $ */ #include @@ -53,6 +53,7 @@ #include "tools.h" #include "videodir.h" +#define MINCHANNELWAIT 10 // seconds to wait between failed channel switchings #define ACTIVITYTIMEOUT 60 // seconds before starting housekeeping #define SHUTDOWNWAIT 300 // seconds to wait in user prompt before automatic shutdown #define MANUALSTART 600 // seconds the next timer must be in the future to assume manual start @@ -460,9 +461,14 @@ int main(int argc, char *argv[]) } // Attach launched player control: cControl::Attach(); - // Make sure Transfer-Mode is re-started after detaching a player: - if (cDevice::PrimaryDevice()->PlayerDetached() && !cDevice::PrimaryDevice()->Replaying()) - Channels.SwitchTo(cDevice::CurrentChannel()); + // Make sure we have a visible programme in case device usage has changed: + if (!cDevice::PrimaryDevice()->HasProgramme()) { + static time_t lastTime = 0; + if (time(NULL) - lastTime > MINCHANNELWAIT) { + if (!Channels.SwitchTo(cDevice::CurrentChannel())) + lastTime = time(NULL); // don't do this too often + } + } // Restart the Watchdog timer: if (WatchdogTimeout > 0) { int LatencyTime = WatchdogTimeout - alarm(WatchdogTimeout); @@ -503,6 +509,7 @@ int main(int argc, char *argv[]) switch (key) { // Menu control: case kMenu: + key = kNone; // nobody else needs to see this key if (Menu) { DELETENULL(Menu); if (!Temp) @@ -518,14 +525,15 @@ int main(int argc, char *argv[]) if (cControl::Control())\ cControl::Control()->Hide();\ Menu = new cMenuMain(cControl::Control(), function);\ - Temp = NULL; + Temp = NULL;\ + key = kNone; // nobody else needs to see this key case kSchedule: DirectMainFunction(osSchedule); break; case kChannels: DirectMainFunction(osChannels); break; case kTimers: DirectMainFunction(osTimers); break; case kRecordings: DirectMainFunction(osRecordings); break; case kSetup: DirectMainFunction(osSetup); break; case kCommands: DirectMainFunction(osCommands); break; - case kUser1 ... kUser9: cRemote::PutMacro(key); break; + case kUser1 ... kUser9: cRemote::PutMacro(key); key = kNone; break; case k_Plugin: DirectMainFunction(osPlugin, cRemote::GetPlugin()); break; // Channel up/down: case kChanUp|k_Repeat: -- cgit v1.2.3