[vlc-commits] avcapture: Inform user when camera access is not granted

David Fuhrmann git at videolan.org
Mon Feb 10 18:32:50 CET 2020


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu Feb  6 22:30:29 2020 +0100| [70acb2113bad228d0be1d861949cb784a6b7e85f] | 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.

(cherry picked from commit 3428ad684d5b6a82a2d0adae8f7928bd8005dca2)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=70acb2113bad228d0be1d861949cb784a6b7e85f
---

 modules/access/avcapture.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/access/avcapture.m b/modules/access/avcapture.m
index 38777226cf..b2813f5701 100644
--- a/modules/access/avcapture.m
+++ b/modules/access/avcapture.m
@@ -347,6 +347,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