diff --git a/ext/gsm/gstgsm.c b/ext/gsm/gstgsm.c index 472dbb061e..93c3f2f82e 100644 --- a/ext/gsm/gstgsm.c +++ b/ext/gsm/gstgsm.c @@ -29,14 +29,12 @@ static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "gsmenc", GST_RANK_PRIMARY, - GST_TYPE_GSMENC)) - return FALSE; - if (!gst_element_register (plugin, "gsmdec", GST_RANK_PRIMARY, - GST_TYPE_GSMDEC)) - return FALSE; + gboolean ret = FALSE; - return TRUE; + ret |= GST_ELEMENT_REGISTER (gsmenc, plugin); + ret |= GST_ELEMENT_REGISTER (gsmdec, plugin); + + return ret; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/gsm/gstgsmdec.c b/ext/gsm/gstgsmdec.c index 0f3e49fc06..c2f48835cb 100644 --- a/ext/gsm/gstgsmdec.c +++ b/ext/gsm/gstgsmdec.c @@ -74,6 +74,8 @@ GST_STATIC_PAD_TEMPLATE ("src", ); G_DEFINE_TYPE (GstGSMDec, gst_gsmdec, GST_TYPE_AUDIO_DECODER); +GST_ELEMENT_REGISTER_DEFINE (gsmdec, "gsmdec", GST_RANK_PRIMARY, + GST_TYPE_GSMDEC); static void gst_gsmdec_class_init (GstGSMDecClass * klass) diff --git a/ext/gsm/gstgsmdec.h b/ext/gsm/gstgsmdec.h index a4fc0aa2e4..5696b29dcb 100644 --- a/ext/gsm/gstgsmdec.h +++ b/ext/gsm/gstgsmdec.h @@ -61,6 +61,8 @@ struct _GstGSMDecClass GType gst_gsmdec_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (gsmdec); + G_END_DECLS #endif /* __GST_GSMDEC_H__ */ diff --git a/ext/gsm/gstgsmenc.c b/ext/gsm/gstgsmenc.c index f4b72f8656..9799abc44f 100644 --- a/ext/gsm/gstgsmenc.c +++ b/ext/gsm/gstgsmenc.c @@ -68,6 +68,8 @@ GST_STATIC_PAD_TEMPLATE ("sink", ); G_DEFINE_TYPE (GstGSMEnc, gst_gsmenc, GST_TYPE_AUDIO_ENCODER); +GST_ELEMENT_REGISTER_DEFINE (gsmenc, "gsmenc", GST_RANK_PRIMARY, + GST_TYPE_GSMENC); static void gst_gsmenc_class_init (GstGSMEncClass * klass) diff --git a/ext/gsm/gstgsmenc.h b/ext/gsm/gstgsmenc.h index f2ec03f918..a2aee81157 100644 --- a/ext/gsm/gstgsmenc.h +++ b/ext/gsm/gstgsmenc.h @@ -59,6 +59,8 @@ struct _GstGSMEncClass GType gst_gsmenc_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (gsmenc); + G_END_DECLS #endif /* __GST_GSMENC_H__ */