浏览代码

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.
Kurt Kartaltepe 2 年之前
父节点
当前提交
6034aa4164
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 10 0
      UI/window-basic-auto-config-test.cpp
  2. 0 2
      UI/window-basic-main-profiles.cpp

+ 10 - 0
UI/window-basic-auto-config-test.cpp

@@ -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();
 

+ 0 - 2
UI/window-basic-main-profiles.cpp

@@ -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