v4l2_queryctrl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, welcome to v4l2_queryctrl β€” and yes, you're on the v4l2_queryctrl(9) page of the Kernel API Manual, we're doing kernel things today ✨

v4l2_queryctrl is literally just the helper function you use to implement the :ref:VIDIOC_QUERYCTRL <vidioc_queryctrl>`` ioctl. that's the whole job. it's giving "supporting character who carries the entire plot" energy πŸ’…


🌸 SYNOPSIS 🌸

int v4l2_queryctrl (struct v4l2_ctrl_handler *hdl , struct v4l2_queryctrl *qc );

like, look at her. she returns an int, she takes two pointers, she's iconic. no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • hdl β€” pointer to struct v4l2_ctrl_handler πŸ‘‘
  • qc β€” pointer to struct v4l2_queryctrl πŸ¦‹

that's it. two pointers. you got this fr fr.


🧚 DESCRIPTION 🧚

here's the tea, and it's short and honestly a little ominous:

if hdl == NULL then they will all return -EINVAL.

yes bestie, the manpage really says "they will all return" β€” plural, vague, mysterious, main character energy πŸ’€ i'm not the author, i'm just the messenger. the rule is: hdl == NULL β‡’ -EINVAL. periodt.

πŸ’œ SEE ALSO πŸ’œ

okay so this is the part where the page lists literally every single control-related function and type and struct in the whole neighborhood, and i'm not skipping a single one because that would be a crime against your education 😀

Kernel file: ./include/media/v4l2-ctrls.h

look at that list. she ate and left no crumbs πŸ”₯ read them, love them, they're family now.


and that's the whole page bestie!! this masterpiece lives in ./include/media and it's dated October 2026 β€” go forth, pass hdl, don't pass NULL, and slay πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from