diff --git a/docs/sphinx/reference-frontend-api.rst b/docs/sphinx/reference-frontend-api.rst index 6ef7854d1..b4983669b 100644 --- a/docs/sphinx/reference-frontend-api.rst +++ b/docs/sphinx/reference-frontend-api.rst @@ -150,6 +150,10 @@ Structures/Enumerations Triggered when the replay buffer has fully stopped. + - **OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVING** + + Triggered when the replay buffer is saving. + - **OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED** Triggered when the replay buffer has been saved. diff --git a/frontend/api/obs-frontend-api.h b/frontend/api/obs-frontend-api.h index 46713fbcb..c6648d28f 100644 --- a/frontend/api/obs-frontend-api.h +++ b/frontend/api/obs-frontend-api.h @@ -65,6 +65,8 @@ enum obs_frontend_event { OBS_FRONTEND_EVENT_CANVAS_ADDED, OBS_FRONTEND_EVENT_CANVAS_REMOVED, + + OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVING, }; /* ------------------------------------------------------------------------- */ diff --git a/frontend/widgets/OBSBasic_ReplayBuffer.cpp b/frontend/widgets/OBSBasic_ReplayBuffer.cpp index bfd339bd8..cfd06073e 100644 --- a/frontend/widgets/OBSBasic_ReplayBuffer.cpp +++ b/frontend/widgets/OBSBasic_ReplayBuffer.cpp @@ -160,6 +160,8 @@ void OBSBasic::ReplayBufferSave() return; } + OnEvent(OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVING); + calldata_t cd = {0}; proc_handler_t *ph = obs_output_get_proc_handler(outputHandler->replayBuffer); proc_handler_call(ph, "save", &cd);