eventhandler, utils: Implement missing output states

This commit is contained in:
tt2468 2022-11-17 22:53:15 -08:00
parent 23f883d906
commit 323b5d0b5d
2 changed files with 5 additions and 0 deletions

View File

@ -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:

View File

@ -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"},
})