v4l2_m2m_get_vq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… v4l2_m2m_get_vq β€” the Kernel API Manual, bestie edition πŸŽ€

okay so welcome to the v4l2_m2m_get_vq(9) page, straight out of the Kernel API Manual, and honestly? it's a short one, so we're just gonna vibe check it together πŸ’–


✨ NAME ✨

v4l2_m2m_get_vq β€” literally just returns the vb2_queue for whatever type you hand it. that's it. that's the whole function. iconic minimalism πŸ‘‘


🌸 SYNOPSIS 🌸

struct vb2_queue * v4l2_m2m_get_vq (struct v4l2_m2m_ctx *m2m_ctx , enum
v4l2_buf_type type );

look at her. one pointer in, one pointer out. so clean πŸ¦‹


🫢 ARGUMENTS 🫢

  • m2m_ctx β€” the m2m context that's assigned to the instance, given to you as a struct v4l2_m2m_ctx. it's the whole situation, basically ✨
  • type β€” the type of the V4L2 buffer, as defined by enum v4l2_buf_type. this is the one that decides which queue you get back, so like… choose wisely bestie πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea: this function returns the capture queue when type is a capture type, and the output queue otherwise. no in-between, no third option, just vibes and a binary decision 🌈

and the detail that makes me feral? it never returns a NULL pointer. not ever. not even once. no cap. so you can call it and just trust it, which frankly is more than I can say for most things 😭πŸ”₯

lowkey the nicest guarantee in the whole header file. a NULL-free queen πŸ‘‘

πŸŽ€ SEE ALSO πŸŽ€

everything else in the family, because we're all connected fr fr. the kernel file is ./include/media/v4l2-mem2mem.h and here's every single sibling πŸ’–

like I said. the whole friend group πŸ§šπŸ’œ


and that's the page!! sourced from ./include/media, dated October 2026 β€” so mark your calendars and go get that queue bestie πŸ“βœ¨ mwah πŸ’‹

πŸ“¦ where this page comes from