ENUM VB2_BUFFER_STATE(9)
โจ enum vb2_buffer_state(9) โจ
okay so bestie, welcome to the enum vb2_buffer_state(9) page from the Kernel API Manual ๐ซถ This enum is literally about the current video buffer state โ thatโs the vibe, no cap ๐
๐ธ NAME ๐ธ
enum vb2_buffer_state โ current video buffer state. iconic enum behavior ๐
๐ SYNOPSIS ๐
okay so hereโs the enum in all its main-character glory โจ copy it exactly, bestie:
enum vb2_buffer_state {
VB2_BUF_STATE_DEQUEUED ,
VB2_BUF_STATE_IN_REQUEST ,
VB2_BUF_STATE_PREPARING ,
VB2_BUF_STATE_QUEUED ,
VB2_BUF_STATE_ACTIVE ,
VB2_BUF_STATE_DONE ,
VB2_BUF_STATE_ERROR
};
๐ Constants ๐
VB2_BUF_STATE_DEQUEUEDโ buffer under userspace control. yes bestie, userspace has the aux ๐ฎVB2_BUF_STATE_IN_REQUESTโ buffer is queued in media request. itโs in the request era ๐VB2_BUF_STATE_PREPARINGโ buffer is being prepared in videobuf2. backstage getting-ready energy ๐VB2_BUF_STATE_QUEUEDโ buffer queued in videobuf2, but not in driver. so close, yet so far ๐ญVB2_BUF_STATE_ACTIVEโ buffer queued in driver and possibly used in a hardware operation. hardware might be using it, highkey active ๐ฅVB2_BUF_STATE_DONEโ buffer returned from driver to videobuf2, but not yet dequeued to userspace. it came back but hasnโt been handed over yet ๐ซถVB2_BUF_STATE_ERRORโ same as above, but the operation on the buffer has ended with an error, which will be reported to the userspace when it is dequeued. oop ๐ญ error era, and userspace finds out on dequeue ๐
๐ SEE ALSO ๐
okay bestie, the whole videobuf2 friend group is here, and yes you need all of them ๐
Kernel file ./include/media/videobuf2-core.h is the spot:
enum vb2_memory(9)struct vb2_mem_ops(9)struct vb2_plane(9)enum vb2_io_modes(9)struct vb2_buffer(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)
okay bye bestie ๐ thatโs the whole page โ source: ./include/media, date: October 2026, from the Kernel API Manual. stay hydrated and may your buffers never error ๐ญ๐
๐ฆ 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