v3.0.t10
-turns out the previous statment on the previous commit is incorrect. it is every possible to overlap events. to mitigate this, evtHist was added to shared_t to track recently copied source vids and remove them from the event queued to be written.
This commit is contained in:
parent
732a604c24
commit
71df7d1eb5
|
@ -242,6 +242,11 @@ bool Upkeep::exec()
|
||||||
enforceMaxEvents(shared);
|
enforceMaxEvents(shared);
|
||||||
enforceMaxImages();
|
enforceMaxImages();
|
||||||
|
|
||||||
|
if (shared->evtHist.size() >= MAX_EVTHIST)
|
||||||
|
{
|
||||||
|
shared->evtHist.clear();
|
||||||
|
}
|
||||||
|
|
||||||
genHTMLul(".", shared->camName, shared);
|
genHTMLul(".", shared->camName, shared);
|
||||||
|
|
||||||
genCSS(shared);
|
genCSS(shared);
|
||||||
|
@ -273,6 +278,18 @@ bool EventLoop::exec()
|
||||||
|
|
||||||
vidList += forwardFacingFiles("live", ".ts", event.timeStamp, shared->evMaxSecs / 2);
|
vidList += forwardFacingFiles("live", ".ts", event.timeStamp, shared->evMaxSecs / 2);
|
||||||
|
|
||||||
|
for (auto &&hist : shared->evtHist)
|
||||||
|
{
|
||||||
|
if (vidList.contains(hist))
|
||||||
|
{
|
||||||
|
vidList.removeAll(hist);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!vidList.isEmpty())
|
||||||
|
{
|
||||||
|
shared->evtHist.append(vidList);
|
||||||
|
|
||||||
recLog("attempting write out of event: " + name, shared);
|
recLog("attempting write out of event: " + name, shared);
|
||||||
|
|
||||||
if (wrOutVod(name, vidList))
|
if (wrOutVod(name, vidList))
|
||||||
|
@ -290,6 +307,7 @@ bool EventLoop::exec()
|
||||||
proc.waitForFinished();
|
proc.waitForFinished();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
shared->recList.removeFirst();
|
shared->recList.removeFirst();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#define APP_VER "3.0.t9"
|
#define APP_VER "3.0.t10"
|
||||||
#define APP_NAME "Motion Watch"
|
#define APP_NAME "Motion Watch"
|
||||||
#define APP_BIN "mow"
|
#define APP_BIN "mow"
|
||||||
#define REC_LOG_NAME "rec_log_lines.html"
|
#define REC_LOG_NAME "rec_log_lines.html"
|
||||||
|
@ -37,6 +37,7 @@ using namespace std;
|
||||||
#define DATETIME_FMT "yyyyMMddhhmmss"
|
#define DATETIME_FMT "yyyyMMddhhmmss"
|
||||||
#define STRFTIME_FMT "%Y%m%d%H%M%S"
|
#define STRFTIME_FMT "%Y%m%d%H%M%S"
|
||||||
#define MAX_IMAGES 1000
|
#define MAX_IMAGES 1000
|
||||||
|
#define MAX_EVTHIST 100
|
||||||
|
|
||||||
struct evt_t
|
struct evt_t
|
||||||
{
|
{
|
||||||
|
@ -47,6 +48,7 @@ struct evt_t
|
||||||
struct shared_t
|
struct shared_t
|
||||||
{
|
{
|
||||||
QList<evt_t> recList;
|
QList<evt_t> recList;
|
||||||
|
QStringList evtHist;
|
||||||
QString conf;
|
QString conf;
|
||||||
QString recLog;
|
QString recLog;
|
||||||
QString detLog;
|
QString detLog;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user