mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
avfvideosrc: element requests camera permissions even with capture-screen property is true
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1137 macOS has different dialogs for camera capture and screen capture. No need to request screen capture permissions, the system detect screen capture automatically and create request dialog.
This commit is contained in:
parent
a400126889
commit
5da2938244
1 changed files with 4 additions and 0 deletions
|
@ -430,6 +430,9 @@ static AVCaptureVideoOrientation GstAVFVideoSourceOrientation2AVCaptureVideoOrie
|
|||
// Since Mojave, permissions are now supposed to be explicitly granted
|
||||
// before performing anything on a device
|
||||
if (@available(macOS 10.14, *)) {
|
||||
if (captureScreen)
|
||||
goto checked;
|
||||
|
||||
// Check if permission has already been granted (or denied)
|
||||
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
|
||||
switch (authStatus) {
|
||||
|
@ -466,6 +469,7 @@ static AVCaptureVideoOrientation GstAVFVideoSourceOrientation2AVCaptureVideoOrie
|
|||
}
|
||||
}
|
||||
|
||||
checked:
|
||||
dispatch_sync (mainQueue, ^{
|
||||
BOOL ret;
|
||||
|
||||
|
|
Loading…
Reference in a new issue