Skip to content

Commit

Permalink
mac-virtualcam: Fix CMIO errors due to unsettable properties
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fabianishere committed Jun 10, 2022
1 parent 40cb92a commit 37c76ab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,14 @@ - (BOOL)hasPropertyWithAddress:(CMIOObjectPropertyAddress)address

- (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
Expand Down

0 comments on commit 37c76ab

Please sign in to comment.