private void StartCapture() { if (videoSource != null && videoSource.VideoResolution != null && videoSource.Framerate != 0) { videoin = new VideoInThread(videoSource); videoin.OnStartCapture += videoin_OnStartCapture; videoin.OnFrameReady += videoin_OnFrameReady; videoin.OnStopped += videoin_OnStopped; videoin.Start(); } }