STRUCT V4L2_META_FORMAT(9)
β¨ struct v4l2_meta_format(9) β¨
okay so bestie, welcome to the Kernel API Manual π
this is the whole entire glow-up on struct v4l2_meta_format, and honestly? it's giving "small struct, big main character energy" π
πΈ NAME πΈ
struct v4l2_meta_format β the metadata format definition, periodt β¨
π¦ SYNOPSIS π¦
struct v4l2_meta_format {
__u32 dataformat;
__u32 buffersize;
__u32 width;
__u32 height;
__u32 bytesperline;
};
like, five fields. five. and every single one of them matters, no filler π
π Members π
dataformatβ the little endian four character code (fourcc) π§ this is the label on the tin, iykykbuffersizeβ the maximum size in bytes required for data π₯ like, the biggest this thing is ever gonna getwidthβ number of data units of data per line (valid for line based formats only, see format documentation) π sooo this one only counts if you're on a line based format, check the format docs bestieheightβ number of lines of data per buffer (valid for line based formats only) β again: line based formats only, don't come for mebytesperlineβ offset between the beginnings of two adjacent lines in bytes (valid for line based formats only) π the gap between line starts, and yes, line based formats only, we said what we said
ngl the recurring theme here is line based formats only β if your format isn't line based, those last three are lowkey just vibes π
π SEE ALSO π
the kernel file ./include/uapi/linux/videodev2.h and literally the whole friend group:
struct v4l2_capability(9)struct v4l2_plane(9)struct v4l2_buffer(9)v4l2_timeval_to_ns(9)struct v4l2_exportbuffer(9)struct v4l2_selection(9)struct v4l2_plane_pix_format(9)struct v4l2_pix_format_mplane(9)struct v4l2_sdr_format(9)struct v4l2_format(9)struct v4l2_event_motion_det(9)struct v4l2_create_buffers(9)struct v4l2_remove_buffers(9)
and that's the whole page, bestie π«Ά this came straight out of ./include/uapi/linux and got stamped October 2026 β iconic, no notes, slay π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms