private async void btStart_Click(object sender, EventArgs e) { mmLog.Clear(); tcMain.SelectedIndex = 4; if (rbVideoFile.Checked) { ConfigureMediaPlayer(); } else { ConfigureVideoCapture(); } // add face detection if (cbFDEnabled.Checked) { FaceDetectionAdd(); } // add car counter if (cbCCEnabled.Checked) { CarCounterAdd(); } // add car counter if (cbPDEnabled.Checked) { PedestrianDetectionAdd(); } //this.MediaPlayer1.Video_Effects_Enabled = true; // this.MediaPlayer1.Video_Effects_Clear(); // this.MediaPlayer1.Video_Effects_Add(new VFVideoEffectMosaic(true, 500)); if (rbVideoFile.Checked) { MediaPlayer1.Show(); VideoCapture1.Hide(); await MediaPlayer1.PlayAsync(); } else { MediaPlayer1.Hide(); VideoCapture1.Show(); await VideoCapture1.StartAsync(); } }
private void StopDelegateMethod1() { //timer1.Enabled = false; tbTimeline.Value = 0; MediaPlayer1.Hide(); MediaPlayer2.Show(); CurrentPlayer = MediaPlayer2; MediaPlayer2.Resume(); if (sourceFiles.Count > 0) { PlayFile(sourceFiles[0], MediaPlayer1); sourceFiles.RemoveAt(0); MediaPlayer1.Pause(); } }
private void btStart_Click(object sender, EventArgs e) { mmLog.Clear(); if (rbVideoFile.Checked) { ConfigureMediaPlayer(); } else { ConfigureVideoCapture(); } // add face detection if (cbFDEnabled.Checked) { FaceDetectionAdd(); } // add car counter if (cbCCEnabled.Checked) { CarCounterAdd(); } // add car counter if (cbPDEnabled.Checked) { PedestrianDetectionAdd(); } if (rbVideoFile.Checked) { MediaPlayer1.Show(); VideoCapture1.Hide(); MediaPlayer1.Play(); } else { MediaPlayer1.Hide(); VideoCapture1.Show(); VideoCapture1.Start(); } }