AVCapture with IOKit in macos 12 access fail

I am using AVCatureSession to display the usb camera video. Also using IOUSBInterfaceOpen to open one of the usb interface for access the button interrupt signal. But it return "kIOReturnExclusiveAccess" error in macos 12.

I have also tried to use "IOUSBDevice::ReEnumerateDevice" to detach the kernel driver for interface open. But the AVCatureSession will not show the image.

Anyway to support both AVCatureSession and IOUSBInterfaceOpen in macos 12?

Post not yet marked as solved Up vote post of keithz Down vote post of keithz
270 views