/// <summary> /// Collects all available video inputs from the device. /// </summary> private void fetchInputs() { inputs = new Core.SearchableList<Analog.Video.Input>(); v4l2_input cur = new v4l2_input(); cur.index = 0; while(ioControl.EnumerateInputs(ref cur) == 0) { inputs.Add(new Analog.Video.Input(this, cur)); cur.index++; } }
ioctl(int device, v4l2_operation request, ref v4l2_input argp);
private static extern int ioctl(int device, v4l2_operation request, ref v4l2_input argp);
/// <summary> /// Calls VIDIOC_ENUMINPUT. /// </summary> public int EnumerateInputs(ref v4l2_input input) { return ioctl(deviceHandle, v4l2_operation.EnumerateInputs, ref input); }
/// <summary> /// Creates a video input. /// </summary> /// <param name="adapter">The parental analog adapter.</param> /// <param name="input">The struct holding the video input information.</param> internal Input(Analog.Adapter adapter, v4l2_input input) { this.adapter = adapter; this.input = input; }