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.
This commit is contained in:
Andy Wingo 2005-08-26 11:05:13 +00:00
parent 0af7dc2705
commit 282065617d
6 changed files with 358 additions and 703 deletions

View file

@ -1,3 +1,12 @@
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.
2005-08-26 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/effectv/gstquark.c: (gst_quarktv_init),

2
common

@ -1 +1 @@
Subproject commit aa2a757c587d91069a230d8e656481c3c364ccc6
Subproject commit 7c93670c50de2b6e9d8edd31737c636192fbd831

File diff suppressed because it is too large Load diff

View file

@ -63,11 +63,10 @@ struct _GstLADSPAClass {
LADSPA_Descriptor *descriptor;
gint *sinkpad_portnums,
*srcpad_portnums,
*control_portnums;
ladspa_control_info *control_info;
gint *audio_in_portnums;
gint *audio_out_portnums;
gint *control_in_portnums;
gint *control_out_portnums;
};

View file

@ -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;

View file

@ -74,11 +74,11 @@ struct _GstSignalProcessorClass {
/* virtual methods for subclasses */
gboolean (*setup) (GstSignalProcessor *self, guint sample_rate,
guint buffer_frames);
gboolean (*setup) (GstSignalProcessor *self, guint sample_rate);
gboolean (*start) (GstSignalProcessor *self);
gboolean (*stop) (GstSignalProcessor *self);
gboolean (*process) (GstSignalProcessor *self, guint num_frames);
void (*stop) (GstSignalProcessor *self);
void (*cleanup) (GstSignalProcessor *self);
void (*process) (GstSignalProcessor *self, guint num_frames);
gboolean (*event) (GstSignalProcessor *self, GstEvent *event);
};