diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2021-02-18 10:58:28 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-03-23 14:19:17 +0000 |
commit | bc17c7ba3aa999317431063ce26f09dab6fa4ff9 (patch) | |
tree | a994eb5701802239ed52c1f27d11e4d8e5916630 | |
parent | 9196e71f072e9b7bab23cfaab1e46ae5c47a55f5 (diff) | |
download | gstreamer-plugins-bad-bc17c7ba3aa999317431063ce26f09dab6fa4ff9.tar.gz |
openaptx: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038>
-rw-r--r-- | ext/openaptx/gstopenaptxdec.c | 2 | ||||
-rw-r--r-- | ext/openaptx/gstopenaptxdec.h | 2 | ||||
-rw-r--r-- | ext/openaptx/gstopenaptxenc.c | 2 | ||||
-rw-r--r-- | ext/openaptx/gstopenaptxenc.h | 2 | ||||
-rw-r--r-- | ext/openaptx/openaptx-plugin.c | 7 |
5 files changed, 11 insertions, 4 deletions
diff --git a/ext/openaptx/gstopenaptxdec.c b/ext/openaptx/gstopenaptxdec.c index 8a61eba48..5d08353c0 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 bcc989123..95b126c57 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 7d38c982c..db054ab12 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 48bc5afd0..ab80b61b7 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 71ee53bd5..bc55838ba 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; } |