UNION V4L2_CTRL_PTR(9)
π union v4l2_ctrl_ptr β a pointer to a control value
okay bestie, welcome to the Kernel API Manual β¨ this one is genuinely so satisfying to look at, because it's just... one union that can point at literally everything a V4L2 control could possibly hold. it's giving "one bag, infinite outfits" π
πΈ NAME
union v4l2_ctrl_ptr β a pointer to a control value, periodt π
β¨ SYNOPSIS
union v4l2_ctrl_ptr {
s32 *p_s32;
s64 *p_s64;
u8 *p_u8;
u16 *p_u16;
u32 *p_u32;
char *p_char;
struct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence;
struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;
struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation;
struct v4l2_ctrl_fwht_params *p_fwht_params;
struct v4l2_ctrl_h264_sps *p_h264_sps;
struct v4l2_ctrl_h264_pps *p_h264_pps;
struct v4l2_ctrl_h264_scaling_matrix *p_h264_scaling_matrix;
struct v4l2_ctrl_h264_slice_params *p_h264_slice_params;
struct v4l2_ctrl_h264_decode_params *p_h264_decode_params;
struct v4l2_ctrl_h264_pred_weights *p_h264_pred_weights;
struct v4l2_ctrl_vp8_frame *p_vp8_frame;
struct v4l2_ctrl_hevc_sps *p_hevc_sps;
struct v4l2_ctrl_hevc_pps *p_hevc_pps;
struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params;
struct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;
struct v4l2_ctrl_vp9_frame *p_vp9_frame;
struct v4l2_ctrl_hdr10_cll_info *p_hdr10_cll;
struct v4l2_ctrl_hdr10_mastering_display *p_hdr10_mastering;
struct v4l2_area *p_area;
struct v4l2_ctrl_av1_sequence *p_av1_sequence;
struct v4l2_ctrl_av1_tile_group_entry *p_av1_tile_group_entry;
struct v4l2_ctrl_av1_frame *p_av1_frame;
struct v4l2_ctrl_av1_film_grain *p_av1_film_grain;
struct v4l2_rect *p_rect;
void *p;
const void *p_const;
};
likeβ¦ look at her. 32 members, all chillin' in one union, zero drama (as long as you only use one at a time, iykyk π).
π¦ Members
π the little scalar girlies
p_s32β pointer to a 32-bit signed value.p_s64β pointer to a 64-bit signed value.p_u8β pointer to a 8-bit unsigned value.p_u16β pointer to a 16-bit unsigned value.p_u32β pointer to a 32-bit unsigned value.p_charβ pointer to a string. yes she's a char pointer, she's classy like that π
π MPEG2 + FWHT era
p_mpeg2_sequenceβ pointer to a MPEG2 sequence structure.p_mpeg2_pictureβ pointer to a MPEG2 picture structure.p_mpeg2_quantisationβ pointer to a MPEG2 quantisation data structure.p_fwht_paramsβ pointer to a FWHT stateless parameters structure.
π₯ H.264 squad (six of them, she's thorough)
p_h264_spsβ pointer to astruct v4l2_ctrl_h264_sps.p_h264_ppsβ pointer to astruct v4l2_ctrl_h264_pps.p_h264_scaling_matrixβ pointer to astruct v4l2_ctrl_h264_scaling_matrix.p_h264_slice_paramsβ pointer to astruct v4l2_ctrl_h264_slice_params.p_h264_decode_paramsβ pointer to astruct v4l2_ctrl_h264_decode_params.p_h264_pred_weightsβ pointer to astruct v4l2_ctrl_h264_pred_weights.
π VP8 says hi once
p_vp8_frameβ pointer to a VP8 frame params structure.
π§ HEVC trio
p_hevc_spsβ pointer to an HEVC sequence parameter set structure.p_hevc_ppsβ pointer to an HEVC picture parameter set structure.p_hevc_slice_paramsβ pointer to an HEVC slice parameters structure.
π VP9 duo
p_vp9_compressed_hdr_probsβ pointer to a VP9 frame compressed header probs structure.p_vp9_frameβ pointer to a VP9 frame params structure.
β HDR10 glow-up
p_hdr10_cllβ pointer to an HDR10 Content Light Level structure.p_hdr10_masteringβ pointer to an HDR10 Mastering Display structure.
πΈ geometry moment
p_areaβ pointer to an area.
π AV1 besties
p_av1_sequenceβ pointer to an AV1 sequence structure.p_av1_tile_group_entryβ pointer to an AV1 tile group entry structure.p_av1_frameβ pointer to an AV1 frame structure.p_av1_film_grainβ pointer to an AV1 film grain structure.
π«Ά and the catch-alls
p_rectβ pointer to a rectangle.pβ pointer to a compound value.p_constβ pointer to a constant compound value. (const-correct queen π)
π SEE ALSO
okay this list is LONG and honestly iconic, buckle up:
kernel file ./include/media/v4l2-ctrls.h, v4l2_ctrl_ptr_create(9), struct v4l2_ctrl_ops(9), struct v4l2_ctrl_type_ops(9), v4l2_ctrl_notify_fnc(9), struct v4l2_ctrl(9), struct v4l2_ctrl_ref(9), struct v4l2_ctrl_handler(9), struct v4l2_ctrl_config(9), v4l2_ctrl_fill(9), v4l2_ctrl_handler_init_class(9), v4l2_ctrl_handler_init(9), v4l2_ctrl_handler_free(9), v4l2_ctrl_lock(9), v4l2_ctrl_unlock(9), __v4l2_ctrl_handler_setup(9), v4l2_ctrl_handler_setup(9), v4l2_ctrl_handler_log_status(9), v4l2_ctrl_new_custom(9), v4l2_ctrl_new_std(9), v4l2_ctrl_new_std_menu(9), v4l2_ctrl_new_std_menu_items(9), v4l2_ctrl_new_std_compound(9), v4l2_ctrl_new_int_menu(9), v4l2_ctrl_filter(9), v4l2_ctrl_add_handler(9), v4l2_ctrl_radio_filter(9), v4l2_ctrl_cluster(9), v4l2_ctrl_auto_cluster(9), v4l2_ctrl_find(9), v4l2_ctrl_activate(9), __v4l2_ctrl_grab(9), v4l2_ctrl_grab(9), __v4l2_ctrl_modify_range(9), v4l2_ctrl_modify_range(9), __v4l2_ctrl_modify_dimensions(9), v4l2_ctrl_modify_dimensions(9), v4l2_ctrl_notify(9), v4l2_ctrl_get_name(9), v4l2_ctrl_get_menu(9), v4l2_ctrl_get_int_menu(9), v4l2_ctrl_g_ctrl(9), __v4l2_ctrl_s_ctrl(9), v4l2_ctrl_s_ctrl(9), v4l2_ctrl_g_ctrl_int64(9), __v4l2_ctrl_s_ctrl_int64(9), v4l2_ctrl_s_ctrl_int64(9), __v4l2_ctrl_s_ctrl_string(9), v4l2_ctrl_s_ctrl_string(9), __v4l2_ctrl_s_ctrl_compound(9), v4l2_ctrl_s_ctrl_compound(9), v4l2_ctrl_replace(9), v4l2_ctrl_merge(9), v4l2_ctrl_log_status(9), v4l2_ctrl_subscribe_event(9), v4l2_ctrl_poll(9), v4l2_ctrl_request_setup(9), v4l2_ctrl_request_complete(9), v4l2_ctrl_request_hdl_find(9), v4l2_ctrl_request_hdl_put(9), v4l2_ctrl_request_hdl_ctrl_find(9), v4l2_queryctrl(9), v4l2_query_ext_ctrl_to_v4l2_queryctrl(9), v4l2_query_ext_ctrl(9), v4l2_querymenu(9), v4l2_g_ctrl(9), v4l2_s_ctrl(9), v4l2_g_ext_ctrls(9), v4l2_try_ext_ctrls(9), v4l2_s_ext_ctrls(9), v4l2_ctrl_subdev_subscribe_event(9), v4l2_ctrl_subdev_log_status(9), v4l2_ctrl_new_fwnode_properties(9), v4l2_ctrl_type_op_equal(9), v4l2_ctrl_type_op_init(9), v4l2_ctrl_type_op_log(9), v4l2_ctrl_type_op_validate(9)
like I said. LONG. but every single one of them ate π
ngl, this page lives in ./include/media, dated October 2026 β that's the source and the version, bestie, and that's the whole manual page π mwah, go point at some control values responsibly β¨π
π¦ 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