Jelajahi Sumber

mac-virtualcam: Fix CMIO errors due to unsettable properties

This change fixes an issue with the CMIO DAL plugin where the CMIO
subsystem would log multiple errors when starting the virtual camera,
due to certain properties that could not be set (frame rate and format).

For now, we just ignore the assignment, but mark the property as
settable to suppress the error messages that are reported by the CMIO
subsystem.
Fabian Mastenbroek 3 tahun lalu
induk
melakukan
37c76abf0d
1 mengubah file dengan 8 tambahan dan 1 penghapusan
  1. 8 1
      plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm

+ 8 - 1
plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm

@@ -576,7 +576,14 @@
 
 - (BOOL)isPropertySettableWithAddress:(CMIOObjectPropertyAddress)address
 {
-	return false;
+	switch (address.mSelector) {
+	case kCMIOStreamPropertyFormatDescription:
+	case kCMIOStreamPropertyFrameRate:
+		// Suppress error logs complaining about the application not being able to set the desired format or frame rate.
+		return true;
+	default:
+		return false;
+	}
 }
 
 - (void)setPropertyDataWithAddress:(CMIOObjectPropertyAddress)address