summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2005-08-28 17:59:20 +0000
committerAndy Wingo <wingo@pobox.com>2005-08-28 17:59:20 +0000
commit99fc32962a35d65cce34a5f59948502eee1ac6b4 (patch)
tree56e3cb1fa8ab36ac98c0c5fc46e6266aaaa2c4b1 /ext
parentb5c9e10399d4b33655e330d806c0a299e927bba0 (diff)
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/dv/gstdvdec.c2
-rw-r--r--ext/dv/gstdvdemux.c2
-rw-r--r--ext/gconf/gstgconfaudiosink.c3
-rw-r--r--ext/gconf/gstgconfvideosink.c3
-rw-r--r--ext/ladspa/gstladspa.c11
-rw-r--r--ext/ladspa/gstsignalprocessor.c15
-rw-r--r--ext/libpng/gstpngenc.c2
-rw-r--r--ext/speex/gstspeexdec.c2
8 files changed, 21 insertions, 19 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c
index d18e3dd9..9c1db617 100644
--- a/ext/dv/gstdvdec.c
+++ b/ext/dv/gstdvdec.c
@@ -167,7 +167,7 @@ gst_dvdec_class_init (GstDVDecClass * klass)
}
static void
-gst_dvdec_init (GstDVDec * dvdec)
+gst_dvdec_init (GstDVDec * dvdec, GstDVDecClass * g_class)
{
dvdec->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sink_temp),
diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index 77ab23ed..e74eb22e 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -162,7 +162,7 @@ gst_dvdemux_class_init (GstDVDemuxClass * klass)
}
static void
-gst_dvdemux_init (GstDVDemux * dvdemux)
+gst_dvdemux_init (GstDVDemux * dvdemux, GstDVDemuxClass * g_class)
{
gint i;
diff --git a/ext/gconf/gstgconfaudiosink.c b/ext/gconf/gstgconfaudiosink.c
index 256f569e..719b5353 100644
--- a/ext/gconf/gstgconfaudiosink.c
+++ b/ext/gconf/gstgconfaudiosink.c
@@ -84,7 +84,8 @@ gst_gconf_audio_sink_reset (GstGConfAudioSink * sink)
}
static void
-gst_gconf_audio_sink_init (GstGConfAudioSink * sink)
+gst_gconf_audio_sink_init (GstGConfAudioSink * sink,
+ GstGConfAudioSinkClass * g_class)
{
sink->pad = gst_ghost_pad_new_notarget ("sink", GST_PAD_SINK);
gst_element_add_pad (GST_ELEMENT (sink), sink->pad);
diff --git a/ext/gconf/gstgconfvideosink.c b/ext/gconf/gstgconfvideosink.c
index 88b7644d..69a375e9 100644
--- a/ext/gconf/gstgconfvideosink.c
+++ b/ext/gconf/gstgconfvideosink.c
@@ -84,7 +84,8 @@ gst_gconf_video_sink_reset (GstGConfVideoSink * sink)
}
static void
-gst_gconf_video_sink_init (GstGConfVideoSink * sink)
+gst_gconf_video_sink_init (GstGConfVideoSink * sink,
+ GstGConfVideoSinkClass * g_class)
{
sink->pad = gst_ghost_pad_new_notarget ("sink", GST_PAD_SINK);
gst_element_add_pad (GST_ELEMENT (sink), sink->pad);
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);
diff --git a/ext/ladspa/gstsignalprocessor.c b/ext/ladspa/gstsignalprocessor.c
index 7fea9a90..7b79dde2 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/libpng/gstpngenc.c b/ext/libpng/gstpngenc.c
index d0e84df0..3beb1ae2 100644
--- a/ext/libpng/gstpngenc.c
+++ b/ext/libpng/gstpngenc.c
@@ -174,7 +174,7 @@ gst_pngenc_setcaps (GstPad * pad, GstCaps * caps)
}
static void
-gst_pngenc_init (GstPngEnc * pngenc)
+gst_pngenc_init (GstPngEnc * pngenc, GstPngEncClass * g_class)
{
/* sinkpad */
pngenc->sinkpad = gst_pad_new_from_template
diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c
index 41ea3f0e..e1ec60cb 100644
--- a/ext/speex/gstspeexdec.c
+++ b/ext/speex/gstspeexdec.c
@@ -124,7 +124,7 @@ speex_get_query_types (GstPad * pad)
}
static void
-gst_speex_dec_init (GstSpeexDec * dec)
+gst_speex_dec_init (GstSpeexDec * dec, GstSpeexDecClass * g_class)
{
dec->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get