node-opencv icon indicating copy to clipboard operation
node-opencv copied to clipboard

Adding getters and setters in VideoCaptureWrap

Open fakob opened this issue 7 years ago • 4 comments

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?

fakob avatar Oct 15 '17 14:10 fakob

Codecov Report

Merging #559 into master will decrease coverage by 0.28%. The diff coverage is 16.12%.

Impacted file tree graph

@@            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.

codecov-io avatar Oct 30 '17 19:10 codecov-io

Looks great, any chance you could add an example file or some tests? Thanks!

peterbraden avatar Oct 31 '17 09:10 peterbraden

I have never done that before as I am not a professional :-), but I will look into it.

fakob avatar Nov 01 '17 14:11 fakob

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.

btsimonh avatar Nov 11 '17 14:11 btsimonh