2025-06-26 12:06:41 -04:00
|
|
|
#ifndef RECORD_LOOP_H
|
|
|
|
#define RECORD_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 RecordLoop : public QProcess
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void init();
|
|
|
|
void resetTime();
|
2025-10-11 08:05:51 -04:00
|
|
|
void mkdirs();
|
2025-06-26 12:06:41 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
shared_t *shared;
|
|
|
|
QTimer *checkTimer;
|
2025-10-11 08:05:51 -04:00
|
|
|
QTimer *mkdirTimer;
|
|
|
|
bool sync;
|
2025-06-26 12:06:41 -04:00
|
|
|
|
|
|
|
QString camCmdFromConf();
|
2025-10-11 08:05:51 -04:00
|
|
|
QString nearest15mins(QString &sec);
|
2025-06-26 12:06:41 -04:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void restart();
|
2025-10-11 08:05:51 -04:00
|
|
|
void synced();
|
2025-06-26 12:06:41 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
explicit RecordLoop(shared_t *shared, QThread *thr, QObject *parent = nullptr);
|
|
|
|
|
|
|
|
~RecordLoop();
|
|
|
|
|
|
|
|
QString statusLine();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RECORD_LOOP_H
|