Gnurou / v4l2r

Rust bindings for V4L2
MIT License
23 stars 11 forks source link

Add support for ioctl VIDIOC_S_CTRL #13

Closed mfreeborn closed 1 year ago

mfreeborn commented 1 year ago

Closes #12

I've largely used the other files in the ioctl as a template for this, rather than fully understanding the inner workings of your library. Does this look reasonable for an implementation of the above ioctl function call?

Of note, and it should probably be in a separate pull request, but I've made Encoder.device public. The purpose of this is to act as an escape hatch when using the Encoder api to drop down to the lower level ioctl. I'm not experienced with Arc<_>, so I don't know if it's more appropriate to make a separate method that looks more like this pseudocode:

pub fn device(&self) -> Arc<Device> {
    Arc::clone(self.device)
}
Gnurou commented 1 year ago

Hi! Sorry for taking so long to come back to this. PR #14 adds support for S_EXT_CTRL and requests, could you take a look and check if this fits your needs as well?

mfreeborn commented 1 year ago

Yes, let's close this in favour of #14 for now.