summaryrefslogtreecommitdiff
path: root/recorder.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-10-12 12:08:37 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2013-10-12 12:08:37 +0200
commit446c3b4cfd6f905bf6a5e1e073282b5a33eea24d (patch)
treee0bdc44f6411d059430ed02ea06239041d737f26 /recorder.c
parentadf0dac2c38a6773ec4925045551fad47488dd66 (diff)
downloadvdr-446c3b4cfd6f905bf6a5e1e073282b5a33eea24d.tar.gz
vdr-446c3b4cfd6f905bf6a5e1e073282b5a33eea24d.tar.bz2
Changed cRecorder::Action() to use cTimeMs instead of time()
Diffstat (limited to 'recorder.c')
-rw-r--r--recorder.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/recorder.c b/recorder.c
index a9cc8c95..7887a88b 100644
--- a/recorder.c
+++ b/recorder.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recorder.c 2.17 2012/09/22 11:53:57 kls Exp $
+ * $Id: recorder.c 3.1 2013/10/12 11:49:42 kls Exp $
*/
#include "recorder.h"
@@ -14,7 +14,7 @@
// The maximum time we wait before assuming that a recorded video data stream
// is broken:
-#define MAXBROKENTIMEOUT 30 // seconds
+#define MAXBROKENTIMEOUT 30000 // milliseconds
#define MINFREEDISKSPACE (512) // MB
#define DISKCHECKINTERVAL 100 // seconds
@@ -117,7 +117,7 @@ void cRecorder::Receive(uchar *Data, int Length)
void cRecorder::Action(void)
{
- time_t t = time(NULL);
+ cTimeMs t(MAXBROKENTIMEOUT);
bool InfoWritten = false;
bool FirstIframeSeen = false;
while (Running()) {
@@ -160,16 +160,16 @@ void cRecorder::Action(void)
break;
}
fileSize += Count;
- t = time(NULL);
+ t.Set(MAXBROKENTIMEOUT);
}
}
ringBuffer->Del(Count);
}
}
- if (time(NULL) - t > MAXBROKENTIMEOUT) {
+ if (t.TimedOut()) {
esyslog("ERROR: video data stream broken");
ShutdownHandler.RequestEmergencyExit();
- t = time(NULL);
+ t.Set(MAXBROKENTIMEOUT);
}
}
}