[vlc-commits] avcapture: Inform user when camera access is not granted
David Fuhrmann
git at videolan.org
Thu Feb 6 22:32:35 CET 2020
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu Feb 6 22:30:29 2020 +0100| [3428ad684d5b6a82a2d0adae8f7928bd8005dca2] | committer: David Fuhrmann
avcapture: Inform user when camera access is not granted
macOS only asks once when requesting ressource access. If the user
declines for some reason, VLC will error out silently in subsequent
tries. Lets inform the user and explain better what he needs to
change in order to gain access again.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3428ad684d5b6a82a2d0adae8f7928bd8005dca2
---
modules/access/avcapture.m | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/access/avcapture.m b/modules/access/avcapture.m
index cbc5afb198..df3e3b082a 100644
--- a/modules/access/avcapture.m
+++ b/modules/access/avcapture.m
@@ -343,6 +343,10 @@ static int Open(vlc_object_t *p_this)
dispatch_release(sema);
if (!accessGranted) {
msg_Err(p_demux, "Can't use the video device as access has not been granted by the user");
+ vlc_dialog_display_error(p_demux, _("Problem accessing a system resource"),
+ _("Please open \"System Preferences\" -> \"Security & Privacy\" "
+ "and allow VLC to access your camera."));
+
goto error;
}
}
More information about the vlc-commits
mailing list