diff options
author | Andy Wingo <wingo@pobox.com> | 2005-08-26 11:05:13 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2005-08-26 11:05:13 +0000 |
commit | 282065617d0b4c73a3cb89b118a5f161c96ac773 (patch) | |
tree | f23c38f1f3abc3b050692a6a7df26bae83bce5e5 /ext/ladspa/gstsignalprocessor.c | |
parent | 0af7dc2705eb753432beb68680bed00046ab12cd (diff) | |
download | gst-plugins-bad-282065617d0b4c73a3cb89b118a5f161c96ac773.tar.gz gst-plugins-bad-282065617d0b4c73a3cb89b118a5f161c96ac773.tar.bz2 gst-plugins-bad-282065617d0b4c73a3cb89b118a5f161c96ac773.zip |
ext/ladspa/gstladspa.*: Finish porting, still doesn't work but it does compile and register. I have more features tha...
Original commit message from CVS:
2005-08-26 Andy Wingo <wingo@pobox.com>
* ext/ladspa/gstladspa.c:
* ext/ladspa/gstladspa.h: Finish porting, still doesn't work but
it does compile and register. I have more features than you.
* ext/ladspa/gstsignalprocessor.h:
* ext/ladspa/gstsignalprocessor.c: Updates, bug fixen.
Diffstat (limited to 'ext/ladspa/gstsignalprocessor.c')
-rw-r--r-- | ext/ladspa/gstsignalprocessor.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/ext/ladspa/gstsignalprocessor.c b/ext/ladspa/gstsignalprocessor.c index 4b9bcb9d..7fea9a90 100644 --- a/ext/ladspa/gstsignalprocessor.c +++ b/ext/ladspa/gstsignalprocessor.c @@ -214,8 +214,11 @@ gst_signal_processor_add_pad_from_template (GstSignalProcessor * self, static void gst_signal_processor_init (GstSignalProcessor * self) { + GstSignalProcessorClass *klass; GList *templates; + klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self); + GST_DEBUG ("gst_signal_processor_init"); templates = @@ -227,11 +230,27 @@ gst_signal_processor_init (GstSignalProcessor * self) gst_signal_processor_add_pad_from_template (self, templ); templates = templates->next; } + + self->audio_in = g_new0 (gfloat *, klass->num_audio_in); + self->control_in = g_new0 (gfloat, klass->num_control_in); + self->audio_out = g_new0 (gfloat *, klass->num_audio_out); + self->control_out = g_new0 (gfloat, klass->num_control_out); } static void gst_signal_processor_finalize (GObject * object) { + GstSignalProcessor *self = GST_SIGNAL_PROCESSOR (object); + + g_free (self->audio_in); + self->audio_in = NULL; + g_free (self->control_in); + self->control_in = NULL; + g_free (self->audio_out); + self->audio_out = NULL; + g_free (self->control_out); + self->control_out = NULL; + G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -254,7 +273,7 @@ gst_signal_processor_setcaps (GstPad * pad, GstCaps * caps) if (!gst_structure_get_int (s, "buffer-frames", &buffer_frames)) return FALSE; - if (!klass->setup (self, sample_rate, buffer_frames)) + if (!klass->setup (self, sample_rate)) return FALSE; self->sample_rate = sample_rate; @@ -654,22 +673,18 @@ gst_signal_processor_src_activate_pull (GstPad * pad, gboolean active) static GstElementStateReturn gst_signal_processor_change_state (GstElement * element) { - GstSignalProcessor *self; - GstSignalProcessorClass *klass; + /* GstSignalProcessor *self; + GstSignalProcessorClass *klass; */ GstElementState transition; GstElementStateReturn result; - self = GST_SIGNAL_PROCESSOR (element); - klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self); + /* self = GST_SIGNAL_PROCESSOR (element); + klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self); */ transition = GST_STATE_TRANSITION (element); switch (transition) { case GST_STATE_NULL_TO_READY: - self->audio_in = g_new0 (gfloat *, klass->num_audio_in); - self->control_in = g_new0 (gfloat, klass->num_control_in); - self->audio_out = g_new0 (gfloat *, klass->num_audio_out); - self->control_out = g_new0 (gfloat, klass->num_control_out); break; case GST_STATE_READY_TO_PAUSED: break; @@ -687,14 +702,7 @@ gst_signal_processor_change_state (GstElement * element) case GST_STATE_PAUSED_TO_READY: break; case GST_STATE_READY_TO_NULL: - g_free (self->audio_in); - self->audio_in = NULL; - g_free (self->control_in); - self->control_in = NULL; - g_free (self->audio_out); - self->audio_out = NULL; - g_free (self->control_out); - self->control_out = NULL; + /* gst_signal_processor_cleanup (self); */ break; default: break; |