-
Notifications
You must be signed in to change notification settings - Fork 109
Closed
Milestone
Description
Trying to use any webcam other then 0 when your system only has 1 webcam throws an exception. Ideally GRIP would enumerate the webcams on your system and only present ones that won't make it crash.
Stack Trace:
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 1
at edu.wpi.grip.core.sources.CameraSource.startVideo(CameraSource.java:97)
at edu.wpi.grip.core.sources.CameraSource.<init>(CameraSource.java:68)
at edu.wpi.grip.core.sources.CameraSource.<init>(CameraSource.java:43)
at edu.wpi.grip.ui.pipeline.AddSourceView.lambda$null$39(AddSourceView.java:94)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.bytedeco.javacv.FrameGrabber$Exception: cvCreateCameraCapture() Error: Could not create camera capture.
at org.bytedeco.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:179)
at edu.wpi.grip.core.sources.CameraSource.startVideo(CameraSource.java:95)
... 6 more