Commit 807b0322 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

applemedia: Conditionally compile qtkitvideosrc

The API was deprecated in 10.9 and apparently does not exist in the SDK for
macOS Sierra anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=770587
parent 840c2729
...@@ -543,6 +543,7 @@ dnl *** plug-ins to exclude *** ...@@ -543,6 +543,7 @@ dnl *** plug-ins to exclude ***
AC_CHECK_HEADER(AVFoundation/AVFoundation.h, HAVE_AVFOUNDATION="yes", HAVE_AVFOUNDATION="no", [-]) 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(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
AC_CHECK_HEADER(VideoToolbox/VideoToolbox.h, HAVE_VIDEOTOOLBOX="yes", HAVE_VIDEOTOOLBOX="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 if test "x$HAVE_VIDEOTOOLBOX" = "xyes"; then
old_LIBS=$LIBS old_LIBS=$LIBS
...@@ -569,6 +570,10 @@ if test "x$HAVE_VIDEOTOOLBOX" = "xyes"; then ...@@ -569,6 +570,10 @@ if test "x$HAVE_VIDEOTOOLBOX" = "xyes"; then
AC_DEFINE(HAVE_VIDEOTOOLBOX, 1, [Define if building with VideoToolbox]) AC_DEFINE(HAVE_VIDEOTOOLBOX, 1, [Define if building with VideoToolbox])
fi 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 disable gst plugins we might not be able to build on this
dnl platform: (ugly but minimally invasive) dnl platform: (ugly but minimally invasive)
dnl FIXME: maybe move to sys, or make work with winsock2 dnl FIXME: maybe move to sys, or make work with winsock2
......
...@@ -94,17 +94,23 @@ libgstapplemedia_la_LDFLAGS += \ ...@@ -94,17 +94,23 @@ libgstapplemedia_la_LDFLAGS += \
else else
libgstapplemedia_la_SOURCES += \ libgstapplemedia_la_SOURCES += \
qtkitvideosrc.m \
iosurfacememory.c iosurfacememory.c
libgstapplemedia_la_LDFLAGS += \ libgstapplemedia_la_LDFLAGS += \
-Wl,-framework -Wl,Cocoa \ -Wl,-framework -Wl,Cocoa \
-Wl,-framework -Wl,QTKit \
-Wl,-framework -Wl,OpenGL \ -Wl,-framework -Wl,OpenGL \
-Wl,-framework -Wl,IOSurface -Wl,-framework -Wl,IOSurface
endif endif
if HAVE_QTKIT
libgstapplemedia_la_SOURCES += \
qtkitvideosrc.m
libgstapplemedia_la_LDFLAGS += \
-Wl,-framework -Wl,QTKit
endif
if HAVE_AVFOUNDATION if HAVE_AVFOUNDATION
libgstapplemedia_la_SOURCES += \ libgstapplemedia_la_SOURCES += \
......
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
#include "corevideomemory.h" #include "corevideomemory.h"
#ifdef HAVE_IOS #ifdef HAVE_IOS
#include "iosassetsrc.h" #include "iosassetsrc.h"
#else #endif
#ifdef HAVE_QTKIT
#include "qtkitvideosrc.h" #include "qtkitvideosrc.h"
#endif #endif
#ifdef HAVE_AVFOUNDATION #ifdef HAVE_AVFOUNDATION
...@@ -73,7 +74,9 @@ plugin_init (GstPlugin * plugin) ...@@ -73,7 +74,9 @@ plugin_init (GstPlugin * plugin)
GST_TYPE_IOS_ASSET_SRC); GST_TYPE_IOS_ASSET_SRC);
#else #else
enable_mt_mode (); enable_mt_mode ();
#endif
#ifdef HAVE_QTKIT
res = gst_element_register (plugin, "qtkitvideosrc", GST_RANK_SECONDARY, res = gst_element_register (plugin, "qtkitvideosrc", GST_RANK_SECONDARY,
GST_TYPE_QTKIT_VIDEO_SRC); GST_TYPE_QTKIT_VIDEO_SRC);
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment