applemedia: enable avfvideosrc if AVFoundation is present

This commit is contained in:
Matthieu Bouron 2013-10-30 12:40:01 +00:00 committed by Andoni Morales Alastruey
parent b6925d5c56
commit 0d74dc802a
2 changed files with 17 additions and 5 deletions

View file

@ -75,12 +75,10 @@ if HAVE_IOS
libgstapplemedia_la_SOURCES += \ libgstapplemedia_la_SOURCES += \
iosassetsrc.m iosassetsrc.m
# avfvideosrc.m
libgstapplemedia_la_LDFLAGS += \ libgstapplemedia_la_LDFLAGS += \
-Wl,-framework -Wl,Foundation \ -Wl,-framework -Wl,Foundation \
-Wl,-framework -Wl,AssetsLibrary -Wl,-framework -Wl,AssetsLibrary
# -Wl,-framework -Wl,AVFoundation
else else
@ -95,3 +93,12 @@ libgstapplemedia_la_LDFLAGS += \
endif endif
if HAVE_AVFOUNDATION
libgstapplemedia_la_SOURCES += \
avfvideosrc.m
libgstapplemedia_la_LDFLAGS += \
-Wl,-framework -Wl,AVFoundation
endif

View file

@ -22,11 +22,13 @@
#endif #endif
#ifdef HAVE_IOS #ifdef HAVE_IOS
#include "avfvideosrc.h"
#include "iosassetsrc.h" #include "iosassetsrc.h"
#else #else
#include "qtkitvideosrc.h" #include "qtkitvideosrc.h"
#endif
#ifdef HAVE_AVFOUNDATION
#include <Foundation/Foundation.h> #include <Foundation/Foundation.h>
#include "avfvideosrc.h"
#endif #endif
#include "vth264decbin.h" #include "vth264decbin.h"
#include "vth264encbin.h" #include "vth264encbin.h"
@ -53,8 +55,6 @@ plugin_init (GstPlugin * plugin)
#ifdef HAVE_IOS #ifdef HAVE_IOS
res &= gst_element_register (plugin, "iosassetsrc", GST_RANK_SECONDARY, res &= gst_element_register (plugin, "iosassetsrc", GST_RANK_SECONDARY,
GST_TYPE_IOS_ASSET_SRC); GST_TYPE_IOS_ASSET_SRC);
res &= gst_element_register (plugin, "avfvideosrc", GST_RANK_NONE,
GST_TYPE_AVF_VIDEO_SRC);
#else #else
enable_mt_mode (); enable_mt_mode ();
@ -62,6 +62,11 @@ plugin_init (GstPlugin * plugin)
GST_TYPE_QTKIT_VIDEO_SRC); GST_TYPE_QTKIT_VIDEO_SRC);
#endif #endif
#ifdef HAVE_AVFOUNDATION
res &= gst_element_register (plugin, "avfvideosrc", GST_RANK_NONE,
GST_TYPE_AVF_VIDEO_SRC);
#endif
#if 0 #if 0
res &= gst_element_register (plugin, "vth264decbin", GST_RANK_NONE, res &= gst_element_register (plugin, "vth264decbin", GST_RANK_NONE,
GST_TYPE_VT_H264_DEC_BIN); GST_TYPE_VT_H264_DEC_BIN);