mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Changed cRecorder::Action() to use cTimeMs instead of time()
This commit is contained in:
parent
adf0dac2c3
commit
446c3b4cfd
@ -3020,6 +3020,8 @@ Torsten Lang <info@torstenlang.de>
|
|||||||
for reporting a problem with setting the system time from the TDT in case devices
|
for reporting a problem with setting the system time from the TDT in case devices
|
||||||
are tuned to the same transponder on different sources, and these broadcast different
|
are tuned to the same transponder on different sources, and these broadcast different
|
||||||
time data
|
time data
|
||||||
|
for reporting a problem with unjustified "video data stream broken" errors in case
|
||||||
|
the system time is changed while a recording is active
|
||||||
|
|
||||||
Christian Ruppert <idl0r@gentoo.org>
|
Christian Ruppert <idl0r@gentoo.org>
|
||||||
for some improvements to the Makefiles
|
for some improvements to the Makefiles
|
||||||
|
3
HISTORY
3
HISTORY
@ -7990,3 +7990,6 @@ Video Disk Recorder Revision History
|
|||||||
system time from the TDT, which avoids problems in case devices are tuned to the
|
system time from the TDT, which avoids problems in case devices are tuned to the
|
||||||
same transponder on different sources, and these broadcast different time data
|
same transponder on different sources, and these broadcast different time data
|
||||||
(reported by Torsten Lang).
|
(reported by Torsten Lang).
|
||||||
|
- Changed cRecorder::Action() to use cTimeMs instead of time() to avoid problems with
|
||||||
|
unjustified "video data stream broken" errors in case the system time is changed
|
||||||
|
while a recording is active (reported by Torsten Lang).
|
||||||
|
12
recorder.c
12
recorder.c
@ -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: 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"
|
#include "recorder.h"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
// The maximum time we wait before assuming that a recorded video data stream
|
// The maximum time we wait before assuming that a recorded video data stream
|
||||||
// is broken:
|
// is broken:
|
||||||
#define MAXBROKENTIMEOUT 30 // seconds
|
#define MAXBROKENTIMEOUT 30000 // milliseconds
|
||||||
|
|
||||||
#define MINFREEDISKSPACE (512) // MB
|
#define MINFREEDISKSPACE (512) // MB
|
||||||
#define DISKCHECKINTERVAL 100 // seconds
|
#define DISKCHECKINTERVAL 100 // seconds
|
||||||
@ -117,7 +117,7 @@ void cRecorder::Receive(uchar *Data, int Length)
|
|||||||
|
|
||||||
void cRecorder::Action(void)
|
void cRecorder::Action(void)
|
||||||
{
|
{
|
||||||
time_t t = time(NULL);
|
cTimeMs t(MAXBROKENTIMEOUT);
|
||||||
bool InfoWritten = false;
|
bool InfoWritten = false;
|
||||||
bool FirstIframeSeen = false;
|
bool FirstIframeSeen = false;
|
||||||
while (Running()) {
|
while (Running()) {
|
||||||
@ -160,16 +160,16 @@ void cRecorder::Action(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fileSize += Count;
|
fileSize += Count;
|
||||||
t = time(NULL);
|
t.Set(MAXBROKENTIMEOUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ringBuffer->Del(Count);
|
ringBuffer->Del(Count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (time(NULL) - t > MAXBROKENTIMEOUT) {
|
if (t.TimedOut()) {
|
||||||
esyslog("ERROR: video data stream broken");
|
esyslog("ERROR: video data stream broken");
|
||||||
ShutdownHandler.RequestEmergencyExit();
|
ShutdownHandler.RequestEmergencyExit();
|
||||||
t = time(NULL);
|
t.Set(MAXBROKENTIMEOUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user