v4l2_m2m_for_each_dst_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… v4l2_m2m_for_each_dst_buf (9) β€” Kernel API Manual ✨

okay so bestie, you found the page for v4l2_m2m_for_each_dst_buf πŸ’– it lives in the Kernel API Manual, and it's genuinely one of the comfiest little macros in the whole media subsystem, no cap.


🌸 NAME 🌸

v4l2_m2m_for_each_dst_buf β€” loop over a list of destination ready buffers πŸŽ€ literally just iterating, but make it cute.


✨ SYNOPSIS ✨

v4l2_m2m_for_each_dst_buf (m2m_ctx , b );

that's it. that's the whole call. two things go in, magic happens πŸͺ„


πŸ¦‹ ARGUMENTS πŸ¦‹

  • m2m_ctx β€” the m2m context that's assigned to the instance, given by struct v4l2_m2m_ctx. she's the main character here, the whole state of your mem2mem setup πŸ‘‘
  • b β€” the current buffer, of type struct v4l2_m2m_buffer. this is your loop variable bestie, she gets handed a new buffer each spin around the loop πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

fr fr there is SO much family here, the whole mem2mem friend group showed up. Kernel file ./include/media/v4l2-mem2mem.h plus:

like, the entire friend group πŸ’€ but honestly? each one ate, go read them 🫢


πŸ’‘ little vibe check bestie: if you're removing buffers while you loop, you want v4l2_m2m_for_each_dst_buf_safe(9) instead β€” she's the safe girly for that job 🌈

and that's the page! this one ships from ./include/media, dated October 2026, and it's the v4l2_m2m_for_each_dst_buf(9) page from the Kernel API Manual πŸŽ€ happy iterating, bestie, you're gonna slay those destination buffers β­πŸ’œ

πŸ“¦ where this page comes from