camera_capture icon indicating copy to clipboard operation
camera_capture copied to clipboard

Is this crate supposed to work with MacOS?

Open LukasKalbertodt opened this issue 7 years ago • 2 comments

The source only distinguishes between unix and windows and for unix, rscam is used. But this is just a wrapper around v4l2 which seems to not exist for MacOS?

LukasKalbertodt avatar Nov 21 '17 14:11 LukasKalbertodt

I don't have a mac, so I was not able to develop for MacOS. I'll happily take PRs for that though ;)

oli-obk avatar Nov 21 '17 14:11 oli-obk

I was asking for a friend, I don't own a Mac either, so I won't be able to contribute anything :(

Said friend and I tried to quickly find out how webcam stuff works on MacOS. We didn't find out much in this limited time, but I want to share a few things which might be helpful for someone interested in implementing this:

Accessing webcams is done via AV Foundation, apparently a big OS API for all kinds of audio/video things. Apparently this API has to be called from Objective-C. Now I don't know if the Objective-C interface is compatible with the C interface. If that were the case, we could call those API methods from Rust directly. If not, we would have to write some Objective-C and expose a C interface ourselves. That would probably kinda suck. Now from a quick google search it looks like it is possible somehow. But again: I really don't know anything about MacOS development.

Maybe we could get "This week in Rust" to mention this issue as "contribution welcome"?

LukasKalbertodt avatar Nov 22 '17 09:11 LukasKalbertodt