UI: Add ability to forcibly stop streams/recordings
If the user hits the "stop stream" button it'll transition in to "stopping stream..." and will continue to output until the stream reaches the timing in which "stop" was pressed. However, if there is significant congestion, stopping the stream can take far longer than the user may like. So there needs to be an option to forcibly stop the stream in that case; pushing the "stop" button a second time should allow the user to tell the stream/recording to stop right away instead of waiting for the precise stop timing.
This commit is contained in:
parent
50d7cc8ae6
commit
5c5d0ba9e5
4 changed files with 35 additions and 30 deletions
|
|
@ -3642,7 +3642,7 @@ void OBSBasic::StopStreaming()
|
|||
SaveProject();
|
||||
|
||||
if (outputHandler->StreamingActive())
|
||||
outputHandler->StopStreaming();
|
||||
outputHandler->StopStreaming(streamingStopping);
|
||||
|
||||
OnDeactivate();
|
||||
|
||||
|
|
@ -3659,7 +3659,7 @@ void OBSBasic::ForceStopStreaming()
|
|||
SaveProject();
|
||||
|
||||
if (outputHandler->StreamingActive())
|
||||
outputHandler->ForceStopStreaming();
|
||||
outputHandler->StopStreaming(true);
|
||||
|
||||
OnDeactivate();
|
||||
|
||||
|
|
@ -3734,6 +3734,7 @@ void OBSBasic::StreamStopping()
|
|||
ui->streamButton->setText(QTStr("Basic.Main.StoppingStreaming"));
|
||||
sysTrayStream->setText(ui->streamButton->text());
|
||||
|
||||
streamingStopping = true;
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_STREAMING_STOPPING);
|
||||
}
|
||||
|
|
@ -3773,6 +3774,7 @@ void OBSBasic::StreamingStop(int code)
|
|||
sysTrayStream->setText(ui->streamButton->text());
|
||||
sysTrayStream->setEnabled(true);
|
||||
|
||||
streamingStopping = false;
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_STREAMING_STOPPED);
|
||||
|
||||
|
|
@ -3812,6 +3814,7 @@ void OBSBasic::RecordStopping()
|
|||
ui->recordButton->setText(QTStr("Basic.Main.StoppingRecording"));
|
||||
sysTrayRecord->setText(ui->recordButton->text());
|
||||
|
||||
recordingStopping = true;
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_RECORDING_STOPPING);
|
||||
}
|
||||
|
|
@ -3821,7 +3824,7 @@ void OBSBasic::StopRecording()
|
|||
SaveProject();
|
||||
|
||||
if (outputHandler->RecordingActive())
|
||||
outputHandler->StopRecording();
|
||||
outputHandler->StopRecording(recordingStopping);
|
||||
|
||||
OnDeactivate();
|
||||
}
|
||||
|
|
@ -3832,6 +3835,7 @@ void OBSBasic::RecordingStart()
|
|||
ui->recordButton->setText(QTStr("Basic.Main.StopRecording"));
|
||||
sysTrayRecord->setText(ui->recordButton->text());
|
||||
|
||||
recordingStopping = false;
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_RECORDING_STARTED);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue