Got the app up to "not failing immediately" state.

However, for some reason DetectLoop is failing hard via opencv
being unable to open the stream clips.

I'll continue deep diving this. For now everything else works.
This commit is contained in:
Zii 2023-05-17 21:10:39 +00:00
parent 80e6980d9e
commit 40ef014e0f
4 changed files with 9 additions and 4 deletions

View File

@ -321,7 +321,7 @@ DetectLoop::DetectLoop(shared_t *sharedRes, QThread *thr, QObject *parent) : Loo
void DetectLoop::init()
{
thread()->usleep(200);
thread()->sleep(1);
resetTimers(); Loop::init();
}

View File

@ -235,7 +235,7 @@ void MultiInstance::procChanged(QProcess::ProcessState newState)
int MultiInstance::start(const QStringList &args)
{
auto ret = ENOENT;
auto path = getParam("-d", args);
auto path = QDir().cleanPath(getParam("-d", args));
auto files = lsFilesInDir(path);
if (!QDir(path).exists())
@ -248,13 +248,15 @@ int MultiInstance::start(const QStringList &args)
}
else
{
ret = 0;
for (auto &&conf : files)
{
auto proc = new QProcess(this);
QStringList subArgs;
subArgs << "-c" << conf;
subArgs << "-c" << path + "/" + conf;
connect(proc, &QProcess::readyReadStandardOutput, this, &MultiInstance::instStdout);
connect(proc, &QProcess::readyReadStandardError, this, &MultiInstance::instStderr);

View File

@ -26,11 +26,12 @@
#include <opencv4/opencv2/opencv.hpp>
#include <opencv4/opencv2/videoio.hpp>
#include <opencv2/core/utils/logger.hpp>
using namespace cv;
using namespace std;
#define APP_VER "3.0.t2"
#define APP_VER "3.0.t3"
#define APP_NAME "Motion Watch"
#define APP_BIN "mow"
#define REC_LOG_NAME "rec_log_lines.html"

View File

@ -20,6 +20,8 @@ int main(int argc, char** argv)
QCoreApplication::setApplicationName(APP_NAME);
QCoreApplication::setApplicationVersion(APP_VER);
cv::utils::logging::setLogLevel(cv::utils::logging::LogLevel::LOG_LEVEL_DEBUG);
auto args = QCoreApplication::arguments();
auto ret = 0;