v4l2_m2m_for...dst_buf_safe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

v4l2_m2m_for_each_dst_buf_safe β€” bestie, this is the macro you use when you wanna iterate over a list of destination ready buffers safely ✨

Ok so real talk, this is from the Kernel API Manual (v4l2_m2m_for...dst_buf_safe(9) if you're keeping score πŸŽ€), and it's literally the "don't trip while you're walking" version of a for-each loop. Main character energy for kernel devs only.


🌸 SYNOPSIS 🌸

v4l2_m2m_for_each_dst_buf_safe (m2m_ctx , b , n );

That's it. Three things in, vibes out. πŸ¦‹


✨ ARGUMENTS ✨

  • m2m_ctx β€” the m2m context assigned to the instance, like, given by struct v4l2_m2m_ctx. She's the one holding the whole situation together, no cap.
  • b β€” the current buffer, of type struct v4l2_m2m_buffer. This is your little iterator bestie that walks the list πŸ’–
  • n β€” honestly? just used as temporary storage. She's not the star of the show, she's the stagehand. Still iconic tho 🫢
Heads up bestie β€” the _safe in the name is doing a LOT of work here. It means you can yank stuff out of the list mid-iteration without the loop going πŸ’€ on you. That's the whole point of n existing.

πŸ¦‹ SEE ALSO πŸ¦‹

Ok this list is giving extended universe, so buckle up. First up, the kernel file herself:

./include/media/v4l2-mem2mem.h

Then the whole friend group, in order, no skipping, periodt:

Like I said. Extended universe. 🧚 Take your time, she's worth it.


That's the whole page, bestie β€” go forth and iterate safely πŸ’œ

Source path: ./include/media Β· dated October 2026 Β· page name v4l2_m2m_for...dst_buf_safe(9) πŸŽ€ slay, go read the source, ily, bye ✨

πŸ“¦ where this page comes from