UI: Add function to enable/disable outputs
parent
d1329d1798
commit
b850bc6415
|
@ -3881,6 +3881,8 @@ void OBSBasic::StartStreaming()
|
|||
{
|
||||
if (outputHandler->StreamingActive())
|
||||
return;
|
||||
if (!enableOutputs)
|
||||
return;
|
||||
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_STREAMING_STARTING);
|
||||
|
@ -4158,6 +4160,8 @@ void OBSBasic::StartRecording()
|
|||
{
|
||||
if (outputHandler->RecordingActive())
|
||||
return;
|
||||
if (!enableOutputs)
|
||||
return;
|
||||
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_RECORDING_STARTING);
|
||||
|
@ -4258,6 +4262,8 @@ void OBSBasic::StartReplayBuffer()
|
|||
return;
|
||||
if (outputHandler->ReplayBufferActive())
|
||||
return;
|
||||
if (!enableOutputs)
|
||||
return;
|
||||
|
||||
obs_output_t *output = outputHandler->replayBuffer;
|
||||
obs_data_t *hotkeys = obs_hotkeys_save_output(output);
|
||||
|
|
|
@ -314,6 +314,8 @@ private:
|
|||
int programCX = 0, programCY = 0;
|
||||
float programScale = 0.0f;
|
||||
|
||||
bool enableOutputs = true;
|
||||
|
||||
inline bool IsPreviewProgramMode() const
|
||||
{
|
||||
return os_atomic_load_bool(&previewProgramMode);
|
||||
|
@ -493,6 +495,11 @@ public:
|
|||
void SaveService();
|
||||
bool LoadService();
|
||||
|
||||
inline void EnableOutputs(bool enable)
|
||||
{
|
||||
enableOutputs = enable;
|
||||
}
|
||||
|
||||
void ReorderSceneItem(obs_sceneitem_t *item, size_t idx);
|
||||
|
||||
QMenu *AddDeinterlacingMenu(obs_source_t *source);
|
||||
|
|
Loading…
Reference in New Issue