Arguments for video source error event from video source.
Inheritance: System.EventArgs
        void videoSource_Error(object sender, AForge.Video.VideoSourceErrorEventArgs eventArgs)
        {
#if DEBUG
            MessageBox.Show(
                eventArgs.Description,
                eventArgs.GetType().ToString(),
                MessageBoxButton.OK,
                MessageBoxImage.Error
                );
#endif
        }
Exemplo n.º 2
0
        // On video source error
        private void video_VideoSourceError( object sender, VideoSourceErrorEventArgs e )
        {
            // reset motion detector
            if ( motionDetecotor != null )
            {
                motionDetecotor.Reset( );
            }

            // save video source error's description
            lastVideoSourceError = e.Description;

            // notify clients about the error
            if ( VideoSourceError != null )
            {
                VideoSourceError( this, new EventArgs( ) );
            }
        }
Exemplo n.º 3
0
 private void videoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     if (VideoSourceError != null)
     {
         if (SynchronizingObject != null &&
             SynchronizingObject.InvokeRequired)
         {
             SynchronizingObject.BeginInvoke(
                 VideoSourceError, new object[] { this, eventArgs });
         }
         else
         {
             VideoSourceError(this, eventArgs);
         }
     }
 }
Exemplo n.º 4
0
 // Error occured in video source
 private void videoSource_VideoSourceError( object sender, VideoSourceErrorEventArgs eventArgs )
 {
     lastMessage = eventArgs.Description;
     Invalidate( );
 }
Exemplo n.º 5
0
 private void VideoError(object sender, VideoSourceErrorEventArgs eventargs)
 {
     _eventAggregator.PublishOnBackgroundThread("VideoDeviceError");
 }
Exemplo n.º 6
0
 private void VideoSource_VideoSourceError(object sender, AForge.Video.VideoSourceErrorEventArgs eventArgs)
 {
 }
Exemplo n.º 7
0
 void videoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
   log.Warn("videoSource_VideoSourceError: Event occurred");
 }
 private void VideoStream_VideoSourceError(object sender, AForge.Video.VideoSourceErrorEventArgs eventArgs)
 {
     Debug.WriteLine(eventArgs.Description);
 }
        private void screenStream_VideoSourceError(object sender, VideoSourceErrorEventArgs e)
        {
            if (!IsRecording)
                return;

            if (videoPlayer.InvokeRequired)
            {
                videoPlayer.BeginInvoke((Action)((() => screenStream_VideoSourceError(sender, e))));
                return;
            }

            IVideoSource source = sender as IVideoSource;
            source.SignalToStop();

            string msg = String.Format( // TODO: Move the message box code to the view
                CultureInfo.CurrentUICulture, Resources.Error_Video_Source, source.Source);
            MessageBox.Show(msg, source.Source, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
                videoPlayer.RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0);
        }
Exemplo n.º 10
0
        private void VideoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
        {
            connectionAttempts++;
            fpsLabel.Text = "Connection attempt " + connectionAttempts.ToString() + " failed. Trying again.";

               // failedConnection.RunWorkerAsync();
        }
Exemplo n.º 11
0
 private void FinalVideoSource_ErrorEvent(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     // Try to capture some errors and print them...
     MessageBox.Show("Error: " + eventArgs.Description);
 }
Exemplo n.º 12
0
 private void source_VideoSourceError(object sender, VideoSourceErrorEventArgs e)
 {
     if (this.EditMode)
     {
         return;
     }
     OnCameraViewLog(new CameraViewLogEventArgs(ZForge.Controls.Logs.LogLevel.LOG_ERROR, e.Description, this));
 }
Exemplo n.º 13
0
 private void HandleSourceError(object sender, VideoSourceErrorEventArgs e)
 {
     HandleFinishedPlaying(sender, ReasonToFinishPlaying.VideoSourceError);
 }
Exemplo n.º 14
0
        private void SourceVideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
        {
            VideoSourceErrorMessage = eventArgs.Description;
            if (!VideoSourceErrorState)
            {
                VideoSourceErrorState = true;
                MainForm.LogExceptionToFile(new Exception("VideoSourceError: " + eventArgs.Description),
                                            "Camera " + Camobject.id);
                //Monitor.Enter(this);
                _camera.LastFrameNull = true;

                //Monitor.Exit(this);
            }
            if (!ShuttingDown)
                Invalidate();
        }
Exemplo n.º 15
0
 private void screenStream_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     throw new VideoException(eventArgs.Description);
 }
Exemplo n.º 16
0
        private void SourceVideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
        {
            VideoSourceErrorMessage = eventArgs.Description;
            if (!VideoSourceErrorState)
            {
                VideoSourceErrorState = true;
                Log.Error("Camera " + Camobject.id, new Exception("VideoSourceError: " + eventArgs.Description));
                _reconnectTime = DateTime.Now;
                if (_errorTime == DateTime.MinValue)
                    _errorTime = DateTime.Now;

                _camera.LastFrameNull = true;

                if (VolumeControl != null && VolumeControl.AudioSource != null)
                {
                    VolumeControl.AudioSource.Stop();
                    VolumeControl.AudioSourceErrorState = true;
                }
            }
            if (!ShuttingDown)
                Invalidate();
        }
 public void InvokeVideoSourceError(VideoSourceErrorEventArgs eventargs)
 {
     VideoSourceErrorEventHandler handler = VideoSourceError;
     if (handler != null) handler(this, eventargs);
 }