- removed -r command line option and renamed it to -s. then added -l as what -s used to be. - added detect_uri option to camera parameters so stream snapshots can now run a secondary stream that differs from the recording stream. also added sync logic so the recording loop and detection loop will run synchronously while still running in seperate threads. - live_secs renamed to live_mins. the amount of live footage to buffer in buffer_path is now based on minutes instead of seconds. - added live_clip_secs parameter so the amount of seconds each hls video clip should have is now adjustable. - remove max_event_secs. events are now transfered to rec_path based on minute increments. - added sec_per_image to make the amount of seconds between stream snapshots pulled from detect_uri adjustable. - added img_ext so the image snapshot format from detect_uri and then ultimately to img_comp_cmd can now be configured instead of being hardcoded to bmp. - added gray_image as a boolean parameter so the snapshots from detect_uri can be pulled in grayscale format or remain in color if desired. - removed img_scale since this parameter was not doing anything. overview: use of QFileSystemWatcher on the detection loop has been eliminated and thus eliminated use of functions such as listFacingFiles(), backwardFacingFiles() and forwardFacingFiles(). Instead, the detection and recording loops will now run synchronously and use predictable up-to-the-minute file naming scheme. client v1.1: - the build script will now include all imageformat plugins from the QT lib directory, adding support for jpg, svg, ico and gif image formats. - switched to 2 number versioning. - this client app will now support the server's new up-to-the-minute directory structure for live and recorded footage. - the version number is now be displayed on the main interface.
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
#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();
|
|
void mkdirs();
|
|
|
|
private:
|
|
|
|
shared_t *shared;
|
|
QTimer *checkTimer;
|
|
QTimer *mkdirTimer;
|
|
bool sync;
|
|
|
|
QString camCmdFromConf();
|
|
QString nearest15mins(QString &sec);
|
|
|
|
public slots:
|
|
|
|
void restart();
|
|
void synced();
|
|
|
|
public:
|
|
|
|
explicit RecordLoop(shared_t *shared, QThread *thr, QObject *parent = nullptr);
|
|
|
|
~RecordLoop();
|
|
|
|
QString statusLine();
|
|
};
|
|
|
|
#endif // RECORD_LOOP_H
|