ffmpeg | branch: master | Martin Storsjö <mar...@martin.st> | Tue Mar 25 
22:12:26 2025 +0200| [8284ba2a218b623712bec7ac6576724bd0db7af4] | committer: 
Martin Storsjö

configure: Check for AVCaptureSession as dependency to avfoundation

This class is unavailable on tvOS before 17.0 (and macOS before 10.7
and iOS before 4.0, but those are fairly ancient). This makes sure
that we don't try to build the avfoundation indevice for such
OSes.

Signed-off-by: Martin Storsjö <mar...@martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8284ba2a218b623712bec7ac6576724bd0db7af4
---

 configure | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 6942e92636..fb79b497ce 100755
--- a/configure
+++ b/configure
@@ -1619,6 +1619,15 @@ check_type(){
     test_code cc "$headers" "$type v" "$@" && enable_sanitized "$type"
 }
 
+check_objc_class(){
+    log check_objc_class "$@"
+    headers=$1
+    type=$2
+    shift 2
+    disable_sanitized "$type"
+    test_code objcc "$headers" "$type* v" "$@" && enable_sanitized "$type"
+}
+
 check_struct(){
     log check_struct "$@"
     headers=$1
@@ -3738,7 +3747,7 @@ xwma_demuxer_select="riffdec"
 android_camera_indev_deps="android camera2ndk mediandk pthreads"
 alsa_indev_deps="alsa"
 alsa_outdev_deps="alsa"
-avfoundation_indev_deps="avfoundation corevideo coremedia pthreads"
+avfoundation_indev_deps="avfoundation corevideo coremedia pthreads 
AVCaptureSession"
 avfoundation_indev_suggest="coregraphics applicationservices"
 avfoundation_indev_extralibs="-framework Foundation"
 audiotoolbox_outdev_deps="audiotoolbox pthreads AudioObjectPropertyAddress"
@@ -6735,7 +6744,9 @@ enabled audiotoolbox && {
 enabled avfoundation && {
     disable coregraphics applicationservices
     check_lib coregraphics        CoreGraphics/CoreGraphics.h               
CGGetActiveDisplayList "-framework CoreGraphics" ||
-    check_lib applicationservices ApplicationServices/ApplicationServices.h 
CGGetActiveDisplayList "-framework ApplicationServices"; }
+    check_lib applicationservices ApplicationServices/ApplicationServices.h 
CGGetActiveDisplayList "-framework ApplicationServices"
+    check_objc_class AVFoundation/AVFoundation.h AVCaptureSession
+}
 
 enabled videotoolbox && {
     check_lib coreservices CoreServices/CoreServices.h UTGetOSTypeFromString 
"-framework CoreServices"

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to