v3.3.t6
-detectloop now operates on a minimum of 3 clips and then grabs only the second and third to last clips. this insures only finished clips from the stream are grabbed.
This commit is contained in:
parent
4f0c37b92b
commit
5b444fd754
|
@ -183,35 +183,23 @@ void DetectLoop::updated(const QString &path)
|
|||
{
|
||||
auto clips = lsFilesInDir(path, shared->streamExt);
|
||||
|
||||
if (clips.isEmpty())
|
||||
if (clips.size() < 3)
|
||||
{
|
||||
thread()->sleep(5); reset();
|
||||
}
|
||||
else
|
||||
{
|
||||
auto latestPath = path + "/" + clips.last();
|
||||
vidAPath = shared->buffPath + "/live/" + clips[clips.size() - 3];
|
||||
vidBPath = shared->buffPath + "/live/" + clips[clips.size() - 2];
|
||||
|
||||
if (vidAPath.isEmpty())
|
||||
{
|
||||
vidAPath = latestPath;
|
||||
}
|
||||
else if (latestPath == vidAPath)
|
||||
{
|
||||
thread()->usleep(500);
|
||||
}
|
||||
else
|
||||
{
|
||||
vidBPath = latestPath;
|
||||
|
||||
thread()->sleep(1);
|
||||
|
||||
exec();
|
||||
}
|
||||
exec(); thread()->sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
void DetectLoop::pcBreak()
|
||||
{
|
||||
prevClips.clear();
|
||||
|
||||
if (!shared->postCmd.isEmpty())
|
||||
{
|
||||
QTextStream(stdout) << "---POST_BREAK---" << Qt::endl;
|
||||
|
@ -370,12 +358,6 @@ void DetectLoop::exec()
|
|||
eventQue.vidList.append(vidBPath);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QTextStream(stdout) << "why?" << Qt::endl;
|
||||
QTextStream(stdout) << "imgAPath: " << imgAPath << Qt::endl;
|
||||
QTextStream(stdout) << "imgBPath: " << imgBPath << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
vidAPath.clear();
|
||||
|
|
|
@ -62,6 +62,7 @@ private:
|
|||
|
||||
QString vidAPath;
|
||||
QString vidBPath;
|
||||
QStringList prevClips;
|
||||
QTimer *pcTimer;
|
||||
evt_t eventQue;
|
||||
shared_t *shared;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
#define APP_VER "3.3.t5"
|
||||
#define APP_VER "3.3.t6"
|
||||
#define APP_NAME "Motion Watch"
|
||||
#define APP_BIN "mow"
|
||||
#define DATETIME_FMT "yyyyMMddhhmmss"
|
||||
|
|
Loading…
Reference in New Issue
Block a user