Exemplo n.º 1
0
        /// <summary>
        ///     Take a snapshot.
        /// </summary>
        /// <param name="file"></param>
        /// <param name="quality"></param>
        public void TakeSnapshot(string file, int quality = 100)
        {
            ThrowIfNotInitialize();

            switch (VlcMediaPlayer.State)
            {
            case MediaState.NothingSpecial:
            case MediaState.Opening:
            case MediaState.Buffering:
            case MediaState.Stopped:
            case MediaState.Ended:
            case MediaState.Error:
                break;

            case MediaState.Playing:
            case MediaState.Paused:
                _snapshotContext = new SnapshotContext(file, quality);
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Take a snapshot.
        /// </summary>
        /// <param name="path"></param>
        /// <param name="format"></param>
        /// <param name="quality"></param>
        public void TakeSnapshot(string path, SnapshotFormat format, int quality)
        {
            if (VlcMediaPlayer == null)
            {
                throw new InvalidOperationException("VlcMediaPlayer doesn't have initialize.");
            }

            switch (VlcMediaPlayer.State)
            {
            case MediaState.NothingSpecial:
            case MediaState.Opening:
            case MediaState.Buffering:
            case MediaState.Stopped:
            case MediaState.Ended:
            case MediaState.Error:
                break;

            case MediaState.Playing:
            case MediaState.Paused:
                _snapshotContext = new SnapshotContext(path, format, quality);
                break;
            }
        }