Closed redaz808 closed 9 years ago
Hi there,
Are you sure your screen is completely loaded? The thing is that the control requires a created window in order to start a video stream.
Regards, Alexander
On Monday, September 14, 2015, redaz808 notifications@github.com wrote:
When I start automatically the webcamdevice when the screen is loaded , I get an exception. If I use the same code to start the camera only when I click the button, it works!
private void InitializeComboBox() { comboBox.ItemsSource = webCameraControl.GetVideoCaptureDevices(); if (comboBox.Items.Count > 0) { comboBox.SelectedItem = comboBox.Items[0]; var cameraId = (WebCameraId)comboBox.SelectedItem; List<WebCameraId> cameras = new List<WebCameraId>(webCameraControl.GetVideoCaptureDevices()); webCameraControl.StartCapture(cameras[0]); } }
When the code jumps to InitializeCaptureGraph, the program crashes and I get an error "Failed to add a video capture filter" Any idea how I can make it work?
Thanks,
— Reply to this email directly or view it on GitHub https://github.com/jacobbo/WebEye/issues/2.
Thank you for the prompt reply!!
You are right and now it works on the loaded event.
Thank you!!
When I start automatically the webcamdevice when the screen is loaded , I get an exception. If I use the same code to start the camera only when I click the button, it works!
When the code jumps to InitializeCaptureGraph, the program crashes and I get an error "Failed to add a video capture filter" Any idea how I can make it work?
Thanks,