diff --git a/lib/defines.h b/lib/defines.h index 9003febb..1ed85b59 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -93,6 +93,7 @@ static inline void show_stackframe(){} #define SHM_DATASIZE 20 #endif +#define AUDIO_KEY_INTERVAL 5000 ///< This define controls the keyframe interval for non-video tracks, such as audio and metadata tracks. #ifndef STATS_DELAY #define STATS_DELAY 15 @@ -120,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/lib/dtscmeta.cpp b/lib/dtscmeta.cpp index f375f4ec..449526f3 100644 --- a/lib/dtscmeta.cpp +++ b/lib/dtscmeta.cpp @@ -6,8 +6,6 @@ #include #include -#define AUDIO_KEY_INTERVAL 5000 ///< This define controls the keyframe interval for non-video tracks, such as audio and metadata tracks. - namespace DTSC { /// Default constructor for packets - sets a null pointer and invalid packet. Packet::Packet() { diff --git a/src/input/input.cpp b/src/input/input.cpp index 9b579d72..b5991fe0 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -451,7 +451,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;} diff --git a/src/io.cpp b/src/io.cpp index c0026bf6..54e0c7be 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -518,7 +518,7 @@ namespace Mist { isKeyframe = true; } else { unsigned long lastKey = pagesByTrack[tid].rbegin()->second.lastKeyTime; - if (packet.getTime() - lastKey > 5000) { + if (packet.getTime() - lastKey > AUDIO_KEY_INTERVAL) { isKeyframe = true; } }