v4l2_m2m_buf_copy_metadata(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… v4l2_m2m_buf_copy_metadata β€” from the Kernel API Manual ✨

okay bestie, buckle up, because today we're talking about a tiny little helper in the kernel media world and honestly? she's doing the most with the least. this is v4l2_m2m_buf_copy_metadata, straight out of the Kernel API Manual, and she has exactly one job: take the metadata off your output buffer and hand it over to your capture buffer. that's it. that's the whole personality. πŸŽ€


✨ NAME ✨

v4l2_m2m_buf_copy_metadata β€” copies buffer metadata from the output buffer over to the capture buffer, no cap, that's literally the function 🫢


🌸 SYNOPSIS 🌸

void v4l2_m2m_buf_copy_metadata (const struct vb2_v4l2_buffer *out_vb ,
struct vb2_v4l2_buffer *cap_vb );

look at her. two pointers, void return, absolutely no drama. iconic πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • out_vb β€” the output buffer, aka the source of the metadata. she's the one doing the giving here, the main character of this little exchange πŸ‘‘
  • cap_vb β€” the capture buffer, aka the one that will receive the metadata. she shows up, hands empty, and leaves with the goods 🎁

πŸ’– DESCRIPTION πŸ’–

so here's the vibe check: this helper function copies the timestamp, the timecode (but only if the TIMECODE buffer flag was set, okay? only then, don't come for her), the field, and the TIMECODE and TSTAMP_SRC_MASK flags β€” all of it travelling from out_vb over to cap_vb. ✨

like, it's giving "passing the aux cord." out buffer had it, cap buffer gets it. simple, clean, effective. the way that she just does it with no fuss πŸ˜­πŸ’œ


🌈 SEE ALSO 🌈

okay this section is a whole friend group, so let's meet everybody 🫢. first up, the kernel file itself:

./include/media/v4l2-mem2mem.h

and now the entire squad, in order, no one left behind (i would never πŸ™ˆ):

that's fifty-something functions and structs and every single one of them is invited to the group chat, i checked twice πŸ’€βœ¨


aaaaand that's the page!! πŸŽ€ okay so the source lives in ./include/media, this is the Kernel API Manual edition dated October 2026, all about v4l2_m2m_buf_copy_metadata(9) β€” mwah, go copy that metadata bestie, you're gonna slay πŸ’–πŸ¦‹β­

πŸ“¦ where this page comes from