Skip to content

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

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

alalek merged 2 commits into
opencv:masterfrom
mshabunin:fix-osx-camera-auth

Conversation

@mshabunin

@mshabunin mshabunin commented Apr 5, 2019 •

Copy link
Copy Markdown
Contributor

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.

@alalek alalek left a comment

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.

Looks good to me! Thank you 👍

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

jeroen commented Apr 5, 2019 •

Copy link
Copy Markdown

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

alalek commented Apr 5, 2019

Copy link
Copy Markdown
Member

__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

alalek commented Apr 5, 2019

Copy link
Copy Markdown
Member

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

@jeroen

jeroen commented Apr 5, 2019 •

Copy link
Copy Markdown

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