private async void btStop_Click(object sender, EventArgs e) { await VideoCapture1.StopAsync(); await MediaPlayer1.StopAsync(); FaceDetectionRemove(); CarCounterRemove(); PedestrianDetectionRemove(); }
private Task PushImagesAsync() { return(Task.Run( async() => { Bitmap bmp = null; for (int k = 0; k < 5; k++) { for (int i = 0; i < 25; i++) { switch (k) { case 0: bmp = new Bitmap(Properties.Resources._1); break; case 1: bmp = new Bitmap(Properties.Resources._2); break; case 2: bmp = new Bitmap(Properties.Resources._3); break; case 3: bmp = new Bitmap(Properties.Resources._4); break; case 4: bmp = new Bitmap(Properties.Resources._5); break; } if (bmp != null) { VideoCapture1.Push_Source_AddVideoFrame(bmp); bmp.Dispose(); } Application.DoEvents(); } } await VideoCapture1.StopAsync(); tmRecording.Stop(); MessageBox.Show("Done!"); })); }
private async void btStop_Click(object sender, EventArgs e) { tmRecording.Stop(); await VideoCapture1.StopAsync(); }
private async void btStop_Click(object sender, EventArgs e) { await MediaPlayer1.StopAsync(); await VideoCapture1.StopAsync(); }