JustMotion/src/detect_loop.h
zii 88ea1086f6 v3.6.t1
-all recordings, clips and snapshots are now base on UTC naming
 scheme for easy name prediction for client apps.

-detect loop no longer list dirs for files or monitors for dir
 changes. it will now predict video clip names base on current
 UTC time.
2024-08-04 14:42:13 -04:00

60 lines
1.4 KiB
C++

#ifndef DETECT_LOOP_H
#define DETECT_LOOP_H
// This file is part of JustMotion.
// JustMotion is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// JustMotion is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
#include "common.h"
class DetectLoop : public QObject
{
Q_OBJECT
private:
QString vidAPath;
QString vidBPath;
QString vidAName;
QString vidBName;
QStringList prevClips;
QTimer *pcTimer;
QTimer *evTimer;
QDateTime dTime;
QElapsedTimer eTimer;
evt_t eventQue;
shared_t *shared;
float getFloatFromExe(const QByteArray &line);
QStringList buildArgs(const QString &prev, const QString &next);
private slots:
void init();
void reset();
void pcBreak();
void evBreak();
void exec();
public:
explicit DetectLoop(shared_t *shared, QThread *thr, QObject *parent = nullptr);
QString statusLine();
signals:
void starving();
void loop();
};
#endif // DETECT_LOOP_H