diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2018-04-14 10:24:41 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2018-04-14 10:24:41 +0200 |
commit | c057e057f91d4d909d2105d5530187ca6ab17f2c (patch) | |
tree | fecddfa780dfc44ad42847265855ebea7858a5c3 | |
parent | fb03134411200478be4ae2c72266dd76b074b77a (diff) | |
download | vdr-c057e057f91d4d909d2105d5530187ca6ab17f2c.tar.gz vdr-c057e057f91d4d909d2105d5530187ca6ab17f2c.tar.bz2 |
Fixed a high CPU load during replay with active progress display
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | menu.c | 6 | ||||
-rw-r--r-- | menu.h | 3 |
4 files changed, 10 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index f1dfc088..4fb011f9 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3314,6 +3314,7 @@ Matthias Senzel <matthias.senzel@t-online.de> for reporting that the info of a newly edited recording was not available immediately after starting the editing process for reporting a problem with setting the initial offset of the cursor in a list menu + for reporting a high CPU load during replay with active progress display Marek Nazarko <mnazarko@gmail.com> for translating OSD texts to the Polish language @@ -9344,3 +9344,5 @@ Video Disk Recorder Revision History - Updated the Italian OSD texts (thanks to Diego Pierotto). - Updated the Hungarian OSD texts (thanks to István Füley). - Updated the French OSD texts (thanks to Bernard Jaulin). +- Fixed a high CPU load during replay with active progress display (reported by Matthias + Senzel). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 4.73 2018/04/09 09:20:03 kls Exp $ + * $Id: menu.c 4.74 2018/04/14 10:24:41 kls Exp $ */ #include "menu.h" @@ -45,6 +45,7 @@ #define MAXWAITFORCAMMENU 10 // seconds to wait for the CAM menu to open #define CAMMENURETRYTIMEOUT 3 // seconds after which opening the CAM menu is retried #define CAMRESPONSETIMEOUT 5 // seconds to wait for a response from a CAM +#define PROGRESSTIMEOUT 100 // milliseconds to wait before updating the replay progress display #define MINFREEDISK 300 // minimum free disk space (in MB) required to start recording #define NODISKSPACEDELTA 300 // seconds between "Not enough disk space to start recording!" messages #define MAXCHNAMWIDTH 16 // maximum number of characters of channels' short names shown in schedules menus @@ -5733,6 +5734,8 @@ void cReplayControl::ShowMode(void) bool cReplayControl::ShowProgress(bool Initial) { int Current, Total; + if (!(Initial || updateTimer.TimedOut())) + return visible; if (GetFrameNumber(Current, Total) && Total > 0) { if (!visible) { displayReplay = Skins.Current()->DisplayReplay(modeOnly); @@ -5762,6 +5765,7 @@ bool cReplayControl::ShowProgress(bool Initial) } lastTotal = Total; ShowMode(); + updateTimer.Set(PROGRESSTIMEOUT); return true; } return false; @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.h 4.7 2018/04/02 13:41:49 kls Exp $ + * $Id: menu.h 4.8 2018/04/14 10:24:41 kls Exp $ */ #ifndef __MENU_H @@ -300,6 +300,7 @@ private: bool lastPlay, lastForward; int lastSpeed; time_t timeoutShow; + cTimeMs updateTimer; bool timeSearchActive, timeSearchHide; int timeSearchTime, timeSearchPos; void TimeSearchDisplay(void); |