From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 0A8FA4BA87
	for <ffmpegdev@gitmailbox.com>; Tue,  1 Apr 2025 16:02:25 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1ED08687D61;
	Tue,  1 Apr 2025 19:02:08 +0300 (EEST)
Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com
 [209.85.167.50])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D194D687D3D
 for <ffmpeg-devel@ffmpeg.org>; Tue,  1 Apr 2025 19:02:00 +0300 (EEST)
Received: by mail-lf1-f50.google.com with SMTP id
 2adb3069b0e04-549b116321aso6683917e87.3
 for <ffmpeg-devel@ffmpeg.org>; Tue, 01 Apr 2025 09:02:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=martin-st.20230601.gappssmtp.com; s=20230601; t=1743523320; x=1744128120;
 darn=ffmpeg.org; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=lIGYxEaaCBQNbppMljqWdx3wZMDUwBlFgyTBYGaPPpA=;
 b=AACbDQSb1xW3UbaZgO2fWeQnWImqCDHsaFMXfSNrWMaVRy25WIyBbIN4AqrmO6YQDL
 HYlf10/JBpPau1mieKv9jjoT9kmTrRV68yBmkLgLIgPRei6tca+1S8eDTD+Ps5yhlLyy
 PAJSgNLPHrXZe0tojE0aOE29KTMIKDGFjQEg9T15NzMClebKYD+R7K0a3ux3ZsNZNduD
 vwl015KCOYV4nlbtb3C+ZMllOw90mA+Al2qLuktHOeQKIgYhzi9g8kpyOykY3zw+zBo9
 UZVhNggIsf2ThTcmCctRdp6AlEBBxoOiAsZ0jHe8+n4+zWP+lQQkZ5zs0l7kd7kF6dsG
 WdXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743523320; x=1744128120;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=lIGYxEaaCBQNbppMljqWdx3wZMDUwBlFgyTBYGaPPpA=;
 b=Hu0KlnofYsHNpx6bK6u1WD/ufr/Ev37UIiQRPAUnIyTYb6gobgOh+IgLymHJgXOy+N
 0lj2crB1FHL5XB7fxRC1+bthOSLn3OnrZigqdfvnwmL/zo+qtjd2uaNOH8AksWjbHmmC
 pLDOVUjUF703r34NhAy+ASlT8e5rsdRZhOWzE3SgZqq/q79Hr+Q2VslSy+c0TTbktqh7
 JtFbYwF8k5OFHkElVdeGNYM8FAhelvdGhYJmaTcIMI9iNniCsWu0wkM5r9Sz29pixZ/9
 QjL03NX9y/fICvcAZyHEOBemvdjX1vSD75lEXGceuzur59Y9cwuoT3gkjyg0KsNfyIG8
 2t5Q==
X-Gm-Message-State: AOJu0YwMuAhBBitT1OltQB1kY6th62LFse8pht+uLpm4Ve2srb++ZbCa
 Ks6ynmPEmpzFKiJfPYkB3o6tPBp+5WskT/mx/TBKZsLLWuFZ5/6/UP6WRFo1bL/EzDD42Aui1Qu
 Bkg==
X-Gm-Gg: ASbGncsJ16HezFIU4ZorJVDMdIB++WqkotQfJ55C6t/nkVLCboQeAZkUN11yynSFrPI
 /1zkn1JXMYcMeB18kJgki9JM/Yy5NXqWZ6yHMmlUWsUEwR4pBgj0Dmk61iOi7Xdu7kIJk/S0Twq
 YsPK2vdC/0xcODedMJ3MoA2WovNaOYYS7m3tQWRww5Mzn+0QvHQvQ97x/6DOD3AOo6+y4raOWqH
 FOy84nuGj7gJfVVaMbNyOM0ikTAcCCGWOGxK2C8qmZb1lQiVCJeuN3SPj2JxGlPjAqUfLG+JPae
 Jth0arectUCtVbFlYIWJjNuu0idl9upn/t9x+Q4Ew0GPXfkYCBGFN71y0E8DdcV7J9A=
X-Google-Smtp-Source: AGHT+IGwje3sa/qWU8KtbabPIMFhs8PKBJqeEyTYi7BGOStnTbOcqsGXHv1GRm4dKnr9rEJSyifPYA==
X-Received: by 2002:ac2:51d1:0:b0:54b:117c:8ef5 with SMTP id
 2adb3069b0e04-54b117c8f37mr4532940e87.56.1743523318235; 
 Tue, 01 Apr 2025 09:01:58 -0700 (PDT)
Received: from localhost (host-97-144.parnet.fi. [77.234.97.144])
 by smtp.gmail.com with ESMTPSA id
 38308e7fff4ca-30dd2ab9705sm18131741fa.46.2025.04.01.09.01.57
 (version=TLS1 cipher=AES128-SHA bits=128/128);
 Tue, 01 Apr 2025 09:01:57 -0700 (PDT)
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
To: ffmpeg-devel@ffmpeg.org
Date: Tue,  1 Apr 2025 19:01:54 +0300
Message-Id: <20250401160154.87223-2-martin@martin.st>
X-Mailer: git-send-email 2.39.5 (Apple Git-154)
In-Reply-To: <20250401160154.87223-1-martin@martin.st>
References: <20250401160154.87223-1-martin@martin.st>
MIME-Version: 1.0
Subject: [FFmpeg-devel] [PATCH 2/2] configure: Check for AVCaptureSession as
 dependency to avfoundation
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Marvin Scholz <epirat07@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250401160154.87223-2-martin@martin.st/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

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".