v3.3.t7
-detect loop will now use the previous video clip as a base for the next 3 video clips. doing this prevents the same clips from being processed multiple times.
This commit is contained in:
parent
5b444fd754
commit
da941d8d18
|
@ -167,9 +167,6 @@ void DetectLoop::init()
|
||||||
|
|
||||||
void DetectLoop::reset()
|
void DetectLoop::reset()
|
||||||
{
|
{
|
||||||
vidAPath.clear();
|
|
||||||
vidBPath.clear();
|
|
||||||
|
|
||||||
eventQue.inQue = false;
|
eventQue.inQue = false;
|
||||||
eventQue.score = 0;
|
eventQue.score = 0;
|
||||||
eventQue.queAge = 0;
|
eventQue.queAge = 0;
|
||||||
|
@ -182,15 +179,19 @@ void DetectLoop::reset()
|
||||||
void DetectLoop::updated(const QString &path)
|
void DetectLoop::updated(const QString &path)
|
||||||
{
|
{
|
||||||
auto clips = lsFilesInDir(path, shared->streamExt);
|
auto clips = lsFilesInDir(path, shared->streamExt);
|
||||||
|
auto index = clips.indexOf(vidBName);
|
||||||
|
|
||||||
if (clips.size() < 3)
|
if (clips.size() - (index + 1) < 3)
|
||||||
{
|
{
|
||||||
thread()->sleep(5); reset();
|
thread()->sleep(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vidAPath = shared->buffPath + "/live/" + clips[clips.size() - 3];
|
vidAName = clips[clips.size() - 3];
|
||||||
vidBPath = shared->buffPath + "/live/" + clips[clips.size() - 2];
|
vidBName = clips[clips.size() - 2];
|
||||||
|
|
||||||
|
vidAPath = shared->buffPath + "/live/" + vidAName;
|
||||||
|
vidBPath = shared->buffPath + "/live/" + vidBName;
|
||||||
|
|
||||||
exec(); thread()->sleep(1);
|
exec(); thread()->sleep(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,8 @@ private:
|
||||||
|
|
||||||
QString vidAPath;
|
QString vidAPath;
|
||||||
QString vidBPath;
|
QString vidBPath;
|
||||||
|
QString vidAName;
|
||||||
|
QString vidBName;
|
||||||
QStringList prevClips;
|
QStringList prevClips;
|
||||||
QTimer *pcTimer;
|
QTimer *pcTimer;
|
||||||
evt_t eventQue;
|
evt_t eventQue;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#define APP_VER "3.3.t6"
|
#define APP_VER "3.3.t7"
|
||||||
#define APP_NAME "Motion Watch"
|
#define APP_NAME "Motion Watch"
|
||||||
#define APP_BIN "mow"
|
#define APP_BIN "mow"
|
||||||
#define DATETIME_FMT "yyyyMMddhhmmss"
|
#define DATETIME_FMT "yyyyMMddhhmmss"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user