diff --git a/ext/openaptx/gstopenaptxdec.c b/ext/openaptx/gstopenaptxdec.c index 8a61eba48a..5d08353c09 100644 --- a/ext/openaptx/gstopenaptxdec.c +++ b/ext/openaptx/gstopenaptxdec.c @@ -54,6 +54,8 @@ GST_DEBUG_CATEGORY_STATIC (openaptx_dec_debug); #define parent_class gst_openaptx_dec_parent_class G_DEFINE_TYPE (GstOpenaptxDec, gst_openaptx_dec, GST_TYPE_AUDIO_DECODER); +GST_ELEMENT_REGISTER_DEFINE (openaptxdec, "openaptxdec", GST_RANK_NONE, + GST_TYPE_OPENAPTX_DEC); static GstStaticPadTemplate openaptx_dec_sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, diff --git a/ext/openaptx/gstopenaptxdec.h b/ext/openaptx/gstopenaptxdec.h index bcc9891239..95b126c57e 100644 --- a/ext/openaptx/gstopenaptxdec.h +++ b/ext/openaptx/gstopenaptxdec.h @@ -40,6 +40,8 @@ struct _GstOpenaptxDec { struct aptx_context *aptx_c; }; +GST_ELEMENT_REGISTER_DECLARE (openaptxdec) + G_END_DECLS #endif /* __GST_OPENAPTXDEC_H__ */ diff --git a/ext/openaptx/gstopenaptxenc.c b/ext/openaptx/gstopenaptxenc.c index 7d38c982cf..db054ab123 100644 --- a/ext/openaptx/gstopenaptxenc.c +++ b/ext/openaptx/gstopenaptxenc.c @@ -49,6 +49,8 @@ GST_DEBUG_CATEGORY_STATIC (openaptx_enc_debug); #define gst_openaptx_enc_parent_class parent_class G_DEFINE_TYPE (GstOpenaptxEnc, gst_openaptx_enc, GST_TYPE_AUDIO_ENCODER); +GST_ELEMENT_REGISTER_DEFINE (openaptxenc, "openaptxenc", GST_RANK_NONE, + GST_TYPE_OPENAPTX_ENC); static GstStaticPadTemplate openaptx_enc_sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, diff --git a/ext/openaptx/gstopenaptxenc.h b/ext/openaptx/gstopenaptxenc.h index 48bc5afd0c..ab80b61b7c 100644 --- a/ext/openaptx/gstopenaptxenc.h +++ b/ext/openaptx/gstopenaptxenc.h @@ -39,6 +39,8 @@ struct _GstOpenaptxEnc { struct aptx_context *aptx_c; }; +GST_ELEMENT_REGISTER_DECLARE(openaptxenc); + G_END_DECLS #endif /* __GST_OPENAPTXENC_H__ */ diff --git a/ext/openaptx/openaptx-plugin.c b/ext/openaptx/openaptx-plugin.c index 71ee53bd5f..bc55838bab 100644 --- a/ext/openaptx/openaptx-plugin.c +++ b/ext/openaptx/openaptx-plugin.c @@ -30,10 +30,9 @@ static gboolean plugin_init (GstPlugin * plugin) { - gst_element_register (plugin, "openaptxdec", GST_RANK_NONE, - GST_TYPE_OPENAPTX_DEC); - gst_element_register (plugin, "openaptxenc", GST_RANK_NONE, - GST_TYPE_OPENAPTX_ENC); + gboolean ret = FALSE; + ret |= GST_ELEMENT_REGISTER (openaptxdec, plugin); + ret |= GST_ELEMENT_REGISTER (openaptxenc, plugin); return TRUE; }