MCPcopy Create free account
hub / github.com/RustCV/RustCV / enum_frame_intervals

Function enum_frame_intervals

rustcv-camera/src/backend/linux/sys.rs:146–166  ·  view source on GitHub ↗
(
    fd: RawFd,
    pixel_format: u32,
    width: u32,
    height: u32,
    index: u32,
)

Source from the content-addressed store, hash-verified

144/// 枚举指定格式和尺寸下支持的帧间隔(VIDIOC_ENUM_FRAMEINTERVALS)。
145#[allow(dead_code)]
146pub fn enum_frame_intervals(
147 fd: RawFd,
148 pixel_format: u32,
149 width: u32,
150 height: u32,
151 index: u32,
152) -> io::Result<v4l2_frmivalenum> {
153 let mut interval: v4l2_frmivalenum = unsafe { std::mem::zeroed() };
154 interval.index = index;
155 interval.pixel_format = pixel_format;
156 interval.width = width;
157 interval.height = height;
158 unsafe {
159 v4l2_ioctl(
160 fd,
161 VIDIOC_ENUM_FRAMEINTERVALS,
162 &mut interval as *mut _ as *mut libc::c_void,
163 )?;
164 }
165 Ok(interval)
166}
167
168// ─── Format get/set ─────────────────────────────────────────────────────────
169

Callers

nothing calls this directly

Calls 1

v4l2_ioctlFunction · 0.85

Tested by

no test coverage detected