summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2010-11-19 20:37:13 +0100
committerJochen Dolze <vdr@dolze.de>2010-11-19 20:37:13 +0100
commit1da680d035c377fa6ec94cc97f786f43b07eea2b (patch)
tree9219e2ee9a5c590e82fb80d50457514a40f639c0
parente960650d7ebc5f70d31df1ea7ef9a30b97a1b510 (diff)
downloadvdr-plugin-markad-1da680d035c377fa6ec94cc97f786f43b07eea2b.tar.gz
vdr-plugin-markad-1da680d035c377fa6ec94cc97f786f43b07eea2b.tar.bz2
Changed broken stream handling
-rw-r--r--command/markad-standalone.cpp19
-rw-r--r--command/markad-standalone.h1
2 files changed, 8 insertions, 12 deletions
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index bf10fdf..3c3b6be 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -832,7 +832,7 @@ bool cMarkAdStandalone::CheckIndexGrowing()
// If not we wait. If we wait too much,
// we discard this check...
-#define WAITTIME 10
+#define WAITTIME 15
if (!indexFile) return false;
if (sleepcnt>=2) return false; // we already slept too much
@@ -846,29 +846,26 @@ bool cMarkAdStandalone::CheckIndexGrowing()
int maxframes=statbuf.st_size/8;
if (maxframes<(framecnt+200))
{
- if ((difftime(time(NULL),statbuf.st_mtime))>=10)
+ if ((difftime(time(NULL),statbuf.st_mtime))>=WAITTIME)
{
if (length && startTime)
{
if (time(NULL)>(startTime+(time_t) length))
{
+ // "old" recording
return false;
}
else
{
sleepcnt=0;
- iwaittime_msg+=WAITTIME;
+ if (!iwaittime) esyslog("recording interrupted, waiting for continuation...");
iwaittime+=WAITTIME;
- if (iwaittime_msg>=120)
- {
- esyslog("recording interrupted %is, still waiting...",iwaittime);
- iwaittime_msg=0;
- }
}
}
else
{
- return false; // "old" file
+ // "old" recording
+ return false;
}
}
marks.Save(directory,macontext.Video.Info.FramesPerSecond,isTS);
@@ -889,7 +886,7 @@ bool cMarkAdStandalone::CheckIndexGrowing()
{
esyslog("resuming after %is of interrupted recording, marks can be wrong now!",iwaittime);
}
- iwaittime=iwaittime_msg=0;
+ iwaittime=0;
sleepcnt=0;
notenough=false;
}
@@ -2356,7 +2353,7 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory, const MarkAdConfig *
sleepcnt=0;
- waittime=iwaittime=iwaittime_msg=0;
+ waittime=iwaittime=0;
duplicate=false;
marksAligned=false;
title[0]=0;
diff --git a/command/markad-standalone.h b/command/markad-standalone.h
index f7b2966..669b2f5 100644
--- a/command/markad-standalone.h
+++ b/command/markad-standalone.h
@@ -192,7 +192,6 @@ unsigned Descriptor_Length:
bool reprocess;
int waittime;
int iwaittime;
- int iwaittime_msg;
struct timeval tv1,tv2;
struct timezone tz;