summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/applemedia/Makefile.am16
-rw-r--r--sys/applemedia/plugin.m11
2 files changed, 17 insertions, 10 deletions
diff --git a/sys/applemedia/Makefile.am b/sys/applemedia/Makefile.am
index fc8199c2d..ecbaf0895 100644
--- a/sys/applemedia/Makefile.am
+++ b/sys/applemedia/Makefile.am
@@ -54,10 +54,6 @@ libgstapplemedia_la_LDFLAGS = \
-Wl,-framework -Wl,CoreVideo \
-Wl,-framework -Wl,AudioToolbox
-if !HAVE_IOS
-libgstapplemedia_la_LDFLAGS += -Wl,-framework -Wl,VideoToolbox
-endif
-
noinst_HEADERS = \
qtkitvideosrc.h \
avfvideosrc.h \
@@ -88,9 +84,7 @@ libgstapplemedia_la_LDFLAGS += \
else
libgstapplemedia_la_SOURCES += \
- qtkitvideosrc.m \
- vtenc.c \
- vtdec.c
+ qtkitvideosrc.m
libgstapplemedia_la_LDFLAGS += \
-Wl,-framework -Wl,Cocoa \
@@ -108,3 +102,11 @@ libgstapplemedia_la_LDFLAGS += \
-Wl,-framework -Wl,AVFoundation
endif
+
+if HAVE_VIDEOTOOLBOX
+libgstapplemedia_la_SOURCES += \
+ vtenc.c \
+ vtdec.c
+
+libgstapplemedia_la_LDFLAGS += -Wl,-framework -Wl,VideoToolbox
+endif
diff --git a/sys/applemedia/plugin.m b/sys/applemedia/plugin.m
index 5486ae04a..1205f9ff8 100644
--- a/sys/applemedia/plugin.m
+++ b/sys/applemedia/plugin.m
@@ -31,18 +31,23 @@
#include "avfvideosrc.h"
#include "avfassetsrc.h"
#endif
+#ifdef HAVE_VIDEOTOOLBOX
+#include "vtdec.h"
+#endif
#ifndef HAVE_IOS
#define AV_RANK GST_RANK_SECONDARY
#include "vth264decbin.h"
#include "vth264encbin.h"
-#include "vtdec.h"
#else
#define AV_RANK GST_RANK_PRIMARY
#endif
#include "atdec.h"
-#ifndef HAVE_IOS
+#ifdef HAVE_VIDEOTOOLBOX
void gst_vtenc_register_elements (GstPlugin * plugin);
+#endif
+
+#ifndef HAVE_IOS
static void
enable_mt_mode (void)
@@ -84,7 +89,7 @@ plugin_init (GstPlugin * plugin)
#endif
res &= gst_element_register (plugin, "atdec", GST_RANK_PRIMARY, GST_TYPE_ATDEC);
-#ifndef HAVE_IOS
+#ifdef HAVE_VIDEOTOOLBOX
res &= gst_element_register (plugin, "vtdec", GST_RANK_PRIMARY, GST_TYPE_VTDEC);
gst_vtenc_register_elements (plugin);
#endif