private IList <CameraPixelFormat> GetSupportedCapturePixelFormats() { List <CameraPixelFormat> captureFormats = new List <CameraPixelFormat>(); NativeCapabilities.CaptureFormatCallback callback = (CameraPixelFormat format, IntPtr userData) => { captureFormats.Add(format); return(true); }; CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedCapturePixelFormats(_camera.GetHandle(), callback, IntPtr.Zero), "Failed to get the supported capture formats."); return(captureFormats.AsReadOnly()); }
private IList <CameraPixelFormat> GetSupportedCapturePixelFormats() { var captureFormats = new List <CameraPixelFormat>(); NativeCapabilities.CaptureFormatCallback callback = (format, _) => { captureFormats.Add(format); return(true); }; NativeCapabilities.SupportedCapturePixelFormats(_camera.GetHandle(), callback). ThrowIfFailed("Failed to get the supported capture formats."); return(captureFormats.AsReadOnly()); }