v4l2_m2m_ctx_init(9)
β¨ v4l2_m2m_ctx_init β¨
okay bestie, so this one's from the Kernel API Manual and it's literally all about v4l2_m2m_ctx_init β the little function that allocates and initializes a m2m context for you π
no cap
πΈ NAME πΈ
v4l2_m2m_ctx_init β allocate and initialize a m2m context π
π¦ SYNOPSIS π¦
struct v4l2_m2m_ctx * v4l2_m2m_ctx_init (struct v4l2_m2m_dev *m2m_dev ,
void *drv_priv , int (*queue_init)(void *priv, struct vb2_queue *src_vq,
struct vb2_queue *dst_vq) );
π ARGUMENTS π
m2m_devβ an opaque pointer to the internal data that handles the M2M context. it's giving "you don't need to know what's inside, just pass it along" energy πdrv_privβ the driver's instance private data, aka your driver's own little stash of personal info π«Άqueue_initβ a callback for the queue type-specific initialization function, the one you use for initializingvb2_queues. it's literally the function that gets your queues all set up β¨
π DESCRIPTION π
Usually called from the driver's open function. that's it, that's the whole vibe β you're opening the device, you need a context, boom, this is your girl π
π SEE ALSO π
Kernel file ./include/media/v4l2-mem2mem.h, plus the whole squad of structs:
struct v4l2_m2m_ops(9)struct v4l2_m2m_queue_ctx(9)struct v4l2_m2m_ctx(9)struct v4l2_m2m_buffer(9)
and the friends, in order, no skips fr fr:
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_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_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 group chat, every single one of them π
mwah π this page lives in ./include/media and it's dated October 2026 β go off, future 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