v4l2_try_ext_ctrls(9)
π v4l2_try_ext_ctrls(9) π
okay so welcome to the Kernel API Manual, bestie β this is the page for v4l2_try_ext_ctrls, and yes we're gonna get through it together, hand in hand π«Ά
β¨ NAME β¨
v4l2_try_ext_ctrls β the helper function that implements the :ref:VIDIOC_TRY_EXT_CTRLS <vidioc_g_ext_ctrls>`` ioctl. that's it, that's the job, and it does it slayfully π
πΈ SYNOPSIS πΈ
int v4l2_try_ext_ctrls (struct v4l2_ctrl_handler *hdl , struct
video_device *vdev , struct media_device *mdev , struct
v4l2_ext_controls *c );
like, four arguments, one int coming back. no cap, that's the whole signature π
π ARGUMENTS π
hdlβ a pointer tostruct v4l2_ctrl_handler. the control handler in question, the main character of this whole situation β¨vdevβ a pointer tostruct video_device. your video device, showing up to the group chat π¦mdevβ a pointer tostruct media_device. the media device, also invited πcβ a pointer tostruct v4l2_ext_controls. the extended controls struct, holding all the actual control vibes π
π₯ DESCRIPTION π₯
so here's the one (1) behavioural fact on this page and honestly it's giving plot twist: if hdl == NULL then they will all return -EINVAL. that's the rule, that's the whole rule, and it's not negotiable ngl. no handler, no dice, error out with -EINVAL π
π¦ SEE ALSO π¦
the kernel file in question is ./include/media/v4l2-ctrls.h β go read it, it's iconic π. and now for the extended friend group, in the exact order they were introduced:
union v4l2_ctrl_ptr(9)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_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. seventy-six of them. we ate that list fr fr π
π‘ friendly reminder bestie: the only behaviour documented on this page is thathdl == NULLmakes them all return-EINVAL. don't go inventing extra lore, iykyk π
and that's the page!! mwah π this gem lives in the source dir ./include/media, and it's dated October 2026 β so yeah, she's from the future, main character energy only ππ bye bestie, go write some slay control code π§β¨
π¦ 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