diff --git a/sys/applemedia/Makefile.am b/sys/applemedia/Makefile.am index ebd760223f..28a2ac24f6 100644 --- a/sys/applemedia/Makefile.am +++ b/sys/applemedia/Makefile.am @@ -75,12 +75,10 @@ if HAVE_IOS libgstapplemedia_la_SOURCES += \ iosassetsrc.m -# avfvideosrc.m libgstapplemedia_la_LDFLAGS += \ -Wl,-framework -Wl,Foundation \ -Wl,-framework -Wl,AssetsLibrary -# -Wl,-framework -Wl,AVFoundation else @@ -95,3 +93,12 @@ libgstapplemedia_la_LDFLAGS += \ endif +if HAVE_AVFOUNDATION + +libgstapplemedia_la_SOURCES += \ + avfvideosrc.m + +libgstapplemedia_la_LDFLAGS += \ + -Wl,-framework -Wl,AVFoundation + +endif diff --git a/sys/applemedia/plugin.m b/sys/applemedia/plugin.m index ae8279f3ca..e6292521e1 100644 --- a/sys/applemedia/plugin.m +++ b/sys/applemedia/plugin.m @@ -22,11 +22,13 @@ #endif #ifdef HAVE_IOS -#include "avfvideosrc.h" #include "iosassetsrc.h" #else #include "qtkitvideosrc.h" +#endif +#ifdef HAVE_AVFOUNDATION #include +#include "avfvideosrc.h" #endif #include "vth264decbin.h" #include "vth264encbin.h" @@ -53,8 +55,6 @@ plugin_init (GstPlugin * plugin) #ifdef HAVE_IOS res &= gst_element_register (plugin, "iosassetsrc", GST_RANK_SECONDARY, GST_TYPE_IOS_ASSET_SRC); - res &= gst_element_register (plugin, "avfvideosrc", GST_RANK_NONE, - GST_TYPE_AVF_VIDEO_SRC); #else enable_mt_mode (); @@ -62,6 +62,11 @@ plugin_init (GstPlugin * plugin) GST_TYPE_QTKIT_VIDEO_SRC); #endif +#ifdef HAVE_AVFOUNDATION + res &= gst_element_register (plugin, "avfvideosrc", GST_RANK_NONE, + GST_TYPE_AVF_VIDEO_SRC); +#endif + #if 0 res &= gst_element_register (plugin, "vth264decbin", GST_RANK_NONE, GST_TYPE_VT_H264_DEC_BIN);