v4l2_m2m_for_each_src_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… v4l2_m2m_for_each_src_buf(9) β€” the Kernel API Manual glow-up

okay bestie, welcome to the Kernel API Manual, section 9, and today's main character is v4l2_m2m_for_each_src_buf. it's a macro. it loops. it's giving "just walk the source-ready list, babe." πŸ¦‹


✨ NAME ✨

v4l2_m2m_for_each_src_buf β€” iterate over a list of source ready buffers

like, literally just loop over your source-ready buffers one by one. that's the whole vibe. no cap. πŸŽ€


🌸 SYNOPSIS 🌸

v4l2_m2m_for_each_src_buf (m2m_ctx , b );

that's it. that's the whole call. two things go in, the loop does its thing. πŸ’…


🫢 ARGUMENTS 🫢

  • m2m_ctx β€” the m2m context assigned to the instance, given by struct v4l2_m2m_ctx. it's the home base, the main character energy of your mem2mem setup πŸ‘‘
  • b β€” the current buffer, of type struct v4l2_m2m_buffer. this is the one you're holding in your hand right now as the loop goes around 🌈
ngl, both of these are required β€” there's no cute default here, you bring your own context and your own buffer variable. periodt.

πŸ”₯ SEE ALSO πŸ”₯

okay this is the part where the manpage flexes its entire friend group. every single one of these, no skips, no cap:


the calm-loop energy of for_each_src_buf is unmatched, but if you're out here removing stuff while iterating, go say hi to v4l2_m2m_for_each_src_buf_safe(9) instead, bestie. don't come crying to me at 3am. πŸ™ˆ

and that's the whole page, mwah πŸ’‹ this little lore drop lives in ./include/media, dated October 2026, filed under the v4l2_m2m_for_each_src_buf(9) header β€” slay, go iterate responsibly πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from