Skip to content

Fixed write return status in videoio module#29087

Open
abhishek-gola wants to merge 2 commits into
opencv:5.xfrom
abhishek-gola:videoio_write_issue_fix
Open

Fixed write return status in videoio module#29087
abhishek-gola wants to merge 2 commits into
opencv:5.xfrom
abhishek-gola:videoio_write_issue_fix

Conversation

@abhishek-gola
Copy link
Copy Markdown
Contributor

closes: #24287

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

@asmorkalov
Copy link
Copy Markdown
Contributor

Mac issue:

/Users/opencv-cn/GHA-OCV-3/_work/opencv/opencv/opencv/modules/videoio/src/cap_avfoundation_mac.mm:187:14: error: virtual function 'write' has a different return type ('void') than the function it overrides (which has return type 'bool')
        void write(cv::InputArray image) CV_OVERRIDE;
        ~~~~ ^
/Users/opencv-cn/GHA-OCV-3/_work/opencv/opencv/opencv/modules/videoio/src/cap_interface.hpp:208:18: note: overridden virtual function is here
    virtual bool write(InputArray) = 0;
            ~~~~ ^
1 error generated.

@asmorkalov
Copy link
Copy Markdown
Contributor

iOS build issue:

/Users/opencv-cn/GHA-OCV-4/_work/opencv/opencv/opencv/modules/videoio/src/cap_avfoundation.mm:65:6: warning: 'TARGET_OS_VISION' is not defined, evaluates to 0 [-Wundef]
  #if !TARGET_OS_VISION
       ^
  /Users/opencv-cn/GHA-OCV-4/_work/opencv/opencv/opencv/modules/videoio/src/cap_avfoundation.mm:188:14: error: virtual function 'write' has a different return type ('void') than the function it overrides (which has return type 'bool')
          void write(cv::InputArray image) CV_OVERRIDE;
          ~~~~ ^
  In file included from /Users/opencv-cn/GHA-OCV-4/_work/opencv/opencv/opencv/modules/videoio/src/cap_avfoundation.mm:35:
  In file included from /Users/opencv-cn/GHA-OCV-4/_work/opencv/opencv/opencv/modules/videoio/src/precomp.hpp:104:
  /Users/opencv-cn/GHA-OCV-4/_work/opencv/opencv/opencv/modules/videoio/src/cap_interface.hpp:208:18: note: overridden virtual function is here
      virtual bool write(InputArray) = 0;
              ~~~~ ^
  /Users/opencv-cn/GHA-OCV-4/_work/opencv/opencv/opencv/modules/videoio/src/cap_avfoundation.mm:221:6: warning: 'TARGET_OS_VISION' is not defined, evaluates to 0 [-Wundef]
  #if !TARGET_OS_VISION
       ^
  /Users/opencv-cn/GHA-OCV-4/_work/opencv/opencv/opencv/modules/videoio/src/cap_avfoundation.mm:250:6: warning: 'TARGET_OS_VISION' is not defined, evaluates to 0 [-Wundef]
  #if !TARGET_OS_VISION
       ^
  /Users/opencv-cn/GHA-OCV-4/_work/opencv/opencv/opencv/modules/videoio/src/cap_avfoundation.mm:766:5: warning: 'TARGET_OS_VISION' is not defined, evaluates to 0 [-Wundef]
  #if TARGET_OS_VISION || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000)
      ^
  /Users/opencv-cn/GHA-OCV-4/_work/opencv/opencv/opencv/modules/videoio/src/cap_avfoundation.mm:1230:5: warning: 'TARGET_OS_VISION' is not defined, evaluates to 0 [-Wundef]
  #if TARGET_OS_VISION || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
      ^
  5 warnings and 1 error generated.

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.

2 participants