I want to stop the VideoSource when there is an error to prevent application from hanging.
How can i use the VideoSourceError to do that.
this is what i have so far and it's not working.
FinalVideoSource = new VideoCaptureDevice(camMoniker);
FinalVideoSource.NewFrame += FinalVideoSource_NewFrame;
FinalVideoSource.VideoSourceError += FinalVideoSource_VideoSourceError;
FinalVideoSource.Start();
private void FinalVideoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs)
{
FinalVideoSource.Stop();
FinalVideoSource.SignalToStop();
}