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

Function stream_off

rustcv-camera/src/backend/linux/sys.rs:352–362  ·  view source on GitHub ↗

Stop video streaming (VIDIOC_STREAMOFF). 停止视频流(VIDIOC_STREAMOFF)。 All buffers are automatically dequeued by the driver after this call. 此调用后驱动会自动将所有缓冲区出队。

(fd: RawFd)

Source from the content-addressed store, hash-verified

350/// All buffers are automatically dequeued by the driver after this call.
351/// 此调用后驱动会自动将所有缓冲区出队。
352pub fn stream_off(fd: RawFd) -> io::Result<()> {
353 let mut buf_type: u32 = V4L2_BUF_TYPE_VIDEO_CAPTURE;
354 unsafe {
355 v4l2_ioctl(
356 fd,
357 VIDIOC_STREAMOFF,
358 &mut buf_type as *mut _ as *mut libc::c_void,
359 )?;
360 }
361 Ok(())
362}
363
364// ─── Device open/close ──────────────────────────────────────────────────────
365

Callers 1

stopMethod · 0.85

Calls 1

v4l2_ioctlFunction · 0.85

Tested by

no test coverage detected