applemedia: Do weak linking with the VideoToolbox framework

It does not exist on older OSX and iOS but we still want to
be able to use it when it's available.
This commit is contained in:
Sebastian Dröge 2014-09-17 10:38:20 +03:00
parent 8b0030d044
commit 82aae4df74
2 changed files with 6 additions and 3 deletions

View file

@ -96,5 +96,5 @@ libgstapplemedia_la_SOURCES += \
vtenc.c \
vtdec.c
libgstapplemedia_la_LDFLAGS += -Wl,-framework -Wl,VideoToolbox
libgstapplemedia_la_LDFLAGS += -Wl,-weak_framework -Wl,VideoToolbox
endif

View file

@ -90,8 +90,11 @@ plugin_init (GstPlugin * plugin)
res &= gst_element_register (plugin, "atdec", GST_RANK_MARGINAL, GST_TYPE_ATDEC);
#ifdef HAVE_VIDEOTOOLBOX
res &= gst_element_register (plugin, "vtdec", GST_RANK_PRIMARY, GST_TYPE_VTDEC);
gst_vtenc_register_elements (plugin);
/* Check if the framework actually exists at runtime */
if (VTCompressionSessionCreate != NULL) {
res &= gst_element_register (plugin, "vtdec", GST_RANK_PRIMARY, GST_TYPE_VTDEC);
gst_vtenc_register_elements (plugin);
}
#endif
return res;