AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

How to pause videosource player

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

How to pause videosource player

Postby DSZ » Tue Jul 09, 2019 6:02 am

Is there any way to pause a player other than stoping it? Or else can able to show the last frame on player when user stop the player? Now only an empty screen is coming when stop the player.

Code: Select all
         private void StartCameras()
        {
            // create first video source
            videoSource1 = new VideoCaptureDevice(videoDevices[camera1Combo.SelectedIndex].MonikerString);
            videoSourcePlayer1.VideoSource = videoSource1;
            videoSourcePlayer1.Start();         
        }
       private void StopCameras()
         {
            videoSourcePlayer.SignalToStop();
            videoSourcePlayer.WaitForStop();
        }
       private void videoSourcePlayer1_NewFrame(object sender, ref Bitmap image)
        {
            videoFrame = (Bitmap)image.Clone();
        }
     
DSZ
 
Posts: 15
Joined: Mon Feb 25, 2019 7:06 am

Re: How to pause videosource player

Postby andrew.kirillov » Tue Jul 09, 2019 7:55 am

No, it does not provide API to pause itself. But should not be difficult to add some property, which would tell to ignore NewFrame events from video source.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3427
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to AForge.NET Framework