vb2_querybuf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– vb2_querybuf(9) Β· Kernel API Manual πŸ’–

okay so bestie, you’re in the Kernel API Manual and this page is all about vb2_querybuf(9). it’s giving β€œask the kernel nicely about a video buffer” energy, and we’re gonna keep every fact exactly where it belongs πŸ’…

🌸 NAME 🌸

vb2_querybuf β€” Query video buffer information ✨

✨ SYNOPSIS ✨

int vb2_querybuf (struct vb2_queue *q , struct v4l2_buffer *b );

πŸŽ€ ARGUMENTS πŸŽ€

  • q β€” pointer to struct vb2_queue with videobuf2 queue. this is the queue pointer, bestie, no cap.
  • b β€” buffer structure passed from userspace to the v4l2_ioctl_ops->vidioc_querybuf handler in driver. it’s the userspace buffer info coming through your driver’s handler 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

Should be called from vidioc_querybuf ioctl handler in driver. that’s the vibe: this is the helper your handler calls when it’s time to answer a querybuf request.

This function will verify the passed v4l2_buffer structure and fill the relevant information for the userspace. so it does a little vibe check on the incoming v4l2_buffer and then fills in the relevant info for userspace ✨

The return values from this function are intended to be directly returned from vidioc_querybuf handler in driver. like, do not overthink the return path β€” the intended move is to hand these return values straight back from the vidioc_querybuf handler in your driver πŸ’–

🌈 SEE ALSO 🌈

Kernel file ./include/media/videobuf2-v4l2.h and struct vb2_v4l2_buffer(9), plus the whole videobuf2 bestie roster: vb2_find_buffer(9), vb2_reqbufs(9), vb2_create_bufs(9), vb2_prepare_buf(9), vb2_qbuf(9), vb2_expbuf(9), vb2_dqbuf(9), vb2_streamon(9), vb2_streamoff(9), vb2_queue_init(9), vb2_queue_init_name(9), vb2_queue_release(9), vb2_queue_change_type(9), vb2_poll(9), vb2_queue_is_busy(9), vb2_video_unregister_device(9) πŸ¦‹

mwah πŸ’‹ that’s the whole page, bestie β€” source/version ./include/media, date October 2026, filed under the vb2_querybuf(9) manpage title. slay and bye 🫢

πŸ“¦ where this page comes from