diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2015-04-11 10:47:38 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2015-04-11 10:47:38 +0200 |
commit | 7d4907507916b555ae8cdd33f9741ed7ae704ad7 (patch) | |
tree | 46945f5026dc298ba053ca78a8efc71612c6453e /recording.c | |
parent | 577d43facf1f1049e5b3ee83fcdea41f61004a6d (diff) | |
download | vdr-7d4907507916b555ae8cdd33f9741ed7ae704ad7.tar.gz vdr-7d4907507916b555ae8cdd33f9741ed7ae704ad7.tar.bz2 |
Reduced the priority of the "video directory scanner" thread and checking cIoThrottle::Engaged() when it is running
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/recording.c b/recording.c index 0a084140..0164bb97 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 3.28 2015/02/16 07:49:14 kls Exp $ + * $Id: recording.c 4.1 2015/04/11 10:44:38 kls Exp $ */ #include "recording.h" @@ -1367,7 +1367,7 @@ cRecordings Recordings; char *cRecordings::updateFileName = NULL; cRecordings::cRecordings(bool Deleted) -:cThread("video directory scanner") +:cThread("video directory scanner", true) { deleted = Deleted; initial = true; @@ -1412,6 +1412,8 @@ bool cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev cReadDir d(DirName); struct dirent *e; while ((Foreground || Running()) && (e = d.Next()) != NULL) { + if (!Foreground && cIoThrottle::Engaged()) + cCondWait::SleepMs(100); cString buffer = AddDirectory(DirName, e->d_name); struct stat st; if (lstat(buffer, &st) == 0) { |