Skip to content

Added authorization request to AVFoundation camera backend (OSX 10.14+)#14267

Merged
alalek merged 2 commits intoopencv:masterfrom
mshabunin:fix-osx-camera-auth
Apr 5, 2019
Merged

Added authorization request to AVFoundation camera backend (OSX 10.14+)#14267
alalek merged 2 commits intoopencv:masterfrom
mshabunin:fix-osx-camera-auth

Conversation

@mshabunin
Copy link
Copy Markdown
Contributor

@mshabunin mshabunin commented Apr 5, 2019

resolves #14258
resolves #12763

This pullrequest changes

Added authorization status check and authorization request to AVFoundation camera backend for OSX Mojave (10.14+).

Note: to be backported to 3.4 with part of #14156

force_builders_only=Mac,iOS

@mshabunin mshabunin added the backport is needed Label for maintainers. Authors of PR can ignore this label Apr 5, 2019
@mshabunin
Copy link
Copy Markdown
Contributor Author

@jeroen, @BluesJiang , please check if the fix works for you.

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.

Looks good to me! Thank you 👍

@alalek alalek merged commit aa1359d into opencv:master Apr 5, 2019
@jeroen
Copy link
Copy Markdown

jeroen commented Apr 5, 2019

Does __MAC_OS_X_VERSION_MAX_ALLOWED check the build-time version of MacOS or runtime version?

In our case, applications are built in MacOS 10.11 but the problem appears only when the application runs on MacOS 10.14+. So I'm not sure this would fix it?

@alalek
Copy link
Copy Markdown
Member

alalek commented Apr 5, 2019

__MAC_OS_X_VERSION_MAX_ALLOWED

It is build-time check.

Not sure if you can build code with 10.14 and after that run it on MacOS 10.11.

@alalek
Copy link
Copy Markdown
Member

alalek commented Apr 5, 2019

/cc @ilovezfs @fxcoudert Any idea how to deal with Mojave permissions properly? How is homebrew preparing pre-compiled bottles for different MacOS versions?

@jeroen
Copy link
Copy Markdown

jeroen commented Apr 5, 2019

Not sure if you can build code with 10.14 and after that run it on MacOS 10.11.

The other way around. The application and installer are built on MacOS 10.11, and users can then install it on MacOS 10.11 or greater. So you need to check the MacOS version at run-time...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: videoio(camera) platform: ios/osx port/backport done Label for maintainers. Authors of PR can ignore this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VideoCapture crashes on MacOS Mojave due to privacy protection OpenCV crash when open webcam using python cv2.VideoCapture(0)

3 participants