|
|
@@ -3542,6 +3542,11 @@ void OBSBasicSettings::SaveOutputSettings()
|
|
|
#endif
|
|
|
else if (encoder == SIMPLE_ENCODER_AMD)
|
|
|
presetType = "AMDPreset";
|
|
|
+ else if (encoder == SIMPLE_ENCODER_APPLE_H264)
|
|
|
+ /* The Apple encoders don't have presets like the other encoders
|
|
|
+ do. This only exists to make sure that the x264 preset doesn't
|
|
|
+ get overwritten with empty data. */
|
|
|
+ presetType = "ApplePreset";
|
|
|
else
|
|
|
presetType = "Preset";
|
|
|
|
|
|
@@ -4768,6 +4773,14 @@ void OBSBasicSettings::FillSimpleRecordingValues()
|
|
|
ui->simpleOutRecEncoder->addItem(
|
|
|
ENCODER_STR("Hardware.AMD.H264"),
|
|
|
QString(SIMPLE_ENCODER_AMD));
|
|
|
+ if (EncoderAvailable("com.apple.videotoolbox.videoencoder.ave.avc")
|
|
|
+#ifndef __aarch64__
|
|
|
+ && os_get_emulation_status() == true
|
|
|
+#endif
|
|
|
+ )
|
|
|
+ ui->simpleOutRecEncoder->addItem(
|
|
|
+ ENCODER_STR("Hardware.Apple.H264"),
|
|
|
+ QString(SIMPLE_ENCODER_APPLE_H264));
|
|
|
#undef ADD_QUALITY
|
|
|
}
|
|
|
|
|
|
@@ -4793,6 +4806,18 @@ void OBSBasicSettings::FillSimpleStreamingValues()
|
|
|
ui->simpleOutStrEncoder->addItem(
|
|
|
ENCODER_STR("Hardware.AMD.H264"),
|
|
|
QString(SIMPLE_ENCODER_AMD));
|
|
|
+/* Preprocessor guard required for the macOS version check */
|
|
|
+#ifdef __APPLE__
|
|
|
+ if (EncoderAvailable("com.apple.videotoolbox.videoencoder.ave.avc")
|
|
|
+#ifndef __aarch64__
|
|
|
+ && os_get_emulation_status() == true
|
|
|
+#endif
|
|
|
+ )
|
|
|
+ if (__builtin_available(macOS 13.0, *))
|
|
|
+ ui->simpleOutStrEncoder->addItem(
|
|
|
+ ENCODER_STR("Hardware.Apple.H264"),
|
|
|
+ QString(SIMPLE_ENCODER_APPLE_H264));
|
|
|
+#endif
|
|
|
#undef ENCODER_STR
|
|
|
}
|
|
|
|
|
|
@@ -4835,6 +4860,9 @@ void OBSBasicSettings::SimpleStreamingEncoderChanged()
|
|
|
QString preset;
|
|
|
const char *defaultPreset = nullptr;
|
|
|
|
|
|
+ ui->simpleOutAdvanced->setVisible(true);
|
|
|
+ ui->simpleOutPresetLabel->setVisible(true);
|
|
|
+ ui->simpleOutPreset->setVisible(true);
|
|
|
ui->simpleOutPreset->clear();
|
|
|
|
|
|
if (encoder == SIMPLE_ENCODER_QSV) {
|
|
|
@@ -4906,6 +4934,11 @@ void OBSBasicSettings::SimpleStreamingEncoderChanged()
|
|
|
|
|
|
defaultPreset = "balanced";
|
|
|
preset = curAMDPreset;
|
|
|
+ } else if (encoder == SIMPLE_ENCODER_APPLE_H264) {
|
|
|
+ ui->simpleOutAdvanced->setChecked(false);
|
|
|
+ ui->simpleOutAdvanced->setVisible(false);
|
|
|
+ ui->simpleOutPreset->setVisible(false);
|
|
|
+ ui->simpleOutPresetLabel->setVisible(false);
|
|
|
} else {
|
|
|
|
|
|
#define PRESET_STR(val) \
|