mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Add warning if starting the output fails
This is mainly to give visual feedback to those affected by NVENC not working with older driver versions. Currenlty obs fails silently which could go unnoticed for users who are using hotkeys as well as confuse users who are not trained to read their logs when issues occur. Closes jp9000/obs-studio#788
This commit is contained in:
parent
f83bd9facc
commit
6bc1ecc794
|
@ -111,6 +111,12 @@ ConfirmRemove.Title="Confirm Remove"
|
|||
ConfirmRemove.Text="Are you sure you wish to remove '$1'?"
|
||||
ConfirmRemove.TextMultiple="Are you sure you wish to remove %1 items?"
|
||||
|
||||
# output start messages
|
||||
Output.StartStreamFailed="Failed to start streaming"
|
||||
Output.StartRecordingFailed="Failed to start recording"
|
||||
Output.StartReplayFailed="Failed to start replay buffer"
|
||||
Output.StartFailedGeneric="Starting the output failed. Please check the log for details.\n\nNote: If you are using the NVENC or AMD encoders, make sure your video drivers are up to date."
|
||||
|
||||
# output connect messages
|
||||
Output.ConnectFail.Title="Failed to connect"
|
||||
Output.ConnectFail.BadPath="Invalid Path or Connection URL. Please check your settings to confirm that they are valid."
|
||||
|
|
|
@ -837,8 +837,13 @@ bool SimpleOutput::StartRecording()
|
|||
UpdateRecording();
|
||||
if (!ConfigureRecording(false))
|
||||
return false;
|
||||
if (!obs_output_start(fileOutput))
|
||||
if (!obs_output_start(fileOutput)) {
|
||||
QMessageBox::critical(main,
|
||||
QTStr("Output.StartRecordingFailed"),
|
||||
QTStr("Output.StartFailedGeneric"));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -847,8 +852,13 @@ bool SimpleOutput::StartReplayBuffer()
|
|||
UpdateRecording();
|
||||
if (!ConfigureRecording(true))
|
||||
return false;
|
||||
if (!obs_output_start(replayBuffer))
|
||||
if (!obs_output_start(replayBuffer)) {
|
||||
QMessageBox::critical(main,
|
||||
QTStr("Output.StartReplayFailed"),
|
||||
QTStr("Output.StartFailedGeneric"));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1399,11 +1409,14 @@ bool AdvancedOutput::StartRecording()
|
|||
obs_data_release(settings);
|
||||
}
|
||||
|
||||
if (obs_output_start(fileOutput)) {
|
||||
return true;
|
||||
if (!obs_output_start(fileOutput)) {
|
||||
QMessageBox::critical(main,
|
||||
QTStr("Output.StartRecordingFailed"),
|
||||
QTStr("Output.StartFailedGeneric"));
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void AdvancedOutput::StopStreaming(bool force)
|
||||
|
|
|
@ -3876,6 +3876,11 @@ void OBSBasic::StartStreaming()
|
|||
sysTrayStream->setText(ui->streamButton->text());
|
||||
sysTrayStream->setEnabled(true);
|
||||
}
|
||||
|
||||
QMessageBox::critical(this,
|
||||
QTStr("Output.StartStreamFailed"),
|
||||
QTStr("Output.StartFailedGeneric"));
|
||||
return;
|
||||
}
|
||||
|
||||
bool recordWhenStreaming = config_get_bool(GetGlobalConfig(),
|
||||
|
@ -3887,7 +3892,6 @@ void OBSBasic::StartStreaming()
|
|||
"BasicWindow", "ReplayBufferWhileStreaming");
|
||||
if (replayBufferWhileStreaming)
|
||||
StartReplayBuffer();
|
||||
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
Loading…
Reference in a new issue