summaryrefslogtreecommitdiff
path: root/sys/applemedia/plugin.m
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-09-17 10:38:20 +0300
committerSebastian Dröge <sebastian@centricular.com>2014-09-17 10:38:20 +0300
commit82aae4df74c269765ccfe66c486fbcf3ae01f086 (patch)
tree4928564de87685f1e0472bf7f294b44491ef0bbf /sys/applemedia/plugin.m
parent8b0030d044c7e43e7cde3e51f549453158e6841d (diff)
downloadgstreamer-plugins-bad-82aae4df74c269765ccfe66c486fbcf3ae01f086.tar.gz
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.
Diffstat (limited to 'sys/applemedia/plugin.m')
-rw-r--r--sys/applemedia/plugin.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/applemedia/plugin.m b/sys/applemedia/plugin.m
index e85f67a6a..b9d82b3a7 100644
--- a/sys/applemedia/plugin.m
+++ b/sys/applemedia/plugin.m
@@ -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;