From 791fc5eae9e208918a853c49a66df4f00693b0e9 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 5 Apr 2017 10:41:45 +0200 Subject: [PATCH] Added a define for live stream latency --- lib/defines.h | 3 +++ src/input/input.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/defines.h b/lib/defines.h index ee864ecf..c15c6f2a 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -121,6 +121,9 @@ static inline void show_stackframe(){} /// Does not affect live streams. #define FLIP_MIN_DURATION 20000 +/// Interval where the input refreshes the user data for stats etc. +#define INPUT_USER_INTERVAL 1000 + #define SHM_STREAM_INDEX "MstSTRM%s" //%s stream name #define SHM_STREAM_STATE "MstSTATE%s" //%s stream name #define STRMSTAT_OFF 0 diff --git a/src/input/input.cpp b/src/input/input.cpp index 90a37054..19d9c2be 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -309,7 +309,7 @@ namespace Mist { INSANE_MSG("Connected: %d users, %d total", userPage.connectedUsers, userPage.amount); //if not shutting down, wait 1 second before looping if (config->is_active){ - Util::wait(1000); + Util::wait(INPUT_USER_INTERVAL); } } if (streamStatus){streamStatus.mapped[0] = STRMSTAT_SHUTDOWN;}