STRUCT VB2_BUFFER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so this is struct vb2_buffer and it literally represents a video buffer. that's the whole vibe. it's from the Kernel API Manual, section 9, bestie β€” welcome to the videobuf2 cinematic universe πŸ’…


✨ SYNOPSIS ✨

here's the whole glow-up, verbatim, no edits, i promise:

struct vb2_buffer {
    struct vb2_queue        *vb2_queue;
    unsigned int            index;
    unsigned int            type;
    unsigned int            memory;
    unsigned int            num_planes;
    u64 timestamp;
    struct media_request    *request;
    struct media_request_object     req_obj;
 };

look at her. structure. icon. 🫢


🌸 MEMBERS 🌸

okay bestie, let's meet the cast. every single one, no skipping, this is not a drill:

  • vb2_queue β€” pointer to struct vb2_queue with the queue to which this driver belongs. it's giving "which friend group am i in" energy.
  • index β€” id number of the buffer. her little name tag πŸŽ€
  • type β€” buffer type.
  • memory β€” the method, in which the actual data is passed. yes, "the method, in which" β€” that's the original wording, i don't make the rules πŸ’€
  • num_planes β€” number of planes in the buffer on an internal driver queue. planes!!! like actual airplanes but for pixels ✈️
  • timestamp β€” frame timestamp in ns. nanoseconds, not vibes. very precise queen.
  • request β€” the request this buffer is associated with.
  • req_obj β€” used to bind this buffer to a request. this request object has a refcount. key detail!!! refcount = someone's keeping track, so don't go freeing things all willy-nilly πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

the extended universe, in the exact order the manpage gave it. also Kernel file ./include/media/videobuf2-core.h. here we go β€” deep breath β€” 🧚

enum vb2_memory(9), struct vb2_mem_ops(9), struct vb2_plane(9), enum vb2_io_modes(9), enum vb2_buffer_state(9), struct vb2_ops(9), struct vb2_buf_ops(9), struct vb2_queue(9), vb2_queue_allows_cache_hints(9), vb2_plane_vaddr(9), vb2_plane_cookie(9), vb2_buffer_done(9), vb2_discard_done(9), vb2_wait_for_all_buffers(9), vb2_core_querybuf(9), vb2_core_reqbufs(9), vb2_core_create_bufs(9), vb2_core_prepare_buf(9), vb2_core_remove_bufs(9), vb2_core_qbuf(9), vb2_core_dqbuf(9), vb2_core_streamon(9), vb2_core_streamoff(9), vb2_core_expbuf(9), vb2_core_queue_init(9), vb2_core_queue_release(9), vb2_queue_error(9), vb2_mmap(9), vb2_get_unmapped_area(9), vb2_core_poll(9), vb2_read(9), vb2_write(9), vb2_thread_fnc(9), vb2_thread_start(9), vb2_thread_stop(9), vb2_is_streaming(9), vb2_fileio_is_active(9), vb2_get_num_buffers(9), vb2_is_busy(9), vb2_get_drv_priv(9), vb2_set_plane_payload(9), vb2_get_plane_payload(9), vb2_plane_size(9), vb2_start_streaming_called(9), vb2_clear_last_buffer_dequeued(9), vb2_get_buffer(9), vb2_buffer_in_use(9), vb2_verify_memory_type(9), vb2_request_object_is_buffer(9), vb2_request_buffer_cnt(9)

like i said. extended universe. 49 entries and i counted them with my whole chest πŸ”₯


πŸ’œ sign-off πŸ’œ

that's the page, bestie! sourced from the Kernel file ./include/media and dated October 2026 β€” so she's fresh, she's current, she's era-defining. go forth and buffer responsibly. periodt. πŸ‘‘βœ¨

πŸ“¦ where this page comes from