Add "Description" pane to generic plugin UI for LV2 plugins with documentation (rdfs...
[ardour.git] / libs / ardour / lv2_plugin.cc
index bd628e46bdc0551841f88fa739229f355385c70c..c6509f02034d3852a489f623d33ed8089d6709b5 100644 (file)
@@ -584,6 +584,19 @@ LV2Plugin::get_parameter(uint32_t which) const
        return 0.0f;
 }
 
+std::string
+LV2Plugin::get_docs() const
+{
+       LilvNodes* comments = lilv_plugin_get_value(_impl->plugin, _world.rdfs_comment);
+       if (comments) {
+               const std::string docs(lilv_node_as_string(lilv_nodes_get_first(comments)));
+               lilv_nodes_free(comments);
+               return docs;
+       }
+
+       return "";
+}
+       
 std::string
 LV2Plugin::get_parameter_docs(uint32_t which) const
 {