Commit 0258ec02 authored by Alessandro Decina's avatar Alessandro Decina

applemedia: enable vtdec and vtenc only on >= 10.8 where VideoToolbox is public

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=723670
parent 92dbcf2b
......@@ -501,6 +501,7 @@ fi
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", [-])
AM_CONDITIONAL(HAVE_AVFOUNDATION, test "x$HAVE_AVFOUNDATION" = "xyes")
if test "x$HAVE_AVFOUNDATION" = "xyes"; then
......@@ -512,6 +513,11 @@ if test "x$HAVE_IOS" = "xyes"; then
AC_DEFINE(HAVE_IOS, 1, [Define if building for Apple iOS])
fi
AM_CONDITIONAL(HAVE_VIDEOTOOLBOX, test "x$HAVE_VIDEOTOOLBOX" = "xyes")
if test "x$HAVE_VIDEOTOOLBOX" = "xyes"; then
AC_DEFINE(HAVE_VIDEOTOOLBOX, 1, [Define if building with VideoToolbox])
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
......
......@@ -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
......@@ -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
......
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