private IList <Size> GetSupportedPreviewResolutions()
        {
            List <Size> previewResolutions = new List <Size>();

            NativeCapabilities.PreviewResolutionCallback callback = (int width, int height, IntPtr userData) =>
            {
                previewResolutions.Add(new Size(width, height));
                return(true);
            };
            CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedPreviewResolutions(_camera.GetHandle(), callback, IntPtr.Zero),
                                            "Failed to get the supported preview resolutions");

            return(previewResolutions.AsReadOnly());
        }
Beispiel #2
0
        private IList <Size> GetSupportedPreviewResolutions()
        {
            var previewResolutions = new List <Size>();

            NativeCapabilities.PreviewResolutionCallback callback = (width, height, _) =>
            {
                previewResolutions.Add(new Size(width, height));
                return(true);
            };

            NativeCapabilities.SupportedPreviewResolutions(_camera.GetHandle(), callback).
            ThrowIfFailed("Failed to get the supported preview resolutions");

            return(previewResolutions.AsReadOnly());
        }