public void SetControlValue(Control ctrl, int value) { v4l2_control cur = new v4l2_control(); cur.id = (uint)ctrl; cur.value = value; int ret = ioControl.SetControl(ref cur); if(ret < 0) { throw new Exception("VIDIOC_S_CTRL: " + ret.ToString()); } }
ioctl(int device, v4l2_operation request, ref v4l2_control argp);
public int GetControlValue(Control ctrl) { v4l2_control cur = new v4l2_control(); cur.id = (uint)ctrl; int ret = ioControl.GetControl(ref cur); if(ret < 0) { throw new Exception("VIDIOC_G_CTRL: " + ret.ToString()); } return cur.value; }
/// <summary> /// Calls VIDIOC_S_CTRL. /// </summary> public int SetControl(ref v4l2_control control) { return ioctl(deviceHandle, v4l2_operation.SetControl, ref control); }
public int SetControl(ref v4l2_control control) { return -1; // FIXME: Unimplemented; }
public void SetControlValue(Control ctrl, int value) { v4l2_control cur = new v4l2_control(); cur.id = (uint)ctrl; cur.value = value; if (ioControl.SetControl(ref cur) < 0) throw new Exception("VIDIOC_S_CTRL"); }
public int GetControlValue(Control ctrl) { v4l2_control cur = new v4l2_control(); cur.id = (uint)ctrl; if (ioControl.GetControl(ref cur) < 0) throw new Exception("VIDIOC_G_CTRL"); return cur.value; }
private static extern int ioctl(int device, v4l2_operation request, ref v4l2_control argp);