bryal / captrs

Cross-platform screen capture in Rust
GNU Affero General Public License v3.0
151 stars 16 forks source link

macOS support #5

Open LoganDark opened 4 years ago

bryal commented 4 years ago

Sure, macOS support would definitely be in scope of this crate! Nothing I myself can do about it though, as I've neither ever coded on Mac nor even own one! If someone on macOS would like to help out, I'd gladly accept any PRs!

LoganDark commented 4 years ago

I'm on macOS, I just have no idea how to screen capture on there... I'm currently caught up in something else so I can't do the research right at this moment, but maybe you can see if you can find anything?

rollcat commented 3 years ago

Screen capture on macOS seems to be a part of the AVFoundation framework:

https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture https://developer.apple.com/documentation/avfoundation/avcapturescreeninput

Seems like there's a very WIP binding for AVFoundation in Rust here: https://crates.io/crates/avfoundation ...but it doesn't seem to have any support for media capture yet.

Perhaps it would be viable to interface with the native ObjC APIs directly, eg via RustKit?

alectrocute commented 1 year ago

Nowadays, it'd be best to integrate ScreenCaptureKit: https://developer.apple.com/documentation/screencapturekit