Ejemplo n.º 1
0
        private IList <Rotation> GetSupportedStreamRotations()
        {
            List <Rotation> streamRotations = new List <Rotation>();

            NativeCapabilities.StreamRotationCallback callback = (Rotation streamRotation, IntPtr userData) =>
            {
                streamRotations.Add(streamRotation);
                return(true);
            };
            CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedStreamRotations(_camera.GetHandle(), callback, IntPtr.Zero),
                                            "Failed to get the supported camera rotations.");

            return(streamRotations.AsReadOnly());
        }
Ejemplo n.º 2
0
        private IList <Rotation> GetSupportedStreamRotations()
        {
            var streamRotations = new List <Rotation>();

            NativeCapabilities.StreamRotationCallback callback = (streamRotation, _) =>
            {
                streamRotations.Add(streamRotation);
                return(true);
            };

            NativeCapabilities.SupportedStreamRotations(_camera.GetHandle(), callback).
            ThrowIfFailed("Failed to get the supported camera rotations.");

            return(streamRotations.AsReadOnly());
        }