UI: Add Apple H.264 hardware encoder to simple mode
Adds the Apple Silicon hardware encoder as a simple mode option. For recordings this only requires being on Apple Silicon (since we use the Constant Quality setting), while for streaming it requires the user to be on macOS 13 or newer (since we're using CBR).
This commit is contained in:
parent
566ce79b0f
commit
29ae00e4af
6 changed files with 68 additions and 1 deletions
|
|
@ -821,6 +821,7 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
|
|||
#ifdef ENABLE_HEVC
|
||||
bool nve_hevc_supported = false;
|
||||
#endif
|
||||
bool apple_supported = false;
|
||||
bool changed = false;
|
||||
size_t idx = 0;
|
||||
const char *id;
|
||||
|
|
@ -836,6 +837,10 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
|
|||
else if (strcmp(id, "ffmpeg_hevc_nvenc") == 0)
|
||||
nve_hevc_supported = true;
|
||||
#endif
|
||||
else if (strcmp(id,
|
||||
"com.apple.videotoolbox.videoencoder.ave.avc") ==
|
||||
0)
|
||||
apple_supported = true;
|
||||
}
|
||||
|
||||
auto CheckEncoder = [&](const char *&name) {
|
||||
|
|
@ -865,6 +870,12 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
|
|||
name = SIMPLE_ENCODER_X264;
|
||||
return false;
|
||||
}
|
||||
} else if (strcmp(name, SIMPLE_ENCODER_APPLE_H264) == 0) {
|
||||
if (!apple_supported) {
|
||||
changed = true;
|
||||
name = SIMPLE_ENCODER_X264;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue