From 323b5d0b5dcb2d8f2a7850e19bccb9d1b866f285 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Thu, 17 Nov 2022 22:53:15 -0800 Subject: [PATCH] eventhandler, utils: Implement missing output states --- src/eventhandler/EventHandler_Outputs.cpp | 2 ++ src/utils/Obs.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/eventhandler/EventHandler_Outputs.cpp b/src/eventhandler/EventHandler_Outputs.cpp index c8a43e35..186ebaf2 100644 --- a/src/eventhandler/EventHandler_Outputs.cpp +++ b/src/eventhandler/EventHandler_Outputs.cpp @@ -24,10 +24,12 @@ static bool GetOutputStateActive(ObsOutputState state) switch (state) { case OBS_WEBSOCKET_OUTPUT_STARTED: case OBS_WEBSOCKET_OUTPUT_RESUMED: + case OBS_WEBSOCKET_OUTPUT_RECONNECTED: return true; case OBS_WEBSOCKET_OUTPUT_STARTING: case OBS_WEBSOCKET_OUTPUT_STOPPING: case OBS_WEBSOCKET_OUTPUT_STOPPED: + case OBS_WEBSOCKET_OUTPUT_RECONNECTING: case OBS_WEBSOCKET_OUTPUT_PAUSED: return false; default: diff --git a/src/utils/Obs.h b/src/utils/Obs.h index af08eaa5..ea54b0ac 100644 --- a/src/utils/Obs.h +++ b/src/utils/Obs.h @@ -73,6 +73,7 @@ enum ObsOutputState { OBS_WEBSOCKET_OUTPUT_STOPPING, OBS_WEBSOCKET_OUTPUT_STOPPED, OBS_WEBSOCKET_OUTPUT_RECONNECTING, + OBS_WEBSOCKET_OUTPUT_RECONNECTED, OBS_WEBSOCKET_OUTPUT_PAUSED, OBS_WEBSOCKET_OUTPUT_RESUMED, }; @@ -83,6 +84,8 @@ NLOHMANN_JSON_SERIALIZE_ENUM(ObsOutputState, { {OBS_WEBSOCKET_OUTPUT_STARTED, "OBS_WEBSOCKET_OUTPUT_STARTED"}, {OBS_WEBSOCKET_OUTPUT_STOPPING, "OBS_WEBSOCKET_OUTPUT_STOPPING"}, {OBS_WEBSOCKET_OUTPUT_STOPPED, "OBS_WEBSOCKET_OUTPUT_STOPPED"}, + {OBS_WEBSOCKET_OUTPUT_RECONNECTING, "OBS_WEBSOCKET_OUTPUT_RECONNECTING"}, + {OBS_WEBSOCKET_OUTPUT_RECONNECTED, "OBS_WEBSOCKET_OUTPUT_RECONNECTED"}, {OBS_WEBSOCKET_OUTPUT_PAUSED, "OBS_WEBSOCKET_OUTPUT_PAUSED"}, {OBS_WEBSOCKET_OUTPUT_RESUMED, "OBS_WEBSOCKET_OUTPUT_RESUMED"}, })