UI: Simple Output Mode for NVENC HEVC

This commit is contained in:
Yuriy Chumak
2022-05-19 07:53:37 +03:00
committed by Jim
parent 29782cd594
commit 84e7db5059
5 changed files with 104 additions and 0 deletions

View File

@@ -818,6 +818,9 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
bool qsv_supported = false;
bool amd_supported = false;
bool nve_supported = false;
#ifdef ENABLE_HEVC
bool nve_hevc_supported = false;
#endif
bool changed = false;
size_t idx = 0;
const char *id;
@@ -829,6 +832,10 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
qsv_supported = true;
else if (strcmp(id, "ffmpeg_nvenc") == 0)
nve_supported = true;
#ifdef ENABLE_HEVC
else if (strcmp(id, "ffmpeg_hevc_nvenc") == 0)
nve_hevc_supported = true;
#endif
}
auto CheckEncoder = [&](const char *&name) {
@@ -844,6 +851,14 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
name = SIMPLE_ENCODER_X264;
return false;
}
#ifdef ENABLE_HEVC
} else if (strcmp(name, SIMPLE_ENCODER_NVENC_HEVC) == 0) {
if (!nve_hevc_supported) {
changed = true;
name = SIMPLE_ENCODER_X264;
return false;
}
#endif
} else if (strcmp(name, SIMPLE_ENCODER_AMD) == 0) {
if (!amd_supported) {
changed = true;