[vlc-devel] [PATCH 5/5] avaudiocapture: Inform user when microphone access is not granted

david.fuhrmann at gmail.com david.fuhrmann at gmail.com
Mon Feb 10 19:41:55 CET 2020


From: David Fuhrmann <dfuhrmann at videolan.org>

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 aea90ab3546ff343a1dd4a34a94d75e1a35fb83c)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>
---
 modules/access/avaudiocapture.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/access/avaudiocapture.m b/modules/access/avaudiocapture.m
index c4d2098762..e20d8aadf3 100644
--- a/modules/access/avaudiocapture.m
+++ b/modules/access/avaudiocapture.m
@@ -233,6 +233,10 @@ static int Open(vlc_object_t *p_this)
             dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
             if (!accessGranted) {
                 msg_Err(p_demux, "Can't use the audio 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 microphone."));
+
                 return VLC_EGENERIC;
             }
         }
-- 
2.21.1 (Apple Git-122.3)



More information about the vlc-devel mailing list