STRUCT V4L2_IOCTL_OPS(9)
π struct v4l2_ioctl_ops(9) π
okay so bestie, welcome to the Kernel API Manual, section 9 β pull up a chair, we're doing kernel structs today and honestly? it's giving main character energy π
β¨ NAME β¨
struct v4l2_ioctl_opsβ describe operations for each V4L2 ioctl
literally that's the whole vibe: this struct is where you describe what happens when someone hits a V4L2 ioctl on your driver. every ioctl gets its own little operation slot in here, and the kernel comes knocking. no cap π«Ά
more coming in the next part, don't go anywhere π¦
β¨ SYNOPSIS β¨
okay bestie, deep breath, hydrate, sit down π β because this is the whole struct, every single member, and we are not skipping a one of them. It's giving "long but iconic". Here it is, exactly as it lives, no edits, no vibes-based trimming, periodt:
struct v4l2_ioctl_ops {
int (*vidioc_querycap)(struct file *file, void *priv, struct
v4l2_capability *cap);
int (*vidioc_enum_fmt_vid_cap)(struct file *file, void *priv, struct
v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_vid_overlay)(struct file *file, void *priv,
struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_vid_out)(struct file *file, void *priv, struct
v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_sdr_cap)(struct file *file, void *priv, struct
v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_sdr_out)(struct file *file, void *priv, struct
v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_meta_cap)(struct file *file, void *priv,
struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_meta_out)(struct file *file, void *priv,
struct v4l2_fmtdesc *f);
int (*vidioc_g_fmt_vid_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_g_fmt_vid_overlay)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_g_fmt_vid_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_g_fmt_vid_out_overlay)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_g_fmt_vbi_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_g_fmt_vbi_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_g_fmt_sliced_vbi_cap)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_g_fmt_vid_cap_mplane)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_g_fmt_vid_out_mplane)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_g_fmt_sdr_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_g_fmt_sdr_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_g_fmt_meta_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_g_fmt_meta_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_s_fmt_vid_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_s_fmt_vid_overlay)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_s_fmt_vid_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_s_fmt_vid_out_overlay)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_s_fmt_vbi_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_s_fmt_vbi_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_s_fmt_sliced_vbi_cap)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_s_fmt_vid_cap_mplane)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_s_fmt_vid_out_mplane)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_s_fmt_sdr_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_s_fmt_sdr_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_s_fmt_meta_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_s_fmt_meta_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_try_fmt_vid_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_try_fmt_vid_overlay)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_try_fmt_vid_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_try_fmt_vid_out_overlay)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_try_fmt_vbi_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_try_fmt_vbi_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_try_fmt_sliced_vbi_cap)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_try_fmt_vid_cap_mplane)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_try_fmt_vid_out_mplane)(struct file *file, void *priv,
struct v4l2_format *f);
int (*vidioc_try_fmt_sdr_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_try_fmt_sdr_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_try_fmt_meta_cap)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_try_fmt_meta_out)(struct file *file, void *priv, struct
v4l2_format *f);
int (*vidioc_reqbufs)(struct file *file, void *priv, struct
v4l2_requestbuffers *b);
int (*vidioc_querybuf)(struct file *file, void *priv, struct
v4l2_buffer *b);
int (*vidioc_qbuf)(struct file *file, void *priv, struct v4l2_buffer
*b);
int (*vidioc_expbuf)(struct file *file, void *priv, struct
v4l2_exportbuffer *e);
int (*vidioc_dqbuf)(struct file *file, void *priv, struct
v4l2_buffer *b);
int (*vidioc_create_bufs)(struct file *file, void *priv, struct
v4l2_create_buffers *b);
int (*vidioc_prepare_buf)(struct file *file, void *priv, struct
v4l2_buffer *b);
int (*vidioc_remove_bufs)(struct file *file, void *priv, struct
v4l2_remove_buffers *d);
int (*vidioc_overlay)(struct file *file, void *priv, unsigned int
i);
int (*vidioc_g_fbuf)(struct file *file, void *priv, struct
v4l2_framebuffer *a);
int (*vidioc_s_fbuf)(struct file *file, void *priv, const struct
v4l2_framebuffer *a);
int (*vidioc_streamon)(struct file *file, void *priv, enum
v4l2_buf_type i);
int (*vidioc_streamoff)(struct file *file, void *priv, enum
v4l2_buf_type i);
int (*vidioc_g_std)(struct file *file, void *priv, v4l2_std_id
*norm);
int (*vidioc_s_std)(struct file *file, void *priv, v4l2_std_id
norm);
int (*vidioc_querystd)(struct file *file, void *priv, v4l2_std_id
*a);
int (*vidioc_enum_input)(struct file *file, void *priv, struct
v4l2_input *inp);
int (*vidioc_g_input)(struct file *file, void *priv, unsigned int
*i);
int (*vidioc_s_input)(struct file *file, void *priv, unsigned int
i);
int (*vidioc_enum_output)(struct file *file, void *priv, struct
v4l2_output *a);
int (*vidioc_g_output)(struct file *file, void *priv, unsigned int
*i);
int (*vidioc_s_output)(struct file *file, void *priv, unsigned int
i);
int (*vidioc_query_ext_ctrl)(struct file *file, void *priv, struct
v4l2_query_ext_ctrl *a);
int (*vidioc_g_ext_ctrls)(struct file *file, void *priv, struct
v4l2_ext_controls *a);
int (*vidioc_s_ext_ctrls)(struct file *file, void *priv, struct
v4l2_ext_controls *a);
int (*vidioc_try_ext_ctrls)(struct file *file, void *priv, struct
v4l2_ext_controls *a);
int (*vidioc_querymenu)(struct file *file, void *priv, struct
v4l2_querymenu *a);
int (*vidioc_enumaudio)(struct file *file, void *priv, struct
v4l2_audio *a);
int (*vidioc_g_audio)(struct file *file, void *priv, struct
v4l2_audio *a);
int (*vidioc_s_audio)(struct file *file, void *priv, const struct
v4l2_audio *a);
int (*vidioc_enumaudout)(struct file *file, void *priv, struct
v4l2_audioout *a);
int (*vidioc_g_audout)(struct file *file, void *priv, struct
v4l2_audioout *a);
int (*vidioc_s_audout)(struct file *file, void *priv, const struct
v4l2_audioout *a);
int (*vidioc_g_modulator)(struct file *file, void *priv, struct
v4l2_modulator *a);
int (*vidioc_s_modulator)(struct file *file, void *priv, const
struct v4l2_modulator *a);
int (*vidioc_g_pixelaspect)(struct file *file, void *priv, int
buf_type, struct v4l2_fract *aspect);
int (*vidioc_g_selection)(struct file *file, void *priv, struct
v4l2_selection *s);
int (*vidioc_s_selection)(struct file *file, void *priv, struct
v4l2_selection *s);
int (*vidioc_g_jpegcomp)(struct file *file, void *priv, struct
v4l2_jpegcompression *a);
int (*vidioc_s_jpegcomp)(struct file *file, void *priv, const struct
v4l2_jpegcompression *a);
int (*vidioc_g_enc_index)(struct file *file, void *priv, struct
v4l2_enc_idx *a);
int (*vidioc_encoder_cmd)(struct file *file, void *priv, struct
v4l2_encoder_cmd *a);
int (*vidioc_try_encoder_cmd)(struct file *file, void *priv, struct
v4l2_encoder_cmd *a);
int (*vidioc_decoder_cmd)(struct file *file, void *priv, struct
v4l2_decoder_cmd *a);
int (*vidioc_try_decoder_cmd)(struct file *file, void *priv, struct
v4l2_decoder_cmd *a);
int (*vidioc_g_parm)(struct file *file, void *priv, struct
v4l2_streamparm *a);
int (*vidioc_s_parm)(struct file *file, void *priv, struct
v4l2_streamparm *a);
int (*vidioc_g_tuner)(struct file *file, void *priv, struct
v4l2_tuner *a);
int (*vidioc_s_tuner)(struct file *file, void *priv, const struct
v4l2_tuner *a);
int (*vidioc_g_frequency)(struct file *file, void *priv, struct
v4l2_frequency *a);
int (*vidioc_s_frequency)(struct file *file, void *priv, const
struct v4l2_frequency *a);
int (*vidioc_enum_freq_bands)(struct file *file, void *priv, struct
v4l2_frequency_band *band);
int (*vidioc_g_sliced_vbi_cap)(struct file *file, void *priv, struct
v4l2_sliced_vbi_cap *a);
int (*vidioc_log_status)(struct file *file, void *priv);
int (*vidioc_s_hw_freq_seek)(struct file *file, void *priv, const
struct v4l2_hw_freq_seek *a);
#ifdef CONFIG_VIDEO_ADV_DEBUG;
int (*vidioc_g_register)(struct file *file, void *priv, struct
v4l2_dbg_register *reg);
int (*vidioc_s_register)(struct file *file, void *priv, const struct
v4l2_dbg_register *reg);
int (*vidioc_g_chip_info)(struct file *file, void *priv, struct
v4l2_dbg_chip_info *chip);
#endif;
int (*vidioc_enum_framesizes)(struct file *file, void *priv, struct
v4l2_frmsizeenum *fsize);
int (*vidioc_enum_frameintervals)(struct file *file, void *priv,
struct v4l2_frmivalenum *fival);
int (*vidioc_s_dv_timings)(struct file *file, void *priv, struct
v4l2_dv_timings *timings);
int (*vidioc_g_dv_timings)(struct file *file, void *priv, struct
v4l2_dv_timings *timings);
int (*vidioc_query_dv_timings)(struct file *file, void *priv, struct
v4l2_dv_timings *timings);
int (*vidioc_enum_dv_timings)(struct file *file, void *priv, struct
v4l2_enum_dv_timings *timings);
int (*vidioc_dv_timings_cap)(struct file *file, void *priv, struct
v4l2_dv_timings_cap *cap);
okay so. that was a lot. let's vibe-check what you just scrolled past π«Ά
every single member is a function pointer starting with vidioc_, and like, almost all of them open with the same two args β struct file *file, void *priv β and then a pointer to whatever struct that ioctl is about. consistency is lowkey the moment here β¨
here's the family tree, so you don't get lost in the sauce:
vidioc_querycapβ the one that doesn't follow the crowd: it takesstruct v4l2_capability *cap.- the
vidioc_enum_fmt_*girlies βvid_cap,vid_overlay,vid_out,sdr_cap,sdr_out,meta_cap,meta_outβ all takingstruct v4l2_fmtdesc *f. - the big
vidioc_g_fmt_*/vidioc_s_fmt_*/vidioc_try_fmt_*trios, all takingstruct v4l2_format *f. and bestie there are so many variants:vid_cap,vid_overlay,vid_out,vid_out_overlay,vbi_cap,vbi_out,sliced_vbi_cap,sliced_vbi_out,vid_cap_mplane,vid_out_mplane,sdr_cap,sdr_out,meta_cap,meta_out. yes. all three prefixes. all fourteen flavors. we chew π - the buffer squad β
vidioc_reqbufs(struct v4l2_requestbuffers *b),vidioc_querybuf(struct v4l2_buffer *b),vidioc_qbuf(struct v4l2_buffer *b),vidioc_expbuf(struct v4l2_exportbuffer *e),vidioc_dqbuf(struct v4l2_buffer *b),vidioc_create_bufs(struct v4l2_create_buffers *b),vidioc_prepare_buf(struct v4l2_buffer *b), andvidioc_remove_bufs(struct v4l2_remove_buffers *dβ note the*d, she's different π ). vidioc_overlaytakingunsigned int i, plusvidioc_g_fbuf(struct v4l2_framebuffer *a) andvidioc_s_fbuf(const struct v4l2_framebuffer *a).- streaming:
vidioc_streamonandvidioc_streamoff, bothenum v4l2_buf_type i. - standards:
vidioc_g_std(v4l2_std_id *norm),vidioc_s_std(v4l2_std_id norm),vidioc_querystd(v4l2_std_id *a). - inputs and outputs:
vidioc_enum_input(struct v4l2_input *inp),vidioc_g_input/vidioc_s_input(unsigned int *i/unsigned int i), and the matchingvidioc_enum_output(struct v4l2_output *a),vidioc_g_output/vidioc_s_output(unsigned int *i/unsigned int i). - controls:
vidioc_query_ext_ctrl(struct v4l2_query_ext_ctrl *a),vidioc_g_ext_ctrls,vidioc_s_ext_ctrls,vidioc_try_ext_ctrls(allstruct v4l2_ext_controls *a), andvidioc_querymenu(struct v4l2_querymenu *a). - audio:
vidioc_enumaudio,vidioc_g_audio,vidioc_s_audio(that last oneconst struct v4l2_audio *a), thenvidioc_enumaudout,vidioc_g_audout,vidioc_s_audout(const struct v4l2_audioout *a). vidioc_g_modulator(struct v4l2_modulator *a) andvidioc_s_modulator(const struct v4l2_modulator *a).vidioc_g_pixelaspectβ the iconique one takingint buf_type, struct v4l2_fract *aspect.vidioc_g_selection/vidioc_s_selection, bothstruct v4l2_selection *s.vidioc_g_jpegcomp(struct v4l2_jpegcompression *a) /vidioc_s_jpegcomp(const struct v4l2_jpegcompression *a), andvidioc_g_enc_index(struct v4l2_enc_idx *a).- encoder/decoder cmd quartet:
vidioc_encoder_cmd,vidioc_try_encoder_cmd(bothstruct v4l2_encoder_cmd *a),vidioc_decoder_cmd,vidioc_try_decoder_cmd(bothstruct v4l2_decoder_cmd *a). - params:
vidioc_g_parm/vidioc_s_parm, bothstruct v4l2_streamparm *a. - tuner + frequency block:
vidioc_g_tuner(struct v4l2_tuner *a),vidioc_s_tuner(const struct v4l2_tuner *a),vidioc_g_frequency(struct v4l2_frequency *a),vidioc_s_frequency(const struct v4l2_frequency *a),vidioc_enum_freq_bands(struct v4l2_frequency_band *band). vidioc_g_sliced_vbi_cap(struct v4l2_sliced_vbi_cap *a), andvidioc_log_statusβ the minimalist queen, she takes onlystruct file *file, void *privand nothing else πvidioc_s_hw_freq_seek(const struct v4l2_hw_freq_seek *a).
and then, tucked in the middle, the debug block:#ifdef CONFIG_VIDEO_ADV_DEBUG;withvidioc_g_register(struct v4l2_dbg_register *reg),vidioc_s_register(const struct v4l2_dbg_register *reg), andvidioc_g_chip_info(struct v4l2_dbg_chip_info *chip), closed by#endif;. those members only exist when that config is on, iykyk. (and yes, the semicolons after#ifdef/#endifare literally there in the page β I'm not touching them, don't come for me π)
and the grand finale, after the #endif;:
vidioc_enum_framesizes(struct v4l2_frmsizeenum *fsize)vidioc_enum_frameintervals(struct v4l2_frmivalenum *fival)vidioc_s_dv_timings,vidioc_g_dv_timings,vidioc_query_dv_timingsβ allstruct v4l2_dv_timings *timingsvidioc_enum_dv_timings(struct v4l2_enum_dv_timings *timings)vidioc_dv_timings_cap(struct v4l2_dv_timings_cap *cap)
ngl, reading that struct top to bottom is a whole cardio session π but that's the synopsis bestie, every pointer accounted for, no cap π₯
int (*vidioc_g_edid)(struct file *file, void *priv, struct v4l2_edid
*edid);
int (*vidioc_s_edid)(struct file *file, void *priv, struct v4l2_edid
*edid);
int (*vidioc_subscribe_event)(struct v4l2_fh *fh, const struct
v4l2_event_subscription *sub);
int (*vidioc_unsubscribe_event)(struct v4l2_fh *fh, const struct
v4l2_event_subscription *sub);
long (*vidioc_default)(struct file *file, void *priv, bool
valid_prio, unsigned int cmd, void *arg);
};
π Members π
okay so this is the whole roster, bestie β every single function pointer in the struct, what it's for, and which ioctl it's serving. π
tiny heads up on the formatting: where you see something likeVIDIOC_QUERYCAP(vidioc_querycap), the second bit is the doc reference target β same name as the ioctl's own section. Keeping both so you never get lost, bestie π«Ά
vidioc_querycapβ pointer to the function that implements theVIDIOC_QUERYCAP(vidioc_querycap) ioctl β¨vidioc_enum_fmt_vid_capβ pointer to the function that implements theVIDIOC_ENUM_FMT(vidioc_enum_fmt) ioctl logic for video capture in single and multi plane mode πvidioc_enum_fmt_vid_overlayβ pointer to the function that implements theVIDIOC_ENUM_FMT(vidioc_enum_fmt) ioctl logic for video overlayvidioc_enum_fmt_vid_outβ pointer to the function that implements theVIDIOC_ENUM_FMT(vidioc_enum_fmt) ioctl logic for video output in single and multi plane modevidioc_enum_fmt_sdr_capβ pointer to the function that implements theVIDIOC_ENUM_FMT(vidioc_enum_fmt) ioctl logic for Software Defined Radio capture π»vidioc_enum_fmt_sdr_outβ pointer to the function that implements theVIDIOC_ENUM_FMT(vidioc_enum_fmt) ioctl logic for Software Defined Radio outputvidioc_enum_fmt_meta_capβ pointer to the function that implements theVIDIOC_ENUM_FMT(vidioc_enum_fmt) ioctl logic for metadata capturevidioc_enum_fmt_meta_outβ pointer to the function that implements theVIDIOC_ENUM_FMT(vidioc_enum_fmt) ioctl logic for metadata output
πΈ the G_FMT girlies (get it? β¦get it? π)
vidioc_g_fmt_vid_capβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for video capture in single plane modevidioc_g_fmt_vid_overlayβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for video overlayvidioc_g_fmt_vid_outβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for video out in single plane modevidioc_g_fmt_vid_out_overlayβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for video overlay outputvidioc_g_fmt_vbi_capβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for raw VBI capturevidioc_g_fmt_vbi_outβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for raw VBI outputvidioc_g_fmt_sliced_vbi_capβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for sliced VBI capture πͺ (sliced, not spicy, it's a VBI thing)vidioc_g_fmt_sliced_vbi_outβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for sliced VBI outputvidioc_g_fmt_vid_cap_mplaneβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for video capture in multiple plane modevidioc_g_fmt_vid_out_mplaneβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for video out in multiplane plane mode π (yes, "multiplane plane" β that's literally what it says, don't come for me)vidioc_g_fmt_sdr_capβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for Software Defined Radio capturevidioc_g_fmt_sdr_outβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for Software Defined Radio outputvidioc_g_fmt_meta_capβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for metadata capturevidioc_g_fmt_meta_outβ pointer to the function that implements theVIDIOC_G_FMT(vidioc_g_fmt) ioctl logic for metadata output
π the S_FMT set (setting the vibe, literally)
vidioc_s_fmt_vid_capβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for video capture in single plane modevidioc_s_fmt_vid_overlayβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for video overlayvidioc_s_fmt_vid_outβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for video out in single plane modevidioc_s_fmt_vid_out_overlayβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for video overlay outputvidioc_s_fmt_vbi_capβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for raw VBI capturevidioc_s_fmt_vbi_outβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for raw VBI outputvidioc_s_fmt_sliced_vbi_capβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for sliced VBI capturevidioc_s_fmt_sliced_vbi_outβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for sliced VBI outputvidioc_s_fmt_vid_cap_mplaneβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for video capture in multiple plane modevidioc_s_fmt_vid_out_mplaneβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for video out in multiplane plane modevidioc_s_fmt_sdr_capβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for Software Defined Radio capturevidioc_s_fmt_sdr_outβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for Software Defined Radio outputvidioc_s_fmt_meta_capβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for metadata capturevidioc_s_fmt_meta_outβ pointer to the function that implements theVIDIOC_S_FMT(vidioc_g_fmt) ioctl logic for metadata output
π¦ the TRY_FMT crew (the "what if" girls, no commitment π)
vidioc_try_fmt_vid_capβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for video capture in single plane modevidioc_try_fmt_vid_overlayβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for video overlayvidioc_try_fmt_vid_outβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for video out in single plane modevidioc_try_fmt_vid_out_overlayβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for video overlay outputvidioc_try_fmt_vbi_capβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for raw VBI capturevidioc_try_fmt_vbi_outβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for raw VBI outputvidioc_try_fmt_sliced_vbi_capβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for sliced VBI capturevidioc_try_fmt_sliced_vbi_outβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for sliced VBI outputvidioc_try_fmt_vid_cap_mplaneβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for video capture in multiple plane modevidioc_try_fmt_vid_out_mplaneβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for video out in multiplane plane modevidioc_try_fmt_sdr_capβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for Software Defined Radio capturevidioc_try_fmt_sdr_outβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for Software Defined Radio outputvidioc_try_fmt_meta_capβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for metadata capturevidioc_try_fmt_meta_outβ pointer to the function that implements theVIDIOC_TRY_FMT(vidioc_g_fmt) ioctl logic for metadata output
π buffer business (the whole qbuf/dqbuf economy, iykyk)
vidioc_reqbufsβ pointer to the function that implements theVIDIOC_REQBUFS(vidioc_reqbufs) ioctlvidioc_querybufβ pointer to the function that implements theVIDIOC_QUERYBUF(vidioc_querybuf) ioctlvidioc_qbufβ pointer to the function that implements theVIDIOC_QBUF(vidioc_qbuf) ioctlvidioc_expbufβ pointer to the function that implements theVIDIOC_EXPBUF(vidioc_expbuf) ioctl π€vidioc_dqbufβ pointer to the function that implements theVIDIOC_DQBUF(vidioc_qbuf) ioctlvidioc_create_bufsβ pointer to the function that implements theVIDIOC_CREATE_BUFS(vidioc_create_bufs) ioctl β¨vidioc_prepare_bufβ pointer to the function that implements theVIDIOC_PREPARE_BUF(vidioc_prepare_buf) ioctlvidioc_remove_bufsβ pointer to the function that implements theVIDIOC_REMOVE_BUFS(vidioc_remove_bufs) ioctl ποΈ
π overlay & framebuffer icons
vidioc_overlayβ pointer to the function that implements theVIDIOC_OVERLAY(vidioc_overlay) ioctlvidioc_g_fbufβ pointer to the function that implements theVIDIOC_G_FBUF(vidioc_g_fbuf) ioctlvidioc_s_fbufβ pointer to the function that implements theVIDIOC_S_FBUF(vidioc_g_fbuf) ioctl
not me noticing thatvidioc_s_fbufpoints at thevidioc_g_fbufreference while the others point at their own β that's just how the page has it, so I'm passing it to you exactly as-is, bestie π
vidioc_streamonβ the pointer that runs theVIDIOC_STREAMONioctl, aka press play on the stream π₯vidioc_streamoffβ the pointer that runs theVIDIOC_STREAMOFFioctl, aka the stop button πvidioc_g_stdβ pointer to the function implementing theVIDIOC_G_STDioctlvidioc_s_stdβ pointer to the function implementing theVIDIOC_S_STDioctlvidioc_querystdβ pointer to the function implementing theVIDIOC_QUERYSTDioctlvidioc_enum_inputβ pointer to the function implementing theVIDIOC_ENUM_INPUTioctlvidioc_g_inputβ pointer to the function implementing theVIDIOC_G_INPUTioctlvidioc_s_inputβ pointer to the function implementing theVIDIOC_S_INPUTioctlvidioc_enum_outputβ pointer to the function implementing theVIDIOC_ENUM_OUTPUTioctlvidioc_g_outputβ pointer to the function implementing theVIDIOC_G_OUTPUTioctlvidioc_s_outputβ pointer to the function implementing theVIDIOC_S_OUTPUTioctlvidioc_query_ext_ctrlβ pointer to the function implementing theVIDIOC_QUERY_EXT_CTRLioctlvidioc_g_ext_ctrlsβ pointer to the function implementing theVIDIOC_G_EXT_CTRLSioctlvidioc_s_ext_ctrlsβ pointer to the function implementing theVIDIOC_S_EXT_CTRLSioctlvidioc_try_ext_ctrlsβ pointer to the function implementing theVIDIOC_TRY_EXT_CTRLSioctlvidioc_querymenuβ pointer to the function implementing theVIDIOC_QUERYMENUioctlvidioc_enumaudioβ pointer to the function implementing theVIDIOC_ENUMAUDIOioctlvidioc_g_audioβ pointer to the function implementing theVIDIOC_G_AUDIOioctlvidioc_s_audioβ pointer to the function implementing theVIDIOC_S_AUDIOioctlvidioc_enumaudoutβ pointer to the function implementing theVIDIOC_ENUMAUDOUTioctlvidioc_g_audoutβ pointer to the function implementing theVIDIOC_G_AUDOUTioctlvidioc_s_audoutβ pointer to the function implementing theVIDIOC_S_AUDOUTioctlvidioc_g_modulatorβ pointer to the function implementing theVIDIOC_G_MODULATORioctlvidioc_s_modulatorβ pointer to the function implementing theVIDIOC_S_MODULATORioctlvidioc_g_pixelaspectβ pointer to the function implementing the pixelaspect part of theVIDIOC_CROPCAPioctl β¨ (just that part, bestie, not the whole cropcap situation)vidioc_g_selectionβ pointer to the function implementing theVIDIOC_G_SELECTIONioctlvidioc_s_selectionβ pointer to the function implementing theVIDIOC_S_SELECTIONioctlvidioc_g_jpegcompβ pointer to the function implementing theVIDIOC_G_JPEGCOMPioctlvidioc_s_jpegcompβ pointer to the function implementing theVIDIOC_S_JPEGCOMPioctlvidioc_g_enc_indexβ pointer to the function implementing theVIDIOC_G_ENC_INDEXioctlvidioc_encoder_cmdβ pointer to the function implementing theVIDIOC_ENCODER_CMDioctlvidioc_try_encoder_cmdβ pointer to the function implementing theVIDIOC_TRY_ENCODER_CMDioctlvidioc_decoder_cmdβ pointer to the function implementing theVIDIOC_DECODER_CMDioctlvidioc_try_decoder_cmdβ pointer to the function implementing theVIDIOC_TRY_DECODER_CMDioctlvidioc_g_parmβ pointer to the function implementing theVIDIOC_G_PARMioctlvidioc_s_parmβ pointer to the function implementing theVIDIOC_S_PARMioctlvidioc_g_tunerβ pointer to the function implementing theVIDIOC_G_TUNERioctlvidioc_s_tunerβ pointer to the function implementing theVIDIOC_S_TUNERioctlvidioc_g_frequencyβ pointer to the function implementing theVIDIOC_G_FREQUENCYioctlvidioc_s_frequencyβ pointer to the function implementing theVIDIOC_S_FREQUENCYioctlvidioc_enum_freq_bandsβ pointer to the function implementing theVIDIOC_ENUM_FREQ_BANDSioctlvidioc_g_sliced_vbi_capβ pointer to the function implementing theVIDIOC_G_SLICED_VBI_CAPioctlvidioc_log_statusβ pointer to the function implementing theVIDIOC_LOG_STATUSioctlvidioc_s_hw_freq_seekβ pointer to the function implementing theVIDIOC_S_HW_FREQ_SEEKioctlvidioc_g_registerβ pointer to the function implementing theVIDIOC_DBG_G_REGISTERioctlvidioc_s_registerβ pointer to the function implementing theVIDIOC_DBG_S_REGISTERioctlvidioc_g_chip_infoβ pointer to the function implementing theVIDIOC_DBG_G_CHIP_INFOioctlvidioc_enum_framesizesβ pointer to the function implementing theVIDIOC_ENUM_FRAMESIZESioctlvidioc_enum_frameintervalsβ pointer to the function implementing theVIDIOC_ENUM_FRAMEINTERVALSioctlvidioc_s_dv_timingsβ pointer to the function implementing theVIDIOC_S_DV_TIMINGSioctlvidioc_g_dv_timingsβ pointer to the function implementing theVIDIOC_G_DV_TIMINGSioctlvidioc_query_dv_timingsβ pointer to the function implementing theVIDIOC_QUERY_DV_TIMINGSioctlvidioc_enum_dv_timingsβ pointer to the function implementing theVIDIOC_ENUM_DV_TIMINGSioctlvidioc_dv_timings_capβ pointer to the function implementing theVIDIOC_DV_TIMINGS_CAPioctlvidioc_g_edidβ pointer to the function implementing theVIDIOC_G_EDIDioctlvidioc_s_edidβ pointer to the function implementing theVIDIOC_S_EDIDioctlvidioc_subscribe_eventβ pointer to the function implementing theVIDIOC_SUBSCRIBE_EVENTioctlvidioc_unsubscribe_eventβ pointer to the function implementing theVIDIOC_UNSUBSCRIBE_EVENTioctlvidioc_defaultβ the catch-all pointer, pointed used to allow other ioctls π«Ά (yes, it's the "anything else? sure babe" slot)
π SEE ALSO π
Kernel file ./include/media/v4l2-ioctl.h, plus the whole friend group of related functions β go say hi π
v4l2_norm_to_name(9)v4l2_video_std_frame_period(9)v4l2_video_std_construct(9)v4l_video_std_enumstd(9)v4l_printk_ioctl(9)var v4l2_field_names(9)var v4l2_type_names(9)v4l2_compat_ioctl32(9)v4l2_kioctl(9)video_usercopy(9)video_ioctl2(9)
That's the whole struct, bestie β every single pointer accounted for, no cap π― 59 little function pointers and not one skipped. You ate that. π
And that's a wrap on struct v4l2_ioctl_ops(9)! This page lives in ./include/media, version is October 2026, and the footer calls it struct v4l2_ioctl_ops(9) β iconic, timeless, very demure. 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