STRUCT V4L2_SELECTION(9)
π struct v4l2_selection(9) β Kernel API Manual π
okay bestie, sit down, hydrate, and let me tell you about struct v4l2_selection</p> β it's literally the selection info struct from the Linux kernel API and she is iconic. this is the glow-up version of the manual page, same facts, way better vibes. periodt. β¨
πΈ NAME πΈ
struct v4l2_selection</p> β selection info. that's it, that's the name, she's concise and she knows it π
π¦ SYNOPSIS π¦
struct v4l2_selection {
__u32 type;
__u32 target;
__u32 flags;
struct v4l2_rect r;
__u32 reserved[9];
};
look at her. five members. flawless structure. no notes. π
β¨ Members β¨
typeβ the buffer type. and listen, do not use*_MPLANEtypes here, that's the rule, i don't make the rules (i do know them though) πtargetβ the selection target! this is what picks which rectangle you're talking about out of all the possible ones. it's defined inv4l2-common.hand the values areV4L2_SEL_TGT_*. she's the main character of choosing π―flagsβ the constraints flags, also defined inv4l2-common.h, and the values areV4L2_SEL_FLAG_*. little toggles, big energy βrβ the coordinates of the selection window. this is the actual rectangle, the whole point, the moment π«Άreservedβ reserved for future use, rounds the structure size up to 64 bytes, and you set it to zero. it's a placeholder bestie, be nice to it, zero it out π
π Description π
so here's the tea β β hardware may use multiple helper windows to process a video stream. like, more than one. a whole little squad of windows doing the work.
and this structure? she's the go-between π β the thing used to exchange these selection areas between an application and a driver. app says something, driver says something back, everybody's on the same page. communication slay.
π₯ SEE ALSO π₯
kernel file ./include/uapi/linux/videodev2.h, plus the whole friend group, all invited to the group chat:
struct v4l2_capability(9)struct v4l2_plane(9)struct v4l2_buffer(9)v4l2_timeval_to_ns(9)struct v4l2_exportbuffer(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)
ngl bestie, if you take one thing from this page:typegets a real buffer type (not the*_MPLANEones) andreservedstays zero. everything else is just rectangles living their truth. π§
and that's the whole page!! πβ¨ππ¦πΈπ
π«Ά sourced straight from ./include/uapi/linux, dated October 2026, and brought to you by the struct v4l2_selection(9) crew. mwah. ππ
π¦ 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