Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: ffmpeg-devel@ffmpeg.org
Cc: Marvin Scholz <epirat07@gmail.com>
Subject: [FFmpeg-devel] [PATCH 2/2] configure: Check for AVCaptureSession as dependency to avfoundation
Date: Tue,  1 Apr 2025 19:01:54 +0300
Message-ID: <20250401160154.87223-2-martin@martin.st> (raw)
In-Reply-To: <20250401160154.87223-1-martin@martin.st>

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.
---
 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"
-- 
2.39.5 (Apple Git-154)

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

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

  reply	other threads:[~2025-04-01 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 16:01 [FFmpeg-devel] [PATCH 1/2] avfoundation: Fix compilation for OSes other than macOS and iOS Martin Storsjö
2025-04-01 16:01 ` Martin Storsjö [this message]
2025-04-04  7:31   ` [FFmpeg-devel] [PATCH 2/2] configure: Check for AVCaptureSession as dependency to avfoundation Martin Storsjö
2025-04-04 14:17     ` Martin Storsjö

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250401160154.87223-2-martin@martin.st \
    --to=martin@martin.st \
    --cc=epirat07@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git