diff --git a/configure.ac b/configure.ac index ce8327b5c1..2787b6ca76 100644 --- a/configure.ac +++ b/configure.ac @@ -543,6 +543,7 @@ dnl *** plug-ins to exclude *** AC_CHECK_HEADER(AVFoundation/AVFoundation.h, HAVE_AVFOUNDATION="yes", HAVE_AVFOUNDATION="no", [-]) AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-]) AC_CHECK_HEADER(VideoToolbox/VideoToolbox.h, HAVE_VIDEOTOOLBOX="yes", HAVE_VIDEOTOOLBOX="no", [-]) +AC_CHECK_HEADER(QTKit/QTKit.h, HAVE_QTKIT="yes", HAVE_QTKIT="no", [-]) if test "x$HAVE_VIDEOTOOLBOX" = "xyes"; then old_LIBS=$LIBS @@ -569,6 +570,10 @@ if test "x$HAVE_VIDEOTOOLBOX" = "xyes"; then AC_DEFINE(HAVE_VIDEOTOOLBOX, 1, [Define if building with VideoToolbox]) fi +AM_CONDITIONAL(HAVE_QTKIT, test "x$HAVE_QTKIT" = "xyes") +if test "x$HAVE_QTKIT" = "xyes"; then + AC_DEFINE(HAVE_QTKIT, 1, [Define if building with QTKit]) +fi dnl disable gst plugins we might not be able to build on this dnl platform: (ugly but minimally invasive) dnl FIXME: maybe move to sys, or make work with winsock2 diff --git a/sys/applemedia/Makefile.am b/sys/applemedia/Makefile.am index 094cce5702..d77e47c7bc 100644 --- a/sys/applemedia/Makefile.am +++ b/sys/applemedia/Makefile.am @@ -94,17 +94,23 @@ libgstapplemedia_la_LDFLAGS += \ else libgstapplemedia_la_SOURCES += \ - qtkitvideosrc.m \ iosurfacememory.c libgstapplemedia_la_LDFLAGS += \ -Wl,-framework -Wl,Cocoa \ - -Wl,-framework -Wl,QTKit \ -Wl,-framework -Wl,OpenGL \ -Wl,-framework -Wl,IOSurface endif +if HAVE_QTKIT +libgstapplemedia_la_SOURCES += \ + qtkitvideosrc.m + +libgstapplemedia_la_LDFLAGS += \ + -Wl,-framework -Wl,QTKit +endif + if HAVE_AVFOUNDATION libgstapplemedia_la_SOURCES += \ diff --git a/sys/applemedia/plugin.m b/sys/applemedia/plugin.m index e1e8e9e170..19384c7b80 100644 --- a/sys/applemedia/plugin.m +++ b/sys/applemedia/plugin.m @@ -25,7 +25,8 @@ #include "corevideomemory.h" #ifdef HAVE_IOS #include "iosassetsrc.h" -#else +#endif +#ifdef HAVE_QTKIT #include "qtkitvideosrc.h" #endif #ifdef HAVE_AVFOUNDATION @@ -73,7 +74,9 @@ plugin_init (GstPlugin * plugin) GST_TYPE_IOS_ASSET_SRC); #else enable_mt_mode (); +#endif +#ifdef HAVE_QTKIT res = gst_element_register (plugin, "qtkitvideosrc", GST_RANK_SECONDARY, GST_TYPE_QTKIT_VIDEO_SRC); #endif