-
Notifications
You must be signed in to change notification settings - Fork 30
Description
On the Mac you can use a Femto Mega in OrbecViewer or with the SDK, but you have to run your program with sudo.
This issue also occurs with cameras from other vendors (for example the RealSense cameras).
The root cause is that the Femto Mega advertises itself as a USB Universal Video Class device. MacOS handles all USB UVC devices through a daemon called UVCAssistant, which opens the USB device exclusively once it is detected. (UVCAssistant then manages access to the device through the CoreMedia framework. The advantage of this setup is that any webcam is automatically supported in any application).
The problem is this exclusive opening by UVCAssistant: this means that OrbecViewer cannot open the camera anymore.
The workaround is to run OrbecViewer (or your own application) with sudo: this overrides the exclusive use.
A permanent fix would be to somehow convince Apple to implement an exception to this managing of all UVC devices.
To see the analysis of this problem I sketched above:
- Download
IORegistryExplorer. It is part of the Additional Tools for Xcode on the Apple Developer download page. - Run it, connect the Orbbec.
- In the IORegistryExplorer, search for
Orbbec, see that the device is connected exclusively toUVCAssistant. - Check that trying to also open it with
OrbbecViewerfails. - Now run
sudo OrbbecViewer, which succeeds, and start streaming the RGB. - Now
IORegistryExplorerwill show thatUVCAssistanthas released the device, andOrbbecViewerhas it open.