예제 #1
0
        public void EnsureDisconnected()
        {
            if (cameraState == VideoCameraState.videoCameraRecording)
            {
                StopRecordingVideoFile();
            }

            if (bitmapPlayer != null)
            {
                cameraState = VideoCameraState.videoCameraError;

                bitmapPlayer.Stop();
            }

            alteredPixels = null;
            bitmapPlayer  = null;
            isConnected   = false;
        }
예제 #2
0
        public void EnsureConnected()
        {
            if (bitmapPlayer == null)
            {
                bitmapPlayer = new BitmapVideoPlayer(
                    aviTools,
                    Settings.Default.UseEmbeddedVideoSource,
                    Settings.Default.SourceBitmapFilesLocation,
                    useBuffering ? bufferSize : 0);
            }

            alteredPixels = new int[bitmapPlayer.Height, bitmapPlayer.Width];

            SetBitmapPlayerFrameRate();

            bitmapPlayer.Start();

            isConnected = true;

            cameraState = VideoCameraState.videoCameraRunning;
        }