v4l2_m2m_dqbuf(9)
π v4l2_m2m_dqbuf β the kernel API manual, bestie edition π
okay so. this is page v4l2_m2m_dqbuf(9) from the Kernel API Manual, and honestly? she's a little icon. sit down, hydrate, let's get into it β¨
πΈ NAME πΈ
v4l2_m2m_dqbuf β dequeue a source or destination buffer, depending on the type π
like, you literally just pull a buffer out of the queue, and which queue it comes from is entirely up to the type. she contains multitudes. no cap.
π¦ SYNOPSIS π¦
int v4l2_m2m_dqbuf (struct file *file , struct v4l2_m2m_ctx *m2m_ctx ,
struct v4l2_buffer *buf );
she takes three (3) things and returns an int. that's the whole vibe. periodt.
β¨ ARGUMENTS β¨
fileβ pointer tostruct file. yes bestie, the file. the whole struct. πm2m_ctxβ the m2m context assigned to the instance, given bystruct v4l2_m2m_ctx. this is her main character energy β everything lives in here. πbufβ pointer tostruct v4l2_buffer. this is where the dequeued buffer info goes, so likeβ¦ don't hand her a NULL, okay? π
π₯ SEE ALSO π₯
so there are a LOT of siblings in this family and honestly they're all kind of iconic. first up, the kernel file where all the drama lives:
- Kernel file
./include/media/v4l2-mem2mem.h
then the structs:
struct v4l2_m2m_ops(9)struct v4l2_m2m_queue_ctx(9)struct v4l2_m2m_ctx(9)struct v4l2_m2m_buffer(9)
and then. okay. brace yourself. the full function roster π
v4l2_m2m_get_curr_priv(9)v4l2_m2m_get_vq(9)v4l2_m2m_try_schedule(9)v4l2_m2m_job_finish(9)v4l2_m2m_buf_done_and_job_finish(9)v4l2_m2m_clear_state(9)v4l2_m2m_mark_stopped(9)v4l2_m2m_dst_buf_is_last(9)v4l2_m2m_has_stopped(9)v4l2_m2m_is_last_draining_src_buf(9)v4l2_m2m_last_buffer_done(9)v4l2_m2m_suspend(9)v4l2_m2m_resume(9)v4l2_m2m_reqbufs(9)v4l2_m2m_querybuf(9)v4l2_m2m_qbuf(9)v4l2_m2m_prepare_buf(9)v4l2_m2m_create_bufs(9)v4l2_m2m_expbuf(9)v4l2_m2m_streamon(9)v4l2_m2m_streamoff(9)v4l2_m2m_update_start_streaming_state(9)v4l2_m2m_update_stop_streaming_state(9)v4l2_m2m_encoder_cmd(9)v4l2_m2m_decoder_cmd(9)v4l2_m2m_poll(9)v4l2_m2m_mmap(9)v4l2_m2m_init(9)v4l2_m2m_release(9)v4l2_m2m_get(9)v4l2_m2m_put(9)v4l2_m2m_ctx_init(9)v4l2_m2m_ctx_release(9)v4l2_m2m_buf_queue(9)v4l2_m2m_num_src_bufs_ready(9)v4l2_m2m_num_dst_bufs_ready(9)v4l2_m2m_next_buf(9)v4l2_m2m_next_src_buf(9)v4l2_m2m_next_dst_buf(9)v4l2_m2m_last_buf(9)v4l2_m2m_last_src_buf(9)v4l2_m2m_last_dst_buf(9)v4l2_m2m_for_each_dst_buf(9)v4l2_m2m_for_each_src_buf(9)v4l2_m2m_for_each_dst_buf_safe(9)v4l2_m2m_for_each_src_buf_safe(9)v4l2_m2m_get_src_vq(9)v4l2_m2m_get_dst_vq(9)v4l2_m2m_buf_remove(9)v4l2_m2m_src_buf_remove(9)v4l2_m2m_dst_buf_remove(9)v4l2_m2m_buf_remove_by_buf(9)v4l2_m2m_src_buf_remove_by_buf(9)v4l2_m2m_dst_buf_remove_by_buf(9)v4l2_m2m_buf_copy_metadata(9)
likeβ¦ that's the whole friend group. iykyk π«Ά
π real talk for a sec: this page gives you the name, the signature, the args and the see-also squad. it does not spell out return values, error codes or any extra behavior, so don't go inventing them, bestie. read the actual source before you ship. ngl that's just good practice.
πΈ cute lil sign-off time πΈ β this page lives in ./include/media, she's dated October 2026, and her manual identity is v4l2_m2m_dqbuf(9). mwah. go dequeue something gorgeous. π
ππ¦
π¦ 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