Skip to content

Commit

Permalink
UI: Add replay buffer saved event to the frontend api (obsproject#3592)
Browse files Browse the repository at this point in the history
* obs-frontend-api: add the event of saving replay buffer

Add OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED as given by RFC 33

* UI: Emit the replay buffer saved event to the api

Send the OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED to api (as in rfc33)

* docs/sphinx: Add replay buffer saved event

Documentation provided for OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED (RFC33)
  • Loading branch information
hgonomeg authored Oct 11, 2020
1 parent a94c0e0 commit d3ec3e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions UI/obs-frontend-api/obs-frontend-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ enum obs_frontend_event {
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTED,
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPING,
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPED,
OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED,

OBS_FRONTEND_EVENT_STUDIO_MODE_ENABLED,
OBS_FRONTEND_EVENT_STUDIO_MODE_DISABLED,
Expand Down
2 changes: 2 additions & 0 deletions UI/window-basic-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6141,6 +6141,8 @@ void OBSBasic::ReplayBufferSave()
obs_output_get_proc_handler(outputHandler->replayBuffer);
proc_handler_call(ph, "save", &cd);
calldata_free(&cd);
if (api)
api->on_event(OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED);
}

void OBSBasic::ReplayBufferStop(int code)
Expand Down
4 changes: 4 additions & 0 deletions docs/sphinx/reference-frontend-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ Structures/Enumerations

Triggered when the replay buffer has fully stopped.

- **OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED**

Triggered when the replay buffer has been saved.

- **OBS_FRONTEND_EVENT_STUDIO_MODE_ENABLED**

Triggered when the user has turned on studio mode.
Expand Down

0 comments on commit d3ec3e9

Please sign in to comment.