Commit bc40d784 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Retrieve current value of V4L2 64-bits control

parent 895e45bd
......@@ -494,6 +494,22 @@ static vlc_v4l2_ctrl_t *ControlAddInteger64 (vlc_object_t *obj, int fd,
return NULL;
}
struct v4l2_ext_control ext_ctrl = { .id = c->id, .size = 0, };
struct v4l2_ext_controls ext_ctrls = {
.ctrl_class = V4L2_CTRL_ID2CLASS(c->id),
.count = 1,
.error_idx = 0,
.controls = &ext_ctrl,
};
if (v4l2_ioctl (c->fd, VIDIOC_G_EXT_CTRLS, &ext_ctrls) >= 0)
{
vlc_value_t val = { .i_int = ext_ctrl.value64 };
msg_Dbg (obj, " current: %"PRId64, val.i_int);
var_Change (obj, c->name, VLC_VAR_SETVALUE, &val, NULL);
}
return c;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment