private void SetCurrentEngine(CaptureMethod method) { var oldEngine = currentCaptureEngine; switch (method) { case CaptureMethod.AutoDetect: case CaptureMethod.BitBlt: case CaptureMethod.Wdm: case CaptureMethod.DirectX: currentCaptureEngine = autoCaptureEngine; break; case CaptureMethod.Log: currentCaptureEngine = logCaptureEngine; break; } if (oldEngine != currentCaptureEngine && oldEngine.IsRunning) { oldEngine.Stop(); currentCaptureEngine.StartAsync(); } }
/// <summary> /// Handles the message. /// </summary> /// <param name="message">The message.</param> public void Handle(ShellReady message) { bool autoStart; using (var reg = new EngineRegistrySettings()) { captureEngine.CaptureMethod = reg.CaptureMethod; captureEngine.Speed = reg.Speed; autoStart = reg.AutoStart; } if (autoStart) { captureEngine.StartAsync(); } }
public void StartEngine() { IsStarting = true; _captureEngine.StartAsync(); }
public void StartEngine() { captureEngine.StartAsync(); }
public Task StartAsync() { return(currentCaptureEngine.StartAsync()); }