V4L2 -- ioctl

ioctls 根据 determine_valid_ioctls() 函数,video rx 设备支持的 ioctl 有: VIDIOC_QUERYCAP // 要定义 ops->vidioc_querycap VIDIOC_G_PRIORITY VIDIOC_S_PRIORITY VIDIOC_G_FREQUENCY // ops->vidioc_g_frequency VIDIOC_S_FREQUENCY // ops->vidioc_s_frequency VIDIOC_LOG_STATUS // ops->vidioc_log_status VIDIOC_DQEVENT // ops->vidioc_subscribe_event VIDIOC_SUBSCRIBE_EVENT // ops->vidioc_subscribe_event VIDIOC_UNSUBSCRIBE_EVENT // ops->vidioc_unsubscribe_event 在定义了 vdev->ctrl_handler 的情况下: VIDIOC_QUERYCTRL // ops->vidioc_queryctrl VIDIOC_QUERY_EXT_CTRL // ops->vidioc_query_ext_ctrl VIDIOC_G_CTRL // ops->vidioc_g_ctrl || ops->vidioc_g_ext_ctrls VIDIOC_S_CTRL // ops->vidioc_s_ctrl || ops->vidioc_s_ext_ctrls VIDIOC_G_EXT_CTRLS // ops->vidioc_g_ext_ctrls VIDIOC_S_EXT_CTRLS // ops->vidioc_s_ext_ctrls VIDIOC_TRY_EXT_CTRLS // ops->vidioc_try_ext_ctrls VIDIOC_QUERYMENU // ops->vidioc_querymenu VIDIOC_ENUM_FMT // ops->vidioc_enum_fmt_vid_cap || ops->vidioc_enum_fmt_vid_overlay VIDIOC_G_FMT // vidioc_g_fmt_vid_cap || vidioc_g_fmt_vid_cap_mplane || vidioc_g_fmt_vid_overlay VIDIOC_S_FMT // 同上 VIDIOC_TRY_FMT // 同上 VIDIOC_OVERLAY VIDIOC_G_FBUF VIDIOC_S_FBUF VIDIOC_G_JPEGCOMP VIDIOC_S_JPEGCOMP VIDIOC_G_ENC_INDEX VIDIOC_ENCODER_CMD VIDIOC_TRY_ENCODER_CMD VIDIOC_DECODER_CMD VIDIOC_TRY_DECODER_CMD VIDIOC_ENUM_FRAMESIZES VIDIOC_ENUM_FRAMEINTERVALS VIDIOC_G_CROP // vidioc_g_selection VIDIOC_CROPCAP // // vidioc_g_selection VIDIOC_S_CROP // vidioc_s_selection VIDIOC_G_SELECTION VIDIOC_S_SELECTION VIDIOC_REQBUFS VIDIOC_QUERYBUF VIDIOC_QBUF VIDIOC_EXPBUF VIDIOC_DQBUF VIDIOC_CREATE_BUFS VIDIOC_PREPARE_BUF VIDIOC_STREAMON VIDIOC_STREAMOFF VIDIOC_ENUMSTD VIDIOC_S_STD VIDIOC_G_STD VIDIOC_QUERYSTD Video for Linux API static void rtsisp_hw_free_vreg(struct rtsisp_dev_info *dev_info) { struct rtsisp_hw *hw = dev_info->hw; struct rtsisp_dev_hw_info *hw_info = &hw->hw_info[dev_info->dev_id]; if (hw_info->vregs) { vfree(hw_info->vregs); hw_info->vregs = NULL; } if (hw->dev_num == 1 && hw->vregs_bitmap) { bitmap_free(hw->vregs_bitmap); hw->vregs_bitmap = NULL; } } 1....

2025-03-26 · 6 min