54 lines
1.4 KiB
C
54 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 QFileSystemWatcher
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
private:
|
||
|
|
||
|
QString vidAPath;
|
||
|
QString vidBPath;
|
||
|
QString vidAName;
|
||
|
QString vidBName;
|
||
|
QStringList prevClips;
|
||
|
QTimer *pcTimer;
|
||
|
QElapsedTimer eTimer;
|
||
|
evt_t eventQue;
|
||
|
shared_t *shared;
|
||
|
|
||
|
float getFloatFromExe(const QByteArray &line);
|
||
|
QStringList buildArgs(const QString &prev, const QString &next);
|
||
|
QStringList buildSnapArgs(const QString &vidSrc, const QString &imgPath);
|
||
|
|
||
|
private slots:
|
||
|
|
||
|
void init();
|
||
|
void reset();
|
||
|
void pcBreak();
|
||
|
void updated(const QString &path);
|
||
|
|
||
|
public:
|
||
|
|
||
|
explicit DetectLoop(shared_t *shared, QThread *thr, QObject *parent = nullptr);
|
||
|
|
||
|
void exec();
|
||
|
QString statusLine();
|
||
|
};
|
||
|
|
||
|
#endif // DETECT_LOOP_H
|