Browse Source

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.
gxalpha 2 years ago
parent
commit
321829d932
1 changed files with 12 additions and 0 deletions
  1. 12 0
      plugins/mac-avcapture/av-capture.mm

+ 12 - 0
plugins/mac-avcapture/av-capture.mm

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