blackjack / webcam

Golang webcam library for Linux
MIT License
411 stars 90 forks source link

Add GetSupportedFramerates #58

Closed seanavery closed 1 year ago

seanavery commented 1 year ago

GetSupportedFramerates

This PR allows for fetching the FPS settings of a camera driver for use in setFramerate. The code is similar to GetSupportedFrameSizes.

An IOCTL constant VIDIOC_ENUM_FRAMEINTERVALS is added for making the system call, and a struct FrameRate is added as a container for the return.

GetFrameInterval makes the IOCTL call and parses the return. Much like FrameSizes, only discrete and stepwise returns are supported.

edaniels commented 1 year ago

When you want me to re-review, just click the button!

seanavery commented 1 year ago

@edaniels @bazile-clyde Following up here - any change requests?

seanavery commented 1 year ago

@edaniels @bazile-clyde

Ok, rebased off of master - should be ready for merge when everyone is happy.