summaryrefslogtreecommitdiff
path: root/ext/ladspa
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-02-12 18:18:51 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-02-12 18:18:51 +0000
commit6484fedb8d906a9eafc412c38323f3cf4f1ca0da (patch)
treecf8335f44cf536b8e59d832da519563d0ba16676 /ext/ladspa
parent2a84336a8e5ab47c6eca4eb8fc97d44794443d8a (diff)
downloadgstreamer-plugins-bad-6484fedb8d906a9eafc412c38323f3cf4f1ca0da.tar.gz
fixes for #133316, #133663 and #133528 (Stefan Kost)
Original commit message from CVS: fixes for #133316, #133663 and #133528 (Stefan Kost)
Diffstat (limited to 'ext/ladspa')
-rw-r--r--ext/ladspa/gstladspa.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c
index ff2711fce..020767fac 100644
--- a/ext/ladspa/gstladspa.c
+++ b/ext/ladspa/gstladspa.c
@@ -92,14 +92,6 @@ gst_ladspa_base_init (GstLADSPAClass *klass)
desc = g_hash_table_lookup(ladspa_descriptors, GINT_TO_POINTER(0));
g_assert (desc);
- /* construct the element details struct */
- details = g_new0(GstElementDetails,1);
- details->longname = g_strdup(desc->Name);
- details->klass = "Filter/Effect/Audio/LADSPA";
- details->description = details->longname;
- details->author = g_strdup(desc->Maker);
- gst_element_class_set_details (element_class, details);
-
/* pad templates */
klass->numports = desc->PortCount;
klass->numsinkpads = 0;
@@ -124,6 +116,17 @@ gst_ladspa_base_init (GstLADSPAClass *klass)
}
}
+ /* construct the element details struct */
+ details = g_new0(GstElementDetails,1);
+ details->longname = g_strdup(desc->Name);
+ details->description = details->longname;
+ details->author = g_strdup(desc->Maker);
+ if ((klass->numsinkpads >0) && (klass->numsrcpads >0)) details->klass = "Filter/Effect/Audio/LADSPA";
+ else if((klass->numsinkpads==0) && (klass->numsrcpads >0)) details->klass = "Source/Audio/LADSPA";
+ else if((klass->numsinkpads >0) && (klass->numsrcpads==0)) details->klass = "Sink/Audio/LADSPA";
+ else details->klass = "Filter/Effect/Audio/LADSPA"; /* whatever this is */
+ gst_element_class_set_details (element_class, details);
+
klass->srcpad_portnums = g_new0(gint,klass->numsrcpads);
klass->sinkpad_portnums = g_new0(gint,klass->numsinkpads);
sinkcount = 0;