vb2_expbuf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vb2_expbuf β€” it's a whole kernel API manual moment

Okay bestie, so we're in vb2_expbuf(9) territory β€” section 9, Kernel API Manual, that's the kernel-internals girlies. And the name literally tells you everything: vb2_expbuf β€” Export a buffer as a file descriptor. Iconic, honestly. πŸ¦‹


✨ NAME ✨

vb2_expbuf β€” export a buffer as a file descriptor. That's the whole vibe. One job, does it, periodt. πŸ’–


🌸 SYNOPSIS 🌸

int vb2_expbuf (struct vb2_queue *q , struct v4l2_exportbuffer *eb );

Copy it exactly like that, spacing and all β€” no cap, this is the real signature, not me being quirky. πŸŽ€


🧚 ARGUMENTS 🧚

  • q β€” pointer to struct vb2_queue with the videobuf2 queue. Like, this is the queue, the main character of the whole operation. πŸ‘‘
  • eb β€” the export buffer structure, passed from userspace into your driver's v4l2_ioctl_ops->vidioc_expbuf handler. So userspace hands it over, your handler catches it, and here we are. 🫢

πŸ’œ DESCRIPTION πŸ’œ

Okay so the important lore: the return values from this function are intended to be directly returned from the v4l2_ioctl_ops->vidioc_expbuf handler in your driver.

No wrapping, no remixing, no "let me translate this error code into my own special little guy" β€” you just hand it straight back up. That's the whole design. Slay. ✨

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/media/videobuf2-v4l2.h, plus the whole friend group β€” struct vb2_v4l2_buffer(9) and the rest of the vb2 girlies:

All seventeen of them, bestie. I counted. Not one skipped. πŸ’…


🌈 the sign-off 🌈

That's the whole page, fr fr β€” and it lives at ./include/media, dated October 2026, under the title vb2_expbuf(9). Go export those buffers, you absolute icon. πŸ“πŸ’–β­

πŸ“¦ where this page comes from