summaryrefslogtreecommitdiff
path: root/ext/lv2
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2010-02-01 22:24:52 +0200
committerStefan Kost <ensonic@users.sf.net>2010-02-01 22:24:52 +0200
commit8f1bb31255e5ca2a1a300c60c6a54460101e014c (patch)
treeac0c06cf67125aa80ef195cd14ceb611b24a572a /ext/lv2
parentf3122f2b3071ed8b5b3907096f22b7a06ae40dc3 (diff)
lv2: shorter element names
Cut off the protocol part from the uri. Also just g_Strdup, instead of printf the name.
Diffstat (limited to 'ext/lv2')
-rw-r--r--ext/lv2/README10
-rw-r--r--ext/lv2/gstlv2.c10
2 files changed, 17 insertions, 3 deletions
diff --git a/ext/lv2/README b/ext/lv2/README
index d1431b770..211f79e34 100644
--- a/ext/lv2/README
+++ b/ext/lv2/README
@@ -13,6 +13,14 @@ Example Pipeline:
Requires swh-lv2 <http://plugin.org.uk/releases/>
-gst-launch-0.10 -v filesrc location=/usr/share/sounds/login.wav ! wavparse ! audioconvert ! http---plugin-org-uk-swh-plugins-djFlanger ! audioconvert ! alsasink
+gst-launch-0.10 -v filesrc location=/usr/share/sounds/login.wav ! wavparse ! audioconvert ! plugin-org-uk-swh-plugins-djFlanger ! audioconvert ! alsasink
(A longer wav will be a better example)
+
+
+Requires calf <http://calf.sourceforge.net/>
+
+GST_DEBUG="*:2,gst-dsp:5,lv2:5"
+gst-launch calf-sourceforge-net-plugins-Monosynth event-in="C-3" ! pulsesink
+gst-launch calf-sourceforge-net-plugins-Monosynth event-in="C-3" name=ms ! pulsesink ms. ! fakesink
+
diff --git a/ext/lv2/gstlv2.c b/ext/lv2/gstlv2.c
index 2dc157ec4..bb8cfc89a 100644
--- a/ext/lv2/gstlv2.c
+++ b/ext/lv2/gstlv2.c
@@ -790,6 +790,7 @@ lv2_plugin_discover (void)
for (i = 0; i < slv2_plugins_size (plugins); ++i) {
SLV2Plugin lv2plugin = slv2_plugins_get_at (plugins, i);
gint num_audio_ports = 0;
+ const gchar *plugin_uri, *p;
gchar *type_name;
GTypeInfo typeinfo = {
sizeof (GstLV2Class),
@@ -804,9 +805,14 @@ lv2_plugin_discover (void)
};
GType type;
+ plugin_uri = slv2_value_as_uri (slv2_plugin_get_uri (lv2plugin));
/* construct the type name from plugin URI */
- type_name = g_strdup_printf ("%s",
- slv2_value_as_uri (slv2_plugin_get_uri (lv2plugin)));
+ if ((p = strstr (plugin_uri, "://"))) {
+ /* cut off the protocol (e.g. http://) */
+ type_name = g_strdup (&p[3]);
+ } else {
+ type_name = g_strdup (plugin_uri);
+ }
g_strcanon (type_name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-+", '-');
/* if it's already registered, drop it */