From 6cb8eef96d7a8f65be776689824fd1286126d65f Mon Sep 17 00:00:00 2001 From: Dominik Nakamura Date: Fri, 19 Nov 2021 15:24:00 +0900 Subject: [PATCH] Events: Add events for record pause and resume --- src/eventhandler/EventHandler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/eventhandler/EventHandler.cpp b/src/eventhandler/EventHandler.cpp index 42d08b6c..1077d63c 100644 --- a/src/eventhandler/EventHandler.cpp +++ b/src/eventhandler/EventHandler.cpp @@ -132,7 +132,7 @@ void EventHandler::ConnectSourceSignals(obs_source_t *source) // Applies to inpu signal_handler_connect(sh, "item_transform", HandleSceneItemTransformChanged, this); } } - + void EventHandler::DisconnectSourceSignals(obs_source_t *source) { if (!source) @@ -300,6 +300,12 @@ void EventHandler::OnFrontendEvent(enum obs_frontend_event event, void *private_ case OBS_FRONTEND_EVENT_RECORDING_STOPPED: eventHandler->HandleRecordStateChanged(OBS_WEBSOCKET_OUTPUT_STOPPED); break; + case OBS_FRONTEND_EVENT_RECORDING_PAUSED: + eventHandler->HandleRecordStateChanged(OBS_WEBSOCKET_OUTPUT_PAUSED); + break; + case OBS_FRONTEND_EVENT_RECORDING_UNPAUSED: + eventHandler->HandleRecordStateChanged(OBS_WEBSOCKET_OUTPUT_RESUMED); + break; case OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTING: eventHandler->HandleReplayBufferStateChanged(OBS_WEBSOCKET_OUTPUT_STARTING); break;