[−][src]Function v4l::v4l2::api::open
pub fn open<P: AsRef<Path>>(path: P, flags: i32) -> Result<c_int>
A convenience wrapper around v4l2_open.
Returns the file descriptor on success. In case of errors, the last OS error will be reported, aka errno on Linux.
Arguments
path
- Path to the device nodeflags
- Open flags
Example
extern crate v4l; use v4l::v4l2; let fd = v4l2::open("/dev/video0", libc::O_RDWR);