Hello,
I’m trying to control the behaviour of ov5640 driver based on V4L2 caps.
Available caps in the driver we are using are the following:
ov5640->saturation = v4l2_ctrl_new_std(&ov5640->ctrls, &ov5640_ctrl_ops, V4L2_CID_SATURATION, -4, 4, 1, 0); ov5640->hflip = v4l2_ctrl_new_std(&ov5640->ctrls, &ov5640_ctrl_ops, V4L2_CID_HFLIP, 0, 1, 1, 0); ov5640->vflip = v4l2_ctrl_new_std(&ov5640->ctrls, &ov5640_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0); ov5640->autogain = v4l2_ctrl_new_std(&ov5640->ctrls, &ov5640_ctrl_ops, V4L2_CID_AUTOGAIN, 0, 1, 1, 1); ov5640->autoexposure = v4l2_ctrl_new_std_menu(&ov5640->ctrls, &ov5640_ctrl_ops, V4L2_CID_EXPOSURE_AUTO, V4L2_EXPOSURE_MANUAL, 0, V4L2_EXPOSURE_AUTO); ov5640->awb = v4l2_ctrl_new_std(&ov5640->ctrls, &ov5640_ctrl_ops, V4L2_CID_AUTO_WHITE_BALANCE, 0, 1, 1, 1); ov5640->pattern = v4l2_ctrl_new_std_menu_items(&ov5640->ctrls, &ov5640_ctrl_ops, V4L2_CID_TEST_PATTERN, ARRAY_SIZE(ov5640_test_pattern_menu) - 1, 0, 0, ov5640_test_pattern_menu);
I tried for example to enable the test pattern (implies changing a single I2C register in the camera config).
I tried with following command line (I also tried many variations), using extra-controls as for v4l2h264enc:
gst-launch-1.0 v4l2src extra-controls="controls,test_pattern=2;" device=/dev/video0 num-buffers=1 ! 'video/xraw,format=UYVY,width=2592,height=1944,framerate=10/1' ! jpegenc ! filesink location=image01_5MP.jpg
Result is an image without the test pattern. So I’m obviously not controlling anything…
Any idea on how to make use of the V4L2_CID_* options?
At the end of the day I would like to be able to change things like AEC, AGC, …
Thanks in advance for your support!