Allow to configure options
This commit is contained in:
17
hw/device.c
17
hw/device.c
@ -246,20 +246,3 @@ int device_set_fps(device_t *dev, int desired_fps)
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
int device_set_option(device_t *dev, const char *name, uint32_t id, int32_t value)
|
||||
{
|
||||
struct v4l2_control ctl = {0};
|
||||
|
||||
if (!dev) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ctl.id = id;
|
||||
ctl.value = value;
|
||||
E_LOG_DEBUG(dev, "Configuring option %s (%08x) = %d", name, id, value);
|
||||
E_XIOCTL(dev, dev->subdev_fd >= 0 ? dev->subdev_fd : dev->fd, VIDIOC_S_CTRL, &ctl, "Can't set option %s", name);
|
||||
return 0;
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user