private void videoRec_NewFrame(object sender, CaptureFrameEventArgs e)
 {
     if (!IsPreviewPaused)
     {
         CurrentImg = (Bitmap)e.Frame.Clone();
         GC.Collect();
     }
 }
Beispiel #2
0
 protected void VideoCapture_NewFrame(object sender, CaptureFrameEventArgs e)
 {
     this.currentFrame = (Bitmap)e.Frame.Clone();
     if (IsRunning && CheckExecute())
     {
         Execute();
     }
     this.FramesSinceStart++;
 }
 private void OnCaptureFrame(BitmapSource img)
 {
     if (img != null)
     {
         var handler = CaptureFrame;
         if (handler != null)
         {
             var args = new CaptureFrameEventArgs(_deviceName, img);
             _dispatcher.BeginInvoke(handler, DispatcherPriority.Normal, new object[] { this, args });
         }
     }
 }
Beispiel #4
0
 private void OnFrameCaptured(object sender, CaptureFrameEventArgs e)
 {
     this.Frame = e;
 }