onix 0.1.0

Decode image files using V4L2
Documentation
use crate::info::DeviceInfo;
use crate::topology::Topology;
use crate::video::{
    BufType, Buffer, Capability, ExportBuffer, ExtControls, FmtDesc, Format, RequestBuffers,
};
use nix::{ioctl_none, ioctl_read, ioctl_readwrite, ioctl_write_ptr};

ioctl_readwrite!(device_info, b'|', 0x00, DeviceInfo);
ioctl_readwrite!(get_topology, b'|', 0x04, Topology);
ioctl_read!(request_alloc, b'|', 0x05, i32);
ioctl_none!(request_queue, b'|', 0x80);
ioctl_none!(request_reinit, b'|', 0x81);

ioctl_read!(querycap, b'V', 0, Capability);
ioctl_readwrite!(enum_fmt, b'V', 2, FmtDesc);
ioctl_readwrite!(s_fmt, b'V', 5, Format);
ioctl_readwrite!(reqbufs, b'V', 8, RequestBuffers);
ioctl_readwrite!(querybuf, b'V', 9, Buffer);
ioctl_readwrite!(qbuf, b'V', 15, Buffer);
ioctl_readwrite!(expbuf, b'V', 16, ExportBuffer);
ioctl_readwrite!(dqbuf, b'V', 17, Buffer);
ioctl_write_ptr!(streamon, b'V', 18, BufType);
ioctl_write_ptr!(streamoff, b'V', 19, BufType);
ioctl_readwrite!(s_ext_ctrls, b'V', 72, ExtControls);