Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Biswa96
Copy link
Contributor

@Biswa96 Biswa96 commented Aug 14, 2022

This fixes the following error with mingw toolchain:
opencv/modules/videoio/src/cap_obsensor/obsensor_stream_channel_msmf.hpp:160:10: error: 'condition_variable' in namespace 'std' does not name a type
  160 |     std::condition_variable streamStateCv_;
      |          ^~~~~~~~~~~~~~~~~~

relates #22196

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 another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the 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

This fixes the following error with mingw toolchain:
opencv/modules/videoio/src/cap_obsensor/obsensor_stream_channel_msmf.hpp:160:10: error: 'condition_variable' in namespace 'std' does not name a type
  160 |     std::condition_variable streamStateCv_;
      |          ^~~~~~~~~~~~~~~~~~
@berak
Copy link
Contributor

berak commented Aug 14, 2022

hey, great !
if you came that far, maybe you can append to the discussion here ?

@zihaomu
Copy link
Member

zihaomu commented Aug 18, 2022

Hi, @Biswa96. Thanks for your contribution!
Question: is this header file only needed by MinGW?

@Biswa96
Copy link
Contributor Author

Biswa96 commented Aug 18, 2022

No, this is not for mingw only. There is std::condition_variable streamStateCv_ variable which needs the condition_variable header. C++ standard says so https://en.cppreference.com/w/cpp/thread/condition_variable

Copy link
Member

@zihaomu zihaomu left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@opencv-pushbot opencv-pushbot merged commit 7deb8f5 into opencv:4.x Aug 18, 2022
@Biswa96 Biswa96 deleted the condition_variable branch August 18, 2022 12:04
@alalek alalek mentioned this pull request Aug 21, 2022
@asmorkalov asmorkalov added this to the 4.7.0 milestone Jan 23, 2023
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.

5 participants