STRUCT V4L2_CAPABILITY(9)
π struct v4l2_capability(9) π
okay so bestie, this is a page from the Kernel API Manual β yes, the kernel, the big one β and we're about to get into struct v4l2_capability, which is literally the struct that describes your V4L2 device caps, returned by VIDIOC_QUERYCAP. it's giving "who am I and what can I do" energy for your video device. slay. π
β¨ NAME β¨
struct v4l2_capability β describes the V4L2 device caps that get returned by VIDIOC_QUERYCAP π¦
πΈ SYNOPSIS πΈ
okay, deep breath, here's the whole shape of it, exactly as it is:
struct v4l2_capability {
__u8 driver[16];
__u8 card[32];
__u8 bus_info[32];
__u32 version;
__u32 capabilities;
__u32 device_caps;
__u32 reserved[3];
};
yes the closing brace is indented by one space in the original and we are respecting it. periodt. π
π Members π
so these are the fields, and every single one of them matters, okay? no skimming:
driverβ the name of the driver module, like"bttv"for example. this is the driver's little name tag π·οΈcardβ the name of the card, like"Hauppauge WinTV". iconic hardware branding moment πbus_infoβ the name of the bus, e.g."PCI:"+pci_name(pci_dev). it's literally telling you where this thing lives on the bus πversionβ this one holds aKERNEL_VERSIONβcapabilitiesβ the capabilities of the physical device as a whole. the full picture, the whole vibe check of the entire device π₯device_capsβ the capabilities accessed via this particular device (node). so like, this specific node's own personal set of powers, not the whole device's πreservedβ reserved fields for future extensions. the kernel is holding seats for future features, we love a forward-thinking icon π
ngl bestie, do not go touching reserved β it's reserved for future extensions, that's literally its whole job. leave it alone. π
π¦ SEE ALSO π¦
if you're obsessed (and you should be), go look at the kernel file ./include/uapi/linux/videodev2.h, and also these absolute main characters:
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_meta_format(9)struct v4l2_format(9)struct v4l2_event_motion_det(9)struct v4l2_create_buffers(9)struct v4l2_remove_buffers(9)
that's the whole friend group, fr fr. go say hi π
okay that's the page!! this one lives in ./include/uapi/linux, dated October 2026, and it's struct v4l2_capability(9) from the Kernel API Manual β mwah, tysm for reading bestie, you ate this whole thing up π
β¨πΈπ«Ά
π¦ 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