Using device property

This commit is contained in:
Sergey Lapin
2021-03-31 22:44:57 +03:00
parent 17193163d8
commit e4f5f44f85
3 changed files with 19 additions and 4 deletions

View File

@@ -493,6 +493,10 @@ void set_camera_control(const char * conf_name, int control, int value)
g_print("configuring saturation = %d\n", value);
camera_control (cam_data->subdev_fd, V4L2_CID_SATURATION, VIDIOC_S_EXT_CTRLS, &value);
break;
case CONTROL_TEST_PATTERN:
g_print("configuring test pattern = %d\n", value);
camera_control (cam_data->subdev_fd, V4L2_CID_TEST_PATTERN, VIDIOC_S_EXT_CTRLS, &value);
break;
}
}
void gst_pinesrcbin_configure_device(GstPineSrcBin * self, const char *conf_name)
@@ -592,6 +596,7 @@ void gst_pinesrcbin_configure_device(GstPineSrcBin * self, const char *conf_name
camera_control (cam_data->subdev_fd, V4L2_CID_FOCUS_AUTO, VIDIOC_S_EXT_CTRLS, &enable);
}
setup_gain (cam_data->subdev_fd, &cam_data->gain_ctrl, &cam_data->gain_max);
self->test_pattern = 1;
camera_control (cam_data->subdev_fd, V4L2_CID_TEST_PATTERN, VIDIOC_S_EXT_CTRLS, &self->test_pattern);
{
int auto_gain = 1;