v4l2_m2m_get_vq(9)
π v4l2_m2m_get_vq β the Kernel API Manual, bestie edition π
okay so welcome to the v4l2_m2m_get_vq(9) page, straight out of the Kernel API Manual, and honestly? it's a short one, so we're just gonna vibe check it together π
β¨ NAME β¨
v4l2_m2m_get_vq β literally just returns the vb2_queue for whatever type you hand it. that's it. that's the whole function. iconic minimalism π
πΈ SYNOPSIS πΈ
struct vb2_queue * v4l2_m2m_get_vq (struct v4l2_m2m_ctx *m2m_ctx , enum
v4l2_buf_type type );
look at her. one pointer in, one pointer out. so clean π¦
π«Ά ARGUMENTS π«Ά
m2m_ctxβ the m2m context that's assigned to the instance, given to you as astruct v4l2_m2m_ctx. it's the whole situation, basically β¨typeβ the type of the V4L2 buffer, as defined byenum v4l2_buf_type. this is the one that decides which queue you get back, so likeβ¦ choose wisely bestie π
π DESCRIPTION π
okay so here's the tea: this function returns the capture queue when type is a capture type, and the output queue otherwise. no in-between, no third option, just vibes and a binary decision π
and the detail that makes me feral? it never returns a NULL pointer. not ever. not even once. no cap. so you can call it and just trust it, which frankly is more than I can say for most things ππ₯
lowkey the nicest guarantee in the whole header file. a NULL-free queen π
π SEE ALSO π
everything else in the family, because we're all connected fr fr. the kernel file is ./include/media/v4l2-mem2mem.h and here's every single sibling π
struct v4l2_m2m_ops(9)struct v4l2_m2m_queue_ctx(9)struct v4l2_m2m_ctx(9)struct v4l2_m2m_buffer(9)v4l2_m2m_get_curr_priv(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_dqbuf(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 I said. the whole friend group π§π
and that's the page!! sourced from ./include/media, dated October 2026 β so mark your calendars and go get that queue bestie πβ¨ mwah π
π¦ 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