Esempio n. 1
0
 private void client_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     if (VideoSourceError != null)
     {
         VideoSourceError(sender, eventArgs);
     }
 }
Esempio n. 2
0
        private void Device_VideoSourceError(object sender, VideoSourceErrorEventArgs e)
        {
            log.ErrorFormat("Error received trying to get a thumbnail for {0}", summary.Alias);
            log.Error(e.Description);

            hadError = true;
            waitHandle.Set();
        }
Esempio n. 3
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));
 }
Esempio n. 4
0
        public void InvokeVideoSourceError(VideoSourceErrorEventArgs eventargs)
        {
            VideoSourceErrorEventHandler handler = VideoSourceError;

            if (handler != null)
            {
                handler(this, eventargs);
            }
        }
        private void HandleVideoError(object sender, VideoSourceErrorEventArgs e)
        {
            Log.Error(e.Exception, "Video capture fatal error. " + e.Description);

            if (IsVideoSourceRunning())
            {
                Restart();
            }
        }
Esempio n. 6
0
        public void VideoError(object sender, VideoSourceErrorEventArgs eventArgs)
        {
            if (File.Exists(baseDirectory + "AppFiles/TempFiles/" + TempFileName))
            {
                File.Delete(baseDirectory + "AppFiles/TempFiles/" + TempFileName);
            }

            stopAll();
        }
Esempio n. 7
0
        // On video source error
        private void video_VideoSourceError(object sender, VideoSourceErrorEventArgs e)
        {
            // save video source error's description
            lastVideoSourceError = e.Description;

            // notify clients about the error
            if (VideoSourceError != null)
            {
                VideoSourceError(this, new EventArgs( ));
            }
        }
Esempio n. 8
0
        public void Kamera_VideoError(object sender, VideoSourceErrorEventArgs e)
        {
            if (mdetector != null)
            {
                mdetector.Reset();
            }
            sonframeHata = e.Description;

            if (VideoError != null)
            {
                VideoError(this, new EventArgs());
            }
        }
Esempio n. 9
0
 /// <summary>
 /// 错误事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="eventArgs"></param>
 private void Cam_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     if (eventArgs.Description != "正在中止线程。")//排除调用Stop()的错误提示!。
     {
         //MessageBox.Show(filterInfo.Name + " 错误:\n" + eventArgs.Description + " 请选择其他设备。");
         BeginInvoke(new Action(() =>
         {
             btn1.Enabled      = false;
             pictureBox1.Image = null;
             Cam.SignalToStop();
             //Cam.Stop();//不能停止,所有用SigalToStop();
             MessageBox.Show("设备:\"" + filterInfo.Name + "\"无法使用,请选择其他设备。");
         }));
     }
 }
Esempio n. 10
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);
         }
     }
 }
Esempio n. 11
0
        void jpegSource1_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
        {
            //Error handler
            Debug.WriteLine(eventArgs.Description);

            Bitmap ErPic = new Bitmap(320, 240);

            using (var g = Graphics.FromImage(ErPic))
            {
                using (var arialFontLarge = new Font("Arial", 15))
                {
                    g.DrawString("Camera Offline", arialFontLarge, Brushes.White, 75, 100);
                }
            }
            ErPic.Save(ws, ImageFormat.Bmp);
        }
Esempio n. 12
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();
            }
        }
Esempio n. 13
0
        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.CurrentCulture, 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);
        }
Esempio n. 14
0
 private void Video_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     if (eventArgs.Description.Equals("Unable to connect to the remote server"))
     {
         videoStatusLabel.Dispatcher.Invoke(() =>
         {
             videoStatusLabel.Content    = "DISCONNECTED";
             videoStatusLabel.Foreground = System.Windows.Media.Brushes.Red;
         });
     }
     else if (eventArgs.Description.Equals("The operation has timed out"))
     {
         videoStatusLabel.Dispatcher.Invoke(() =>
         {
             videoStatusLabel.Content    = "TIMED OUT";
             videoStatusLabel.Foreground = System.Windows.Media.Brushes.Orange;
         });
     }
     else
     {
         MessageBox.Show(eventArgs.Description);
     }
 }
Esempio n. 15
0
 /// <summary>
 /// Camera errors sensor
 /// </summary>
 /// <param name="sender">object - owner</param>
 /// <param name="eventArgs">VideoSourceErrorEventArgs - args</param>
 private void processFrameError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     updateError(eventArgs.Description);
 }
Esempio n. 16
0
 private void device_VideoSourceError(object sender, VideoSourceErrorEventArgs e)
 {
     log.ErrorFormat("Error from device {0}: {1}", summary.Alias, e.Description);
 }
Esempio n. 17
0
 /// <summary>
 /// This is event is called if an error with ther playback occurs.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 public void VideoSourceError(object sender, VideoSourceErrorEventArgs args)
 {
     System.Diagnostics.Debug.WriteLine(args.Description);
 }
Esempio n. 18
0
 void videoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     log.Warn("videoSource_VideoSourceError: Event occurred");
 }
Esempio n. 19
0
		private void VideoDevice_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
		{
			log.ErrorFormat("Capture error ({0}): {1}", m_CurrentVideoDevice.Name, eventArgs.Description);
		}
Esempio n. 20
0
 private void Stream_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     Console.WriteLine("Hey, do something i got error, omg what now.");
 }
Esempio n. 21
0
 private void FileSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     var error = eventArgs.Description;
 }
Esempio n. 22
0
 public void video_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     Console.WriteLine(eventArgs.Description);
 }
Esempio n. 23
0
 private void OnVideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     OnError?.Invoke(sender, eventArgs);
 }
Esempio n. 24
0
 void stream_VideoError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     stream.SignalToStop();
     workCamera = false;
     MessageBox.Show("Connect camera fail!! " + eventArgs.Description);
 }
Esempio n. 25
0
 private void VideoDevice_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     throw eventArgs.Exception;
 }
Esempio n. 26
0
 private void VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     Dispose();
 }
Esempio n. 27
0
 private void VideoSourceVideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs) =>
 CallActionsLinear(() => lastMessage = eventArgs.Description, () => Invalidate());
Esempio n. 28
0
 private void VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     Dispose();
 }
 // Error occured in video source
 private void videoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     lastMessage = eventArgs.Description;
     Invalidate();
 }
Esempio n. 30
0
 private void VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     Console.WriteLine("VideoSourceError: " + eventArgs.Description);
 }
 private void videoSource_Error(object sender, VideoSourceErrorEventArgs eventArgs)
 {
     MessageBox.Show(eventArgs.Description + "\r\n This application needs K-Lite", "Video source error", MessageBoxButtons.OK, MessageBoxIcon.Information);
 }