Skip to main content

v4l/v4l2/
videodev.rs

1use crate::v4l_sys::v4l2_ext_control;
2
3// We need to carry our own copy of this struct, because the `which` field used to be called
4// `ctrl_class` and Linux now has both fields in a union. While the change is transparent as far as
5// C (and thus Linux) is concerned, it causes us trouble with bindgen since we cannot directly
6// access union members.
7//
8// See https://github.com/raymanfx/libv4l-rs/pull/40#issuecomment-885169894 for additional details.
9#[repr(C)]
10pub(crate) struct v4l2_ext_controls {
11    pub which: u32,
12    pub count: u32,
13    pub error_idx: u32,
14    pub request_fd: i32,
15    pub reserved: u32,
16    pub controls: *mut v4l2_ext_control,
17}