UI: Show "stopping" text on buttons when waiting for stop
The new cutoff timing fix means that streaming/recording has to remain active for bit until the stream/recording has reached the expecting stop timestamp. This means that the buttons would continue to say "Stop streaming/recording" while waiting for the output to stop itself at the appropriate timing. So instead of letting it do that and confusing the user, the buttons will now say "stopping" when the button is pressed to indicate to the user that the stream/recording is in the process of stopping.master
parent
1bfa48ce42
commit
4a3804518d
|
@ -293,7 +293,9 @@ Basic.Main.Connecting="Connecting..."
|
|||
Basic.Main.StartRecording="Start Recording"
|
||||
Basic.Main.StartStreaming="Start Streaming"
|
||||
Basic.Main.StopRecording="Stop Recording"
|
||||
Basic.Main.StoppingRecording="Stopping Recording..."
|
||||
Basic.Main.StopStreaming="Stop Streaming"
|
||||
Basic.Main.StoppingStreaming="Stopping Stream..."
|
||||
Basic.Main.ForceStopStreaming="Stop Streaming (discard delay)"
|
||||
|
||||
# basic mode file menu
|
||||
|
|
|
@ -27,10 +27,10 @@ static void OBSStreamStopping(void *data, calldata_t *params)
|
|||
|
||||
int sec = (int)obs_output_get_active_delay(obj);
|
||||
if (sec == 0)
|
||||
return;
|
||||
|
||||
QMetaObject::invokeMethod(output->main,
|
||||
"StreamDelayStopping", Q_ARG(int, sec));
|
||||
QMetaObject::invokeMethod(output->main, "StreamStopping");
|
||||
else
|
||||
QMetaObject::invokeMethod(output->main,
|
||||
"StreamDelayStopping", Q_ARG(int, sec));
|
||||
}
|
||||
|
||||
static void OBSStartStreaming(void *data, calldata_t *params)
|
||||
|
@ -75,6 +75,14 @@ static void OBSStopRecording(void *data, calldata_t *params)
|
|||
UNUSED_PARAMETER(params);
|
||||
}
|
||||
|
||||
static void OBSRecordStopping(void *data, calldata_t *params)
|
||||
{
|
||||
BasicOutputHandler *output = static_cast<BasicOutputHandler*>(data);
|
||||
QMetaObject::invokeMethod(output->main, "RecordStopping");
|
||||
|
||||
UNUSED_PARAMETER(params);
|
||||
}
|
||||
|
||||
static void FindBestFilename(string &strPath, bool noSpace)
|
||||
{
|
||||
int num = 2;
|
||||
|
@ -281,7 +289,7 @@ SimpleOutput::SimpleOutput(OBSBasic *main_) : BasicOutputHandler(main_)
|
|||
|
||||
streamDelayStarting.Connect(obs_output_get_signal_handler(streamOutput),
|
||||
"starting", OBSStreamStarting, this);
|
||||
streamDelayStopping.Connect(obs_output_get_signal_handler(streamOutput),
|
||||
streamStopping.Connect(obs_output_get_signal_handler(streamOutput),
|
||||
"stopping", OBSStreamStopping, this);
|
||||
|
||||
startStreaming.Connect(obs_output_get_signal_handler(streamOutput),
|
||||
|
@ -304,6 +312,8 @@ SimpleOutput::SimpleOutput(OBSBasic *main_) : BasicOutputHandler(main_)
|
|||
"start", OBSStartRecording, this);
|
||||
stopRecording.Connect(obs_output_get_signal_handler(fileOutput),
|
||||
"stop", OBSStopRecording, this);
|
||||
recordStopping.Connect(obs_output_get_signal_handler(fileOutput),
|
||||
"stopping", OBSRecordStopping, this);
|
||||
}
|
||||
|
||||
int SimpleOutput::GetAudioBitrate() const
|
||||
|
@ -762,7 +772,7 @@ AdvancedOutput::AdvancedOutput(OBSBasic *main_) : BasicOutputHandler(main_)
|
|||
|
||||
streamDelayStarting.Connect(obs_output_get_signal_handler(streamOutput),
|
||||
"starting", OBSStreamStarting, this);
|
||||
streamDelayStopping.Connect(obs_output_get_signal_handler(streamOutput),
|
||||
streamStopping.Connect(obs_output_get_signal_handler(streamOutput),
|
||||
"stopping", OBSStreamStopping, this);
|
||||
|
||||
startStreaming.Connect(obs_output_get_signal_handler(streamOutput),
|
||||
|
@ -774,6 +784,8 @@ AdvancedOutput::AdvancedOutput(OBSBasic *main_) : BasicOutputHandler(main_)
|
|||
"start", OBSStartRecording, this);
|
||||
stopRecording.Connect(obs_output_get_signal_handler(fileOutput),
|
||||
"stop", OBSStopRecording, this);
|
||||
recordStopping.Connect(obs_output_get_signal_handler(fileOutput),
|
||||
"stopping", OBSRecordStopping, this);
|
||||
}
|
||||
|
||||
void AdvancedOutput::UpdateStreamSettings()
|
||||
|
|
|
@ -15,7 +15,8 @@ struct BasicOutputHandler {
|
|||
OBSSignal startStreaming;
|
||||
OBSSignal stopStreaming;
|
||||
OBSSignal streamDelayStarting;
|
||||
OBSSignal streamDelayStopping;
|
||||
OBSSignal streamStopping;
|
||||
OBSSignal recordStopping;
|
||||
|
||||
inline BasicOutputHandler(OBSBasic *main_) : main(main_) {}
|
||||
|
||||
|
|
|
@ -3422,6 +3422,11 @@ void OBSBasic::StreamingStart()
|
|||
blog(LOG_INFO, STREAMING_START);
|
||||
}
|
||||
|
||||
void OBSBasic::StreamStopping()
|
||||
{
|
||||
ui->streamButton->setText(QTStr("Basic.Main.StoppingStreaming"));
|
||||
}
|
||||
|
||||
void OBSBasic::StreamingStop(int code)
|
||||
{
|
||||
const char *errorMessage;
|
||||
|
@ -3482,6 +3487,11 @@ void OBSBasic::StartRecording()
|
|||
outputHandler->StartRecording();
|
||||
}
|
||||
|
||||
void OBSBasic::RecordStopping()
|
||||
{
|
||||
ui->recordButton->setText(QTStr("Basic.Main.StoppingRecording"));
|
||||
}
|
||||
|
||||
void OBSBasic::StopRecording()
|
||||
{
|
||||
SaveProject();
|
||||
|
|
|
@ -289,12 +289,14 @@ public slots:
|
|||
void StreamDelayStopping(int sec);
|
||||
|
||||
void StreamingStart();
|
||||
void StreamStopping();
|
||||
void StreamingStop(int errorcode);
|
||||
|
||||
void StartRecording();
|
||||
void StopRecording();
|
||||
|
||||
void RecordingStart();
|
||||
void RecordStopping();
|
||||
void RecordingStop(int code);
|
||||
|
||||
void SaveProjectDeferred();
|
||||
|
|
Loading…
Reference in New Issue