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 | |
parent | cfcd78d3d9248b7ca55a716da4fbb2b47c780dca (diff) | |
download | gstreamer-plugins-bad-2ef9f6835236fe4ffadc8457c556f1534658378f.tar.gz |
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')
-rw-r--r-- | ext/cdaudio/gstcdaudio.c | 2 | ||||
-rw-r--r-- | ext/ladspa/gstladspa.c | 11 | ||||
-rw-r--r-- | ext/ladspa/gstsignalprocessor.c | 15 | ||||
-rw-r--r-- | ext/xine/xine.c | 2 | ||||
-rw-r--r-- | ext/xine/xineaudiodec.c | 2 | ||||
-rw-r--r-- | ext/xine/xineaudiosink.c | 3 | ||||
-rw-r--r-- | ext/xine/xineinput.c | 2 |
7 files changed, 19 insertions, 18 deletions
diff --git a/ext/cdaudio/gstcdaudio.c b/ext/cdaudio/gstcdaudio.c index 069191f4f..e36bc2c28 100644 --- a/ext/cdaudio/gstcdaudio.c +++ b/ext/cdaudio/gstcdaudio.c @@ -199,7 +199,7 @@ gst_cdaudio_class_init (GstCDAudioClass * klass) } static void -gst_cdaudio_init (GstCDAudio * cdaudio) +gst_cdaudio_init (GstCDAudio * cdaudio, GstCDAudioClass * g_class) { cdaudio->device = g_strdup ("/dev/cdrom"); cdaudio->was_playing = FALSE; diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index 66109002a..dbf9f9334 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); diff --git a/ext/ladspa/gstsignalprocessor.c b/ext/ladspa/gstsignalprocessor.c index 7fea9a909..7b79dde21 100644 --- a/ext/ladspa/gstsignalprocessor.c +++ b/ext/ladspa/gstsignalprocessor.c @@ -186,8 +186,9 @@ gst_signal_processor_add_pad_from_template (GstSignalProcessor * self, { GstPad *new; - new = g_object_new (GST_TYPE_PAD, "name", GST_OBJECT_NAME (templ), - "direction", templ->direction, "template", templ, NULL); + new = g_object_new (GST_TYPE_SIGNAL_PROCESSOR_PAD, + "name", GST_OBJECT_NAME (templ), "direction", templ->direction, + "template", templ, NULL); GST_SIGNAL_PROCESSOR_PAD (new)->index = GST_SIGNAL_PROCESSOR_PAD_TEMPLATE (templ)->index; @@ -212,17 +213,13 @@ gst_signal_processor_add_pad_from_template (GstSignalProcessor * self, } static void -gst_signal_processor_init (GstSignalProcessor * self) +gst_signal_processor_init (GstSignalProcessor * self, + GstSignalProcessorClass * klass) { - GstSignalProcessorClass *klass; GList *templates; - klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self); - - GST_DEBUG ("gst_signal_processor_init"); - templates = - gst_element_class_get_pad_template_list (GST_ELEMENT_GET_CLASS (self)); + gst_element_class_get_pad_template_list (GST_ELEMENT_CLASS (klass)); while (templates) { GstPadTemplate *templ = GST_PAD_TEMPLATE (templates->data); diff --git a/ext/xine/xine.c b/ext/xine/xine.c index 8357ff564..68aebc280 100644 --- a/ext/xine/xine.c +++ b/ext/xine/xine.c @@ -50,7 +50,7 @@ gst_xine_class_init (GstXineClass * klass) } static void -gst_xine_init (GstXine * filter) +gst_xine_init (GstXine * filter, GstXineClass * g_class) { } diff --git a/ext/xine/xineaudiodec.c b/ext/xine/xineaudiodec.c index dee0242f3..ce9850860 100644 --- a/ext/xine/xineaudiodec.c +++ b/ext/xine/xineaudiodec.c @@ -279,7 +279,7 @@ gst_xine_audio_dec_class_init (GstXineAudioDecClass * klass) } static void -gst_xine_audio_dec_init (GstXineAudioDec * xine) +gst_xine_audio_dec_init (GstXineAudioDec * xine, GstXineAudioDecClass * g_class) { xine->setup = FALSE; } diff --git a/ext/xine/xineaudiosink.c b/ext/xine/xineaudiosink.c index 64c5e6f81..165457b1b 100644 --- a/ext/xine/xineaudiosink.c +++ b/ext/xine/xineaudiosink.c @@ -78,7 +78,8 @@ gst_xine_audio_sink_class_init (GstXineAudioSinkClass * klass) } static void -gst_xine_audio_sink_init (GstXineAudioSink * xine) +gst_xine_audio_sink_init (GstXineAudioSink * xine, + GstXineAudioSinkClass * g_class) { } diff --git a/ext/xine/xineinput.c b/ext/xine/xineinput.c index 35aa1dcab..705009a17 100644 --- a/ext/xine/xineinput.c +++ b/ext/xine/xineinput.c @@ -99,7 +99,7 @@ gst_xine_input_class_init (GstXineInputClass * klass) } static void -gst_xine_input_init (GstXineInput * xine) +gst_xine_input_init (GstXineInput * xine, GstXineInputClass * g_class) { } |