コード例 #1
0
        private IList <CameraFps> GetSupportedPreviewFpsByResolutions(int width, int height)
        {
            List <CameraFps> fpsByResolution = new List <CameraFps>();

            NativeCapabilities.FpsByResolutionCallback callback = (CameraFps fps, IntPtr userData) =>
            {
                fpsByResolution.Add(fps);
                return(true);
            };
            CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedPreviewFpsByResolution(_camera.GetHandle(),
                                                                                               width, height, callback, IntPtr.Zero), "Failed to get the supported fps by resolutions.");

            return(fpsByResolution.AsReadOnly());
        }
コード例 #2
0
        private IList <CameraFps> GetSupportedPreviewFpsByResolutions(int width, int height)
        {
            var fpsByResolution = new List <CameraFps>();

            NativeCapabilities.FpsByResolutionCallback callback = (fps, _) =>
            {
                fpsByResolution.Add(fps);
                return(true);
            };

            NativeCapabilities.SupportedPreviewFpsByResolution(_camera.GetHandle(), width, height, callback).
            ThrowIfFailed("Failed to get the supported fps by resolutions.");

            return(fpsByResolution.AsReadOnly());
        }