Add live timestamps to MSMF Video API#18966
Conversation
|
@Staticity Thanks for the contribution! It looks like we do not have test for |
asmorkalov
left a comment
There was a problem hiding this comment.
@Staticity My patch with CAP_PROP_POS_MSEC has been merged. Please rebase your brunch on top of current 3.4 and remove Media Foundation check in test code to active test for MSMF back-end too.
008b1d0 to
9aab7c8
Compare
|
@asmorkalov Ignore the faulty latest push(es). Sounds good, I'm rebased on 3.4 and building the tests now. I left a comment on your merged PR for the additional test. Does it also test VideoCapture by index? It seems that the VideoCapture is opened with a filepath instead of device index -- so I'm unsure if that test will actually test this code. |
We usually don't have such tests in regular OpenCV testing scope (due to specific requirements). However it would be nice to add some "manual" test here: https://github.com/opencv/opencv/blob/3.4.12/modules/videoio/test/test_camera.cpp (check usage note in mentioned file) |
|
The patch looks good to me. Please squeeze commits to merge the code. Also it'll be great if you add disabled test for cameras in the way as alalek proposed. |
asmorkalov
left a comment
There was a problem hiding this comment.
Please add the same check to TEST(DISABLED_VideoIO_Camera, validate_V4L2_MJPEG).
|
@Staticity Please squash commits after fix. |
Enable frame timestamp tests for MSMF Add functional test for camera live timestamps Remove trailing whitespace Add timestamp test to all functional tests. Protect div by 0 Add Timestamps to MSMF Video Capture by index
079bc86 to
2fa624a
Compare
|
Wonderful, thanks for the help! |
When using
cv::VideoCaptureby index on Windows with MS Media Foundation (cv::CAP_MSMF), the fieldcv::CAP_PROP_POS_MSECalways returns 0.This PR makes an unused timestamp parameter from the
IMFSourceReaderCallback::OnReadSample(...)interface available throughcv::VideoCapture::get(cv::CAP_PROP_POS_MSEC).Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.