mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
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:
parent
011fc35e52
commit
b5c9e10399
6 changed files with 358 additions and 703 deletions
|
@ -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>
|
2005-08-26 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst/effectv/gstquark.c: (gst_quarktv_init),
|
* gst/effectv/gstquark.c: (gst_quarktv_init),
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit aa2a757c587d91069a230d8e656481c3c364ccc6
|
Subproject commit 7c93670c50de2b6e9d8edd31737c636192fbd831
|
File diff suppressed because it is too large
Load diff
|
@ -63,11 +63,10 @@ struct _GstLADSPAClass {
|
||||||
|
|
||||||
LADSPA_Descriptor *descriptor;
|
LADSPA_Descriptor *descriptor;
|
||||||
|
|
||||||
gint *sinkpad_portnums,
|
gint *audio_in_portnums;
|
||||||
*srcpad_portnums,
|
gint *audio_out_portnums;
|
||||||
*control_portnums;
|
gint *control_in_portnums;
|
||||||
|
gint *control_out_portnums;
|
||||||
ladspa_control_info *control_info;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -214,8 +214,11 @@ gst_signal_processor_add_pad_from_template (GstSignalProcessor * self,
|
||||||
static void
|
static void
|
||||||
gst_signal_processor_init (GstSignalProcessor * self)
|
gst_signal_processor_init (GstSignalProcessor * self)
|
||||||
{
|
{
|
||||||
|
GstSignalProcessorClass *klass;
|
||||||
GList *templates;
|
GList *templates;
|
||||||
|
|
||||||
|
klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self);
|
||||||
|
|
||||||
GST_DEBUG ("gst_signal_processor_init");
|
GST_DEBUG ("gst_signal_processor_init");
|
||||||
|
|
||||||
templates =
|
templates =
|
||||||
|
@ -227,11 +230,27 @@ gst_signal_processor_init (GstSignalProcessor * self)
|
||||||
gst_signal_processor_add_pad_from_template (self, templ);
|
gst_signal_processor_add_pad_from_template (self, templ);
|
||||||
templates = templates->next;
|
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
|
static void
|
||||||
gst_signal_processor_finalize (GObject * object)
|
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);
|
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))
|
if (!gst_structure_get_int (s, "buffer-frames", &buffer_frames))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!klass->setup (self, sample_rate, buffer_frames))
|
if (!klass->setup (self, sample_rate))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
self->sample_rate = sample_rate;
|
self->sample_rate = sample_rate;
|
||||||
|
@ -654,22 +673,18 @@ gst_signal_processor_src_activate_pull (GstPad * pad, gboolean active)
|
||||||
static GstElementStateReturn
|
static GstElementStateReturn
|
||||||
gst_signal_processor_change_state (GstElement * element)
|
gst_signal_processor_change_state (GstElement * element)
|
||||||
{
|
{
|
||||||
GstSignalProcessor *self;
|
/* GstSignalProcessor *self;
|
||||||
GstSignalProcessorClass *klass;
|
GstSignalProcessorClass *klass; */
|
||||||
GstElementState transition;
|
GstElementState transition;
|
||||||
GstElementStateReturn result;
|
GstElementStateReturn result;
|
||||||
|
|
||||||
self = GST_SIGNAL_PROCESSOR (element);
|
/* self = GST_SIGNAL_PROCESSOR (element);
|
||||||
klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self);
|
klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self); */
|
||||||
|
|
||||||
transition = GST_STATE_TRANSITION (element);
|
transition = GST_STATE_TRANSITION (element);
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_NULL_TO_READY:
|
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;
|
break;
|
||||||
case GST_STATE_READY_TO_PAUSED:
|
case GST_STATE_READY_TO_PAUSED:
|
||||||
break;
|
break;
|
||||||
|
@ -687,14 +702,7 @@ gst_signal_processor_change_state (GstElement * element)
|
||||||
case GST_STATE_PAUSED_TO_READY:
|
case GST_STATE_PAUSED_TO_READY:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_READY_TO_NULL:
|
case GST_STATE_READY_TO_NULL:
|
||||||
g_free (self->audio_in);
|
/* gst_signal_processor_cleanup (self); */
|
||||||
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;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -74,11 +74,11 @@ struct _GstSignalProcessorClass {
|
||||||
|
|
||||||
/* virtual methods for subclasses */
|
/* virtual methods for subclasses */
|
||||||
|
|
||||||
gboolean (*setup) (GstSignalProcessor *self, guint sample_rate,
|
gboolean (*setup) (GstSignalProcessor *self, guint sample_rate);
|
||||||
guint buffer_frames);
|
|
||||||
gboolean (*start) (GstSignalProcessor *self);
|
gboolean (*start) (GstSignalProcessor *self);
|
||||||
gboolean (*stop) (GstSignalProcessor *self);
|
void (*stop) (GstSignalProcessor *self);
|
||||||
gboolean (*process) (GstSignalProcessor *self, guint num_frames);
|
void (*cleanup) (GstSignalProcessor *self);
|
||||||
|
void (*process) (GstSignalProcessor *self, guint num_frames);
|
||||||
gboolean (*event) (GstSignalProcessor *self, GstEvent *event);
|
gboolean (*event) (GstSignalProcessor *self, GstEvent *event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue