public V4LFormat(V4LDevice device, APIv2.v4l2_fmtdesc fmtdesc) { this.device = device; this.fmtdesc = fmtdesc; }
internal V4LFormatDescription(v4l2_fmtdesc fmtdesc) { this.fmtdesc = fmtdesc; }
private void fetchFormats() { formats = new List<V4LFormat>(); APIv2.v4l2_fmtdesc cur = new APIv2.v4l2_fmtdesc(); cur.index = 0; while (ioControl.EnumerateFormats(ref cur) == 0) { formats.Add(new V4LFormat(this, cur)); cur.index++; } }
/// <summary> /// Calls VIDIOC_ENUM_FMT. /// </summary> public int EnumerateFormats(ref v4l2_fmtdesc fmt) { return ioctl(deviceHandle, v4l2_operation.EnumerateFormats, ref fmt); }
private static extern int ioctl(int device, v4l2_operation request, ref v4l2_fmtdesc argp);
/// <summary> /// Collects all available image formats from the device. /// </summary> private void fetchFormats() { formats = new List<V4LFormatDescription>(); v4l2_fmtdesc cur = new v4l2_fmtdesc(); cur.index = 0; while (ioControl.EnumerateFormats(ref cur) == 0) { formats.Add(new V4LFormatDescription(cur)); cur.index++; } }
internal V4LFormat(v4l2_fmtdesc fmtdesc) { this.fmtdesc = fmtdesc; }