openpnp / openpnp-capture

A cross platform video capture library with a focus on machine vision.
MIT License
129 stars 56 forks source link

Cap_getPropertyLimits doesn't work on macOS #38

Closed ronaaron closed 2 years ago

ronaaron commented 4 years ago

Running macOS 10.5, I get CAPRESULT_PROPERTYNOTSUPPORTED for all properties. I can capture frames just fine, though.

This is with a RELEASE build, STATIC library.

ronaaron commented 4 years ago

Turned logging all the way up, and got this:

[DBG ] Setup for capture format (1280 x 720)...
[DBG ] UVCCtrl::findDevice() called
[DBG ] UVCCtrl::findDevice() Camera control error -536870210
[DBG ] Could not create a UVC control object! -- settings will not be available!
ronaaron commented 4 years ago

Apparently the root cause is OSX Unique ID is not exactly 18 characters - wrong format to extract location.

Is there a workaround for this? It's funny, because there's only the one camera on this MBP... it shouldn't be difficult to identify.

Looking at the code, you end up with the USB vid and pid being 0. Would it be possible to return the system camera in that case?

ronaaron commented 4 years ago

I just noticed this is talked about in another issue... but I'll leave it open for now in case someone has an idea.

trcwm commented 4 years ago

Some cameras don't have any or very few settable properties. They will return a PROPERTYNOTSUPPORTED error. However, it looks like you are running into a OSX permission issue. I think this has been fixed in the latest master branch. Can you confirm this? I don't have OSX to test this myself.

vonnieda commented 2 years ago

Closing stale issue. Please reopen if the issue is still relevant with the latest version.