vb2_expbuf(9)
π 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 tostruct vb2_queuewith 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'sv4l2_ioctl_ops->vidioc_expbufhandler. 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:
struct vb2_v4l2_buffer(9)vb2_find_buffer(9)vb2_querybuf(9)vb2_reqbufs(9)vb2_create_bufs(9)vb2_prepare_buf(9)vb2_qbuf(9)vb2_dqbuf(9)vb2_streamon(9)vb2_streamoff(9)vb2_queue_init(9)vb2_queue_init_name(9)vb2_queue_release(9)vb2_queue_change_type(9)vb2_poll(9)vb2_queue_is_busy(9)vb2_video_unregister_device(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms