summaryrefslogtreecommitdiff
path: root/ext/ladspa
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2010-02-01 22:32:32 +0200
committerStefan Kost <ensonic@users.sf.net>2010-02-01 22:32:32 +0200
commitebdf1c2a18405052be242ec115380d00088775cd (patch)
treea7dd11e19b31f0144cbfa8f42800dba9467209b8 /ext/ladspa
parent8f1bb31255e5ca2a1a300c60c6a54460101e014c (diff)
downloadgstreamer-plugins-bad-ebdf1c2a18405052be242ec115380d00088775cd.tar.gz
signalprocessor,lv2,ladspa: move sample-rate to baseclass
We need the sample-rate in baseclass for upcomming timestamp changes.
Diffstat (limited to 'ext/ladspa')
-rw-r--r--ext/ladspa/gstladspa.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c
index e6dd148b5..501973457 100644
--- a/ext/ladspa/gstladspa.c
+++ b/ext/ladspa/gstladspa.c
@@ -555,8 +555,6 @@ gst_ladspa_setup (GstSignalProcessor * gsp, GstCaps * caps)
GstLADSPAClass *oclass;
GstSignalProcessorClass *gsp_class;
LADSPA_Descriptor *desc;
- GstStructure *s;
- gint sample_rate;
gint i;
gsp_class = GST_SIGNAL_PROCESSOR_GET_CLASS (gsp);
@@ -567,13 +565,10 @@ gst_ladspa_setup (GstSignalProcessor * gsp, GstCaps * caps)
g_return_val_if_fail (ladspa->handle == NULL, FALSE);
g_return_val_if_fail (ladspa->activated == FALSE, FALSE);
- s = gst_caps_get_structure (caps, 0);
- if (!gst_structure_get_int (s, "rate", &sample_rate))
- goto no_sample_rate;
+ GST_DEBUG_OBJECT (ladspa, "instantiating the plugin at %d Hz",
+ gsp->sample_rate);
- GST_DEBUG_OBJECT (ladspa, "instantiating the plugin at %d Hz", sample_rate);
-
- if (!(ladspa->handle = desc->instantiate (desc, sample_rate)))
+ if (!(ladspa->handle = desc->instantiate (desc, gsp->sample_rate)))
goto no_instance;
/* connect the control ports */
@@ -586,11 +581,6 @@ gst_ladspa_setup (GstSignalProcessor * gsp, GstCaps * caps)
return TRUE;
-no_sample_rate:
- {
- GST_WARNING_OBJECT (gsp, "got no sample-rate");
- return FALSE;
- }
no_instance:
{
GST_WARNING_OBJECT (gsp, "could not create instance");