From 4300651a526cbbb0df00cd71d3d2cf846825324e Mon Sep 17 00:00:00 2001 From: Zii Date: Wed, 14 Jun 2023 20:57:18 -0400 Subject: [PATCH] v3.0.t19 -the ffmpeg auto refresh logic is working, just need to shorten the frequency by setting recloop's heartbeat to default. -added hls flag "omit_endlist" so the auto refresh doesn't cut off the stream at the web browser end. --- src/camera.cpp | 7 +++---- src/common.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/camera.cpp b/src/camera.cpp index 2399cd2..ad8bcaf 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -107,9 +107,8 @@ bool Loop::exec() RecLoop::RecLoop(shared_t *sharedRes, QThread *thr, QObject *parent) : Loop(sharedRes, thr, parent) { - recProc = 0; - imgProc = 0; - heartBeat = 1800; + recProc = 0; + imgProc = 0; } void RecLoop::init() @@ -139,7 +138,7 @@ void RecLoop::updateCmd() recArgs << "-f" << "hls"; recArgs << "-hls_time" << "2"; recArgs << "-hls_list_size" << "1000"; - recArgs << "-hls_flags" << "append_list"; + recArgs << "-hls_flags" << "append_list+omit_endlist"; recArgs << "-rtsp_transport" << "tcp"; recArgs << "-stimeout" << "3000"; recArgs << "-t" << QString::number(heartBeat); diff --git a/src/common.h b/src/common.h index 888a94d..85329ab 100644 --- a/src/common.h +++ b/src/common.h @@ -29,7 +29,7 @@ using namespace std; -#define APP_VER "3.0.t18" +#define APP_VER "3.0.t19" #define APP_NAME "Motion Watch" #define APP_BIN "mow" #define REC_LOG_NAME "rec_log_lines.html"