STRUCT V4L2_SUBDEV_SELECTION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct v4l2_subdev_selection(9) ✨

okay bestie, welcome to the Kernel API Manual πŸ’– this one's about struct v4l2_subdev_selection(9) and it's genuinely so useful, i promise. sit down, grab a lil drink πŸ“


🌸 NAME 🌸

struct v4l2_subdev_selection β€” selection info. that's it. that's the whole vibe. it's a struct that holds selection info πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct v4l2_subdev_selection {
    __u32 which;
    __u32 pad;
    __u32 target;
    __u32 flags;
    struct v4l2_rect r;
    __u32 stream;
    __u32 reserved[7];
 };

like look at her. she's gorgeous. ten out of ten struct πŸ’…


πŸ’… Members πŸ’…

  • which β€” either V4L2_SUBDEV_FORMAT_ACTIVE or V4L2_SUBDEV_FORMAT_TRY. yes those are the only two options, pick one, no cap 🫢
  • pad β€” the pad number, exactly as reported by the media API. don't make one up, use the real one bestie ✨
  • target β€” the selection target. this is what picks which of the possible rectangles you mean. it's defined in v4l2-common.h and the family is V4L2_SEL_TGT_* 🎯
  • flags β€” the constraint flags, also defined in v4l2-common.h, and these ones are V4L2_SEL_FLAG_* 🚩
  • r β€” the coordinates of the selection window. like, where the box lives πŸ“
  • stream β€” the stream number, defined in subdev routing 🌊
  • reserved β€” for future use, so set it to zero for now. do NOT get cute with it, i'm serious, leave it alone πŸ™ˆ

πŸ”₯ Description πŸ”₯

so here's the tea β˜• hardware may use multiple helper windows to process a video stream β€” like, more than one, it's a whole thing. this structure is the one that carries those selection areas back and forth between an application and a driver. it's literally the messenger 🧚


⭐ SEE ALSO ⭐

  • Kernel file ./include/uapi/linux/v4l2-subdev.h
  • enum v4l2_subdev_format_whence(9)
  • struct v4l2_subdev_format(9)
  • struct v4l2_subdev_crop(9)
  • struct v4l2_subdev_mbus_code_enum(9)
  • struct v4l2_subdev_frame_size_enum(9)
  • struct v4l2_subdev_frame_interval(9)
  • struct v4l2_subdev_frame_interval_enum(9)
  • struct v4l2_subdev_capability(9)
  • struct v4l2_subdev_route(9)
  • struct v4l2_subdev_routing(9)
  • struct v4l2_subdev_client_capability(9)

okay that's the whole page, you ate that ngl πŸ‘‘ go read the header file next, iykyk

and that's a wrap bestie!! 🌈 this came from ./include/uapi/linux, dated October 2026, and it's filed under struct v4l2_...ev_selection(9) β€” mwah, love u, bye πŸ’œπŸŽ€

πŸ“¦ where this page comes from