private IList <CameraPixelFormat> GetSupportedPreviewPixelFormats() { List <CameraPixelFormat> previewFormats = new List <CameraPixelFormat>(); NativeCapabilities.PreviewFormatCallback callback = (CameraPixelFormat format, IntPtr userData) => { previewFormats.Add(format); return(true); }; CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedPreviewPixelFormats(_camera.GetHandle(), callback, IntPtr.Zero), "Failed to get the supported preview formats."); return(previewFormats.AsReadOnly()); }
private IList <CameraPixelFormat> GetSupportedPreviewPixelFormats() { var previewFormats = new List <CameraPixelFormat>(); NativeCapabilities.PreviewFormatCallback callback = (format, _) => { previewFormats.Add(format); return(true); }; NativeCapabilities.SupportedPreviewPixelFormats(_camera.GetHandle(), callback). ThrowIfFailed("Failed to get the supported preview formats."); return(previewFormats.AsReadOnly()); }