summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Robillard <dave@drobilla.net>2009-06-27 00:25:38 -0400
committerDave Robillard <dave@drobilla.net>2009-06-27 00:25:38 -0400
commit35bf93456372d0204c35e28ab105ab7d463a90d2 (patch)
tree9e25e3e3b289560fa3ee06059be05415746914ce
parent8f4785c4bbeeb8b25a50eacfcea7b915f7fb6802 (diff)
downloadgst-plugins-bad-35bf93456372d0204c35e28ab105ab7d463a90d2.tar.gz
gst-plugins-bad-35bf93456372d0204c35e28ab105ab7d463a90d2.tar.bz2
gst-plugins-bad-35bf93456372d0204c35e28ab105ab7d463a90d2.zip
Allocate a static predicate for pg:inGroup.
-rw-r--r--ext/lv2/gstlv2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/lv2/gstlv2.c b/ext/lv2/gstlv2.c
index 66eb2975..eff0a41b 100644
--- a/ext/lv2/gstlv2.c
+++ b/ext/lv2/gstlv2.c
@@ -53,6 +53,7 @@ SLV2Value output_class;
SLV2Value integer_prop;
SLV2Value toggled_prop;
SLV2Value in_place_broken_pred;
+SLV2Value in_group_pred;
static GstSignalProcessorClass *parent_class;
@@ -77,7 +78,7 @@ gst_lv2_base_init (gpointer g_class)
GstSignalProcessorClass *gsp_class = GST_SIGNAL_PROCESSOR_CLASS (g_class);
GstElementDetails *details;
SLV2Plugin lv2plugin;
- SLV2Value val, pred;
+ SLV2Value val;
SLV2Values values;
guint j, audio_in_count, audio_out_count, control_in_count, control_out_count;
gchar *klass_tags;
@@ -110,8 +111,6 @@ gst_lv2_base_init (gpointer g_class)
g_new0 (struct _GstLV2Port, gsp_class->num_control_out);
klass->groups = NULL;
- pred = slv2_value_new_uri (world,
- "http://lv2plug.in/ns/dev/port-groups#inGroup");
/* find port groups */
audio_in_count = audio_out_count = control_in_count = control_out_count = 0;
@@ -134,7 +133,7 @@ gst_lv2_base_init (gpointer g_class)
continue;
}
desc->index = j;
- values = slv2_port_get_value (lv2plugin, port, pred);
+ values = slv2_port_get_value (lv2plugin, port, in_group_pred);
if (slv2_values_size (values) > 0) {
SLV2Value v = slv2_values_get_at (values, 0);
desc->group = v;
@@ -151,8 +150,6 @@ gst_lv2_base_init (gpointer g_class)
g_assert (control_in_count == gsp_class->num_control_in);
g_assert (control_out_count == gsp_class->num_control_out);
- slv2_value_free (pred);
-
/* add pad templates */
audio_in_count = audio_out_count = 0;
for (j = 0; j < slv2_plugin_get_num_ports (lv2plugin); j++) {
@@ -574,6 +571,9 @@ plugin_init (GstPlugin * plugin)
slv2_value_new_uri (world, "http://lv2plug.in/ns/lv2core#toggled");
in_place_broken_pred = slv2_value_new_uri (world,
"http://lv2plug.in/ns/lv2core#inPlaceBroken");
+ in_group_pred =
+ slv2_value_new_uri (world,
+ "http://lv2plug.in/ns/dev/port-groups#inGroup");
parent_class = g_type_class_ref (GST_TYPE_SIGNAL_PROCESSOR);