Beispiel #1
0
        private void VideoClose()
        {
            if (!context.isVideo)
            {
                return;
            }

            if (!MarkupClose())
            {
                throw new Exception("VideoClose(): Unable to close markup!");
            }

            // Закрываем объект декодирования видео
            int errcode = OcvWrapper.VideoClose(context.videoHandle);

            if (errcode != 0)
            {
                throw new Exception("VideoClose(): Unable to close video with ffmpeg!");
            }

            // Обновляем состояние контекста графического интерфейса
            context.Reset();

            // Обновляем индикацию на форме
            VideoNavigatorUpdate();
            StatusBarUpdate();
            PictureRedraw();
        }
Beispiel #2
0
 private void CloseVideo()
 {
     if (isVideo)
     {
         OcvWrapper.VideoClose(videoHandle);
         pictureBox1.Image        = null;
         txtVideoFilePath.Text    = "";
         txtVideoFramesTotal.Text = "";
         txtVideoFps.Text         = "";
         txtVideoDuration.Text    = "";
         txtCurrentFrame.Text     = "";
         txtCurrentPosition.Text  = "";
         isVideo = false;
         enterAppState(appState.NOVID);
     }
 }