From 37c76abf0d753ba893ab3dc12a6dc866c09597ec Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 10 Jun 2022 14:27:56 +0200 Subject: [PATCH] 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. --- plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm b/plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm index b1f4bb8b0..b318f6fb7 100644 --- a/plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm +++ b/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