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

Function stream_on

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

Start video streaming (VIDIOC_STREAMON). 启动视频流(VIDIOC_STREAMON)。 All buffers must be queued before calling this. 调用前所有缓冲区必须已入队。

(fd: RawFd)

Source from the content-addressed store, hash-verified

333/// All buffers must be queued before calling this.
334/// 调用前所有缓冲区必须已入队。
335pub fn stream_on(fd: RawFd) -> io::Result<()> {
336 let mut buf_type: u32 = V4L2_BUF_TYPE_VIDEO_CAPTURE;
337 unsafe {
338 v4l2_ioctl(
339 fd,
340 VIDIOC_STREAMON,
341 &mut buf_type as *mut _ as *mut libc::c_void,
342 )?;
343 }
344 Ok(())
345}
346
347/// Stop video streaming (VIDIOC_STREAMOFF).
348/// 停止视频流(VIDIOC_STREAMOFF)。

Callers 1

startMethod · 0.85

Calls 1

v4l2_ioctlFunction · 0.85

Tested by

no test coverage detected