diff options
author | Andy Wingo <wingo@pobox.com> | 2005-08-28 17:59:20 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2005-08-28 17:59:20 +0000 |
commit | 2ef9f6835236fe4ffadc8457c556f1534658378f (patch) | |
tree | 33fced794fc32f7ad82faa895e342ce6db03365e /ext/ladspa/gstladspa.c | |
parent | cfcd78d3d9248b7ca55a716da4fbb2b47c780dca (diff) | |
download | gst-plugins-bad-2ef9f6835236fe4ffadc8457c556f1534658378f.tar.gz gst-plugins-bad-2ef9f6835236fe4ffadc8457c556f1534658378f.tar.bz2 gst-plugins-bad-2ef9f6835236fe4ffadc8457c556f1534658378f.zip |
Updates for two-arg init from GST_BOILERPLATE.
Original commit message from CVS:
2005-08-28 Andy Wingo <wingo@pobox.com>
* Updates for two-arg init from GST_BOILERPLATE.
* ext/ladspa/gstsignalprocessor.c (gst_signal_processor_init): Use
the second arg for the class, because G_OBJECT_GET_CLASS (self)
returns the wrong thing.
(gst_signal_processor_add_pad_from_template): Make pads of the
right type.
* ext/ladspa/gstladspa.c (gst_ladspa_class_get_param_spec): Make
writable param specs G_PARAM_CONSTRUCT so default values work.
(gst_ladspa_init): Use the second arg for the class.
Diffstat (limited to 'ext/ladspa/gstladspa.c')
-rw-r--r-- | ext/ladspa/gstladspa.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index 66109002..dbf9f933 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -70,6 +70,8 @@ gst_ladspa_base_init (gpointer g_class) LADSPA_Descriptor *desc; gint j, sinkcount, srccount; + GST_DEBUG ("base_init %p", g_class); + desc = g_hash_table_lookup (ladspa_descriptors, GINT_TO_POINTER (G_TYPE_FROM_CLASS (klass))); if (!desc) @@ -186,7 +188,7 @@ gst_ladspa_class_get_param_spec (GstLADSPAClass * klass, gint portnum) name = gst_ladspa_class_get_param_name (klass, portnum); perms = G_PARAM_READABLE; if (LADSPA_IS_PORT_INPUT (desc->PortDescriptors[portnum])) - perms |= G_PARAM_WRITABLE; + perms |= G_PARAM_WRITABLE | G_PARAM_CONSTRUCT; /* short name for hint descriptor */ hintdesc = desc->PortRangeHints[portnum].HintDescriptor; @@ -283,6 +285,8 @@ gst_ladspa_class_init (GstLADSPAClass * klass) LADSPA_Descriptor *desc; gint i, control_in_count, control_out_count; + GST_DEBUG ("class_init %p", klass); + gobject_class = (GObjectClass *) klass; gobject_class->set_property = gst_ladspa_set_property; gobject_class->get_property = gst_ladspa_get_property; @@ -349,12 +353,11 @@ gst_ladspa_class_init (GstLADSPAClass * klass) } static void -gst_ladspa_init (GstLADSPA * ladspa) +gst_ladspa_init (GstLADSPA * ladspa, GstLADSPAClass * klass) { /* whoopee, nothing to do */ - ladspa->descriptor = - ((GstLADSPAClass *) G_OBJECT_GET_CLASS (ladspa))->descriptor; + ladspa->descriptor = klass->descriptor; ladspa->activated = FALSE; ladspa->inplace_broken = LADSPA_IS_INPLACE_BROKEN (ladspa->descriptor->Properties); |