|
@@ -220,8 +220,12 @@ start_focus()
|
|
|
focus_continuous_task = mp_camera_control_set_bool_bg(
|
|
|
mpcamera, &state_io.focus.control, 1);
|
|
|
} else if (state_io.can_af_trigger) {
|
|
|
+ // TODO improve
|
|
|
+ MPControl auto_focus_start_control;
|
|
|
+ auto_focus_start_control.id = V4L2_CID_AUTO_FOCUS_START;
|
|
|
+ auto_focus_start_control.fd = state_io.camera->sensor_fd;
|
|
|
start_focus_task = mp_camera_control_set_bool_bg(
|
|
|
- mpcamera, V4L2_CID_AUTO_FOCUS_START, 1);
|
|
|
+ mpcamera, &auto_focus_start_control, 1);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -413,6 +417,7 @@ on_frame(MPBuffer buffer, void *_data)
|
|
|
static void
|
|
|
init_controls()
|
|
|
{
|
|
|
+ MPControl focus_control;
|
|
|
if (mp_camera_query_control(
|
|
|
state_io.camera->sensor_fd, V4L2_CID_FOCUS_ABSOLUTE, &focus_control)) {
|
|
|
state_io.focus.control = focus_control;
|