瀏覽代碼

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 年之前
父節點
當前提交
321829d932
共有 1 個文件被更改,包括 12 次插入0 次删除
  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))