summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/soundtouch/gstbpmdetect.cc9
-rw-r--r--ext/soundtouch/gstpitch.cc7
2 files changed, 5 insertions, 11 deletions
diff --git a/ext/soundtouch/gstbpmdetect.cc b/ext/soundtouch/gstbpmdetect.cc
index 5b9bcef4b..a8b7c9d56 100644
--- a/ext/soundtouch/gstbpmdetect.cc
+++ b/ext/soundtouch/gstbpmdetect.cc
@@ -78,7 +78,7 @@ struct _GstBPMDetectPrivate
#endif
#define gst_bpm_detect_parent_class parent_class
-G_DEFINE_TYPE (GstBPMDetect, gst_bpm_detect, GST_TYPE_AUDIO_FILTER);
+G_DEFINE_TYPE_WITH_PRIVATE (GstBPMDetect, gst_bpm_detect, GST_TYPE_AUDIO_FILTER);
static void gst_bpm_detect_finalize (GObject * object);
static gboolean gst_bpm_detect_stop (GstBaseTransform * trans);
@@ -118,16 +118,13 @@ gst_bpm_detect_class_init (GstBPMDetectClass * klass)
trans_class->passthrough_on_same_caps = TRUE;
filter_class->setup = GST_DEBUG_FUNCPTR (gst_bpm_detect_setup);
-
- g_type_class_add_private (gobject_class, sizeof (GstBPMDetectPrivate));
}
static void
gst_bpm_detect_init (GstBPMDetect * bpm_detect)
{
- bpm_detect->priv = G_TYPE_INSTANCE_GET_PRIVATE ((bpm_detect),
- GST_TYPE_BPM_DETECT, GstBPMDetectPrivate);
-
+ bpm_detect->priv =
+ (GstBPMDetectPrivate *) gst_bpm_detect_get_instance_private (bpm_detect);
bpm_detect->priv->detect = NULL;
bpm_detect->bpm = 0.0;
}
diff --git a/ext/soundtouch/gstpitch.cc b/ext/soundtouch/gstpitch.cc
index 3125be019..4fbe0ab28 100644
--- a/ext/soundtouch/gstpitch.cc
+++ b/ext/soundtouch/gstpitch.cc
@@ -117,7 +117,7 @@ static gboolean gst_pitch_src_query (GstPad * pad, GstObject * parent,
GstQuery * query);
#define gst_pitch_parent_class parent_class
-G_DEFINE_TYPE (GstPitch, gst_pitch, GST_TYPE_ELEMENT);
+G_DEFINE_TYPE_WITH_PRIVATE (GstPitch, gst_pitch, GST_TYPE_ELEMENT);
static void
gst_pitch_class_init (GstPitchClass * klass)
@@ -131,8 +131,6 @@ gst_pitch_class_init (GstPitchClass * klass)
GST_DEBUG_CATEGORY_INIT (pitch_debug, "pitch", 0,
"audio pitch control element");
- g_type_class_add_private (gobject_class, sizeof (GstPitchPrivate));
-
gobject_class->set_property = gst_pitch_set_property;
gobject_class->get_property = gst_pitch_get_property;
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pitch_dispose);
@@ -174,8 +172,7 @@ gst_pitch_class_init (GstPitchClass * klass)
static void
gst_pitch_init (GstPitch * pitch)
{
- pitch->priv =
- G_TYPE_INSTANCE_GET_PRIVATE ((pitch), GST_TYPE_PITCH, GstPitchPrivate);
+ pitch->priv = (GstPitchPrivate *) gst_pitch_get_instance_private (pitch);
pitch->sinkpad =
gst_pad_new_from_static_template (&gst_pitch_sink_template, "sink");