Use CS Core on supported platforms for USB cameras#956
Use CS Core on supported platforms for USB cameras#956JLLeitschuh merged 5 commits intoWPIRoboticsProjects:masterfrom
Conversation
Existing version was deleted
Can be more reliable then OpenCV, and handles disconnects properly
Codecov Report
@@ Coverage Diff @@
## master #956 +/- ##
============================================
- Coverage 52.55% 52.37% -0.18%
Complexity 1 1
============================================
Files 331 332 +1
Lines 8968 9008 +40
Branches 569 573 +4
============================================
+ Hits 4713 4718 +5
- Misses 4049 4084 +35
Partials 206 206 |
|
Status on this? |
Codecov Report
@@ Coverage Diff @@
## master #956 +/- ##
============================================
- Coverage 52.52% 52.33% -0.19%
Complexity 1 1
============================================
Files 331 332 +1
Lines 8968 9008 +40
Branches 569 573 +4
============================================
+ Hits 4710 4714 +4
- Misses 4053 4088 +35
- Partials 205 206 +1 |
| this.readTimeout = TimeUnit.MILLISECONDS.convert(readTimeout, unit) / 1000.0; | ||
| } | ||
|
|
||
| public static void tryLoad() throws Exception { |
There was a problem hiding this comment.
I don't know. It was in the existing code that this was renamed from.
| if (javaCvSink != null) { | ||
| javaCvSink.close(); | ||
| } | ||
|
|
||
| if (httpCamera != null) { | ||
| httpCamera.close(); | ||
| } | ||
|
|
||
| if (decoded != null) { | ||
| decoded.close(); | ||
| } |
There was a problem hiding this comment.
Do we want to try to recover and close the other stuff if earlier things fail to close?
There was a problem hiding this comment.
Was just copying what was already existing.
| throw new IOException("Frame not read: " + frameTime); | ||
| } | ||
| } catch (IOException e) { | ||
| throw new Exception(e.getMessage(), e); |
There was a problem hiding this comment.
Why throw the raw 'Exception' type here? Seems like less information here?
There was a problem hiding this comment.
Was just copying what the original did. Whoever wrote it originally must have had a reason.
|
@JLLeitschuh Everything you mentioned has been in the repo for 4 years at least. It originally came from the IP frame grabber. |
|
@ThadHouse is this finished and ready to be merged? |
|
Yes |
Can be more reliable then OpenCV, and handles disconnects properly
Depends on #955 to build on azure.