mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
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:
parent
8b0030d044
commit
82aae4df74
2 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue