#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