Skip to content

Added test for VideoCapture CAP_PROP_FRAME_MSEC option#18968

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
asmorkalov:as/cap_prop_frame_msec_test
Nov 30, 2020
Merged

Added test for VideoCapture CAP_PROP_FRAME_MSEC option#18968
opencv-pushbot merged 1 commit intoopencv:3.4from
asmorkalov:as/cap_prop_frame_msec_test

Conversation

@asmorkalov
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov commented Nov 30, 2020

Relates to: #18966

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake
force_builders=Custom
build_image:Custom=centos:7
buildworker:Custom=linux-1

@asmorkalov asmorkalov force-pushed the as/cap_prop_frame_msec_test branch 3 times, most recently from 0be8947 to 27b795b Compare November 30, 2020 10:37
@asmorkalov asmorkalov requested a review from alalek November 30, 2020 14:58
@asmorkalov asmorkalov force-pushed the as/cap_prop_frame_msec_test branch from 27b795b to c59a7f0 Compare November 30, 2020 15:02
Comment on lines +242 to +243
std::cout << "SKIP test: backend " << apiPref << " CAP_PROP_POS_MSEC option is not supported." << std::endl;
return;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use throw SkipTestException(...) here and below (see above for example).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

- Suppressed FFMPEG + h264, h265 as it does not pass tests with CI configuration.
- Suppressed MediaFoundation backend as it always returns zero for now.
@asmorkalov asmorkalov force-pushed the as/cap_prop_frame_msec_test branch from c59a7f0 to 24fac5f Compare November 30, 2020 17:08
@Staticity
Copy link
Copy Markdown

@asmorkalov Looks good, thanks for adding this.

Does this also support testing VideoCapture by index? Unsure if there's a way to properly mock out a connected camera.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@opencv-pushbot opencv-pushbot merged commit aac30e7 into opencv:3.4 Nov 30, 2020
@alalek alalek mentioned this pull request Dec 4, 2020
@alalek alalek mentioned this pull request Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants