mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-01 21:07:12 -05:00
UI: Add pause support
Adds support for pausing recordings. When settings are eligible for recordings, a pause button will appear next to the recording button. If the settings are not eligible, it will warn the user in the output settings that they cannot pause recordings if those settings are used.
This commit is contained in:
@@ -21,6 +21,7 @@ void EnumSceneCollections(function<bool(const char *, const char *)> &&cb);
|
||||
|
||||
extern volatile bool streaming_active;
|
||||
extern volatile bool recording_active;
|
||||
extern volatile bool recording_paused;
|
||||
extern volatile bool replaybuf_active;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@@ -265,6 +266,17 @@ struct OBSStudioAPI : obs_frontend_callbacks {
|
||||
return os_atomic_load_bool(&recording_active);
|
||||
}
|
||||
|
||||
void obs_frontend_recording_pause(bool pause) override
|
||||
{
|
||||
QMetaObject::invokeMethod(main, pause ? "PauseRecording"
|
||||
: "UnpauseRecording");
|
||||
}
|
||||
|
||||
bool obs_frontend_recording_paused(void) override
|
||||
{
|
||||
return os_atomic_load_bool(&recording_paused);
|
||||
}
|
||||
|
||||
void obs_frontend_replay_buffer_start(void) override
|
||||
{
|
||||
QMetaObject::invokeMethod(main, "StartReplayBuffer");
|
||||
|
||||
Reference in New Issue
Block a user