node-opencv
node-opencv copied to clipboard
Adding getters and setters in VideoCaptureWrap
Hi,
I have added getPosition, getPositionMS, getFPS, getFourCC and setPositionMS. setPositionMS is a duplicate of getFrameAt, but as it sets the position in MS I find getFrameAt confusing and would deprecated that in the future.
What do you think?
Codecov Report
Merging #559 into master will decrease coverage by
0.28%
. The diff coverage is16.12%
.
@@ Coverage Diff @@
## master #559 +/- ##
=========================================
- Coverage 51.19% 50.9% -0.29%
=========================================
Files 34 34
Lines 3899 3929 +30
Branches 27 27
=========================================
+ Hits 1996 2000 +4
- Misses 1903 1929 +26
Impacted Files | Coverage Δ | |
---|---|---|
src/VideoCaptureWrap.h | 0% <ø> (ø) |
:arrow_up: |
src/VideoCaptureWrap.cc | 43.28% <16.12%> (-5.26%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 52333d4...6855c81. Read the comment docs.
Looks great, any chance you could add an example file or some tests? Thanks!
I have never done that before as I am not a professional :-), but I will look into it.
hi fakob - in terms of a test, copy an existing example (e.g. examples/motion-track.js), and make it access each of the getters/setters in VideoCapture - this should be enough to ensure that they get tested regularly, and should contribute to coverage percentage. I just did that for examples/bgsubtractor.js ; if you want another video-reading sample to look at.