[FFmpeg-devel] [PATCH] configure: Check linking against CoreGraphics or, ApplicationServices framework for avfoundation input device.

Thilo Borgmann thilo.borgmann at mail.de
Wed Feb 4 13:48:53 CET 2015


Hi,

fixes Ticket #4238.

Testing for CGImageGetTypeID function is questionable (see trac discussion).
If someone has a better idea, please let me know.

-Thilo
-------------- next part --------------
From be77bd85b61a922b442235ef7a0c494137672890 Mon Sep 17 00:00:00 2001
From: Thilo Borgmann <thilo.borgmann at mail.de>
Date: Wed, 4 Feb 2015 13:44:43 +0100
Subject: [PATCH] configure: Check linking against CoreGraphics or
 ApplicationServices framework for avfoundation input device.

Fixes ticket #4238.
---
 configure | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 6d56f59..e3f49aa 100755
--- a/configure
+++ b/configure
@@ -2483,7 +2483,7 @@ xwma_demuxer_select="riffdec"
 # indevs / outdevs
 alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
 alsa_outdev_deps="alsa_asoundlib_h"
-avfoundation_indev_extralibs="-framework CoreVideo -framework Foundation -framework AVFoundation -framework CoreMedia -framework CoreGraphics"
+avfoundation_indev_extralibs="-framework CoreVideo -framework Foundation -framework AVFoundation -framework CoreMedia"
 avfoundation_indev_select="avfoundation"
 bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
 caca_outdev_deps="libcaca"
@@ -4868,7 +4868,11 @@ for func in $MATH_FUNCS; do
 done
 
 # these are off by default, so fail if requested and not available
-enabled avfoundation_indev && { check_header_oc AVFoundation/AVFoundation.h || disable avfoundation_indev; }
+enabled avfoundation_indev && check_header_oc AVFoundation/AVFoundation.h &&
+                                { check_lib2 CoreGraphics/CoreGraphics.h CGImageGetTypeID -Wl,-framework,CoreGraphics  ||
+                                  check_lib2 ApplicationServices/ApplicationServices.h CGImageGetTypeID -Wl,-framework,ApplicationServices ||
+                                  disable avfoundation_indev; }
+
 enabled avisynth          && { { check_lib2 "windows.h" LoadLibrary; } ||
                                { check_lib2 "dlfcn.h" dlopen -ldl; } ||
                                die "ERROR: LoadLibrary/dlopen not found for avisynth"; }
-- 
1.9.3 (Apple Git-50)


More information about the ffmpeg-devel mailing list