mac-avcapture: Log if portrait or studio light effects are active

These effects can remain enabled between devices (so enabling it on one
device can mean it's later also enabled on another device), leading to
cases of capture cards getting blurred.
Logging that the effects are enabled should make it easier to spot this
in support.
This commit is contained in:
gxalpha
2023-08-30 15:24:31 -04:00
committed by Ryan Foster
parent 78a33c7771
commit 321829d932
+12
View File
@@ -1118,6 +1118,18 @@ static void capture_device(av_capture *capture, AVCaptureDevice *dev, obs_data_t
obs_data_set_string(settings, "device_name", name);
obs_data_set_string(settings, "device", dev.uniqueID.UTF8String);
AVLOG(LOG_INFO, "Selected device '%s'", name);
if (@available(macOS 12.0, *)) {
if ([dev isPortraitEffectActive])
AVLOG(LOG_WARNING, "Portrait effect is active on selected device");
}
if (@available(macOS 12.3, *)) {
if ([dev isCenterStageActive])
AVLOG(LOG_WARNING, "Center Stage effect is active on selected device");
}
if (@available(macOS 13.0, *)) {
if ([dev isStudioLightActive])
AVLOG(LOG_WARNING, "Studio Light effect is active on selected device");
}
if ((capture->use_preset = obs_data_get_bool(settings, "use_preset"))) {
if (!init_preset(capture, dev, settings))