lv2: skip plugins that need host features
authorStefan Sauer <ensonic@users.sf.net>
Wed, 11 May 2016 05:04:48 +0000 (22:04 -0700)
committerStefan Sauer <ensonic@users.sf.net>
Wed, 11 May 2016 05:04:48 +0000 (22:04 -0700)
We haven't implemented this yet and those plugin would fail when we instantiate
them.

ext/lv2/gstlv2.c

index 4d5aeff7cd3338bf4d6793c676a2d478761acd69..d15cbeb7d0c994d4e1ec70fbf97927707c94b73a 100644 (file)
@@ -64,6 +64,7 @@ lv2_plugin_discover (GstPlugin * plugin)
       i = lilv_plugins_next (plugins, i)) {
     const LilvPlugin *lv2plugin = lilv_plugins_get (plugins, i);
     const gchar *plugin_uri, *p;
+    LilvNodes *required_features;
     gchar *type_name;
     GHashTable *port_groups = g_hash_table_new_full (g_str_hash, g_str_equal,
         g_free, NULL);
@@ -82,6 +83,15 @@ lv2_plugin_discover (GstPlugin * plugin)
     if (g_type_from_name (type_name))
       goto next;
 
+    /* check if we support the required host features */
+    required_features = lilv_plugin_get_required_features (lv2plugin);
+    if (required_features) {
+      GST_FIXME ("lv2 plugin %s needs host features", plugin_uri);
+      // TODO: implement host features, will be passed to
+      // lilv_plugin_instantiate()
+      goto next;
+    }
+
     /* check if this has any audio ports */
     num_sink_pads = num_src_pads = 0;
     for (j = 0; j < lilv_plugin_get_num_ports (lv2plugin); j++) {