UI: Avoid auto config selecting QSV on linux

Previously we left the QSV -> x264 in the fallback function to deal with
the autoconfig wizard possibly selecting QSV outside of the UI. But this
actually runs for both recording and streaming every time obs starts,
reseting user's config if they selected QSV for recording.

Instead avoid recording from being selected in the UI and by the
auto-config wizard, and revert changes to the fallback function.
This commit is contained in:
Kurt Kartaltepe 2023-07-26 21:14:07 -07:00 committed by Lain
parent 38d10934ee
commit 6034aa4164
2 changed files with 10 additions and 2 deletions

View file

@ -954,6 +954,16 @@ void AutoConfigTestPage::TestStreamEncoderThread()
wiz->streamingEncoder = AutoConfig::Encoder::x264;
}
#ifdef __linux__
// On linux CBR rate control is not guaranteed so fallback to x264.
if (wiz->streamingEncoder == AutoConfig::Encoder::QSV) {
wiz->streamingEncoder = AutoConfig::Encoder::x264;
if (!TestSoftwareEncoding()) {
return;
}
}
#endif
if (preferHardware && !softwareTested && wiz->hardwareEncodingAvailable)
FindIdealHardwareResolution();

View file

@ -839,12 +839,10 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
while (obs_enum_encoder_types(idx++, &id)) {
if (strcmp(id, "amd_amf_h264") == 0)
amd_supported = true;
#ifdef _WIN32
else if (strcmp(id, "obs_qsv11") == 0)
qsv_supported = true;
else if (strcmp(id, "obs_qsv11_av1") == 0)
qsv_av1_supported = true;
#endif
else if (strcmp(id, "ffmpeg_nvenc") == 0)
nve_supported = true;
#ifdef ENABLE_HEVC