Skip to content

Commit

Permalink
configure.ac: disable screen cap in macOS 15
Browse files Browse the repository at this point in the history
macOS 15 drops support for the API we used for the screen capture in
favor of ScreenCaptureKit, the error is:
```
src/video_capture/screen_osx.c:109:28: error: 'CGDisplayCreateImage'
is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit
instead.
  109 |         CGImageRef image = CGDisplayCreateImage(s->display);
      |                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:383:33:
note: 'CGDisplayCreateImage' has been explicitly marked unavailable here
  383 | CG_EXTERN CGImageRef __nullable
  CGDisplayCreateImage(CGDirectDisplayID displayID)
```
  • Loading branch information
MartinPulec committed Sep 18, 2024
1 parent 58aad91 commit 7b70622
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2110,8 +2110,10 @@ AC_ARG_ENABLE(screen,

case "$system" in
MacOSX)
screen_cap=yes
SCREEN_CAP_LIB="-framework CoreFoundation"
if test "$os_version_major" -lt 24; then # Darwin 24.0.0 is macOS 15
screen_cap=yes
SCREEN_CAP_LIB="-framework CoreFoundation"
fi
;;
Windows)
screen_cap=$dshow
Expand Down

0 comments on commit 7b70622

Please sign in to comment.