mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
lv2: shorter element names
Cut off the protocol part from the uri. Also just g_Strdup, instead of printf the name.
This commit is contained in:
parent
f3122f2b30
commit
8f1bb31255
2 changed files with 17 additions and 3 deletions
|
@ -13,6 +13,14 @@ Example Pipeline:
|
||||||
|
|
||||||
Requires swh-lv2 <http://plugin.org.uk/releases/>
|
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)
|
(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
|
||||||
|
|
||||||
|
|
|
@ -790,6 +790,7 @@ lv2_plugin_discover (void)
|
||||||
for (i = 0; i < slv2_plugins_size (plugins); ++i) {
|
for (i = 0; i < slv2_plugins_size (plugins); ++i) {
|
||||||
SLV2Plugin lv2plugin = slv2_plugins_get_at (plugins, i);
|
SLV2Plugin lv2plugin = slv2_plugins_get_at (plugins, i);
|
||||||
gint num_audio_ports = 0;
|
gint num_audio_ports = 0;
|
||||||
|
const gchar *plugin_uri, *p;
|
||||||
gchar *type_name;
|
gchar *type_name;
|
||||||
GTypeInfo typeinfo = {
|
GTypeInfo typeinfo = {
|
||||||
sizeof (GstLV2Class),
|
sizeof (GstLV2Class),
|
||||||
|
@ -804,9 +805,14 @@ lv2_plugin_discover (void)
|
||||||
};
|
};
|
||||||
GType type;
|
GType type;
|
||||||
|
|
||||||
|
plugin_uri = slv2_value_as_uri (slv2_plugin_get_uri (lv2plugin));
|
||||||
/* construct the type name from plugin URI */
|
/* construct the type name from plugin URI */
|
||||||
type_name = g_strdup_printf ("%s",
|
if ((p = strstr (plugin_uri, "://"))) {
|
||||||
slv2_value_as_uri (slv2_plugin_get_uri (lv2plugin)));
|
/* 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 "-+", '-');
|
g_strcanon (type_name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-+", '-');
|
||||||
|
|
||||||
/* if it's already registered, drop it */
|
/* if it's already registered, drop it */
|
||||||
|
|
Loading…
Reference in a new issue