STRUCT V4L2_META_FORMAT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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, iykyk
  • buffersize β€” the maximum size in bytes required for data πŸ”₯ like, the biggest this thing is ever gonna get
  • width β€” 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 bestie
  • height β€” number of lines of data per buffer (valid for line based formats only) ⭐ again: line based formats only, don't come for me
  • bytesperline β€” 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