From 6a4614e1354aa056343962f7758d456676c379b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 18 Feb 2021 09:48:04 +0100 Subject: [PATCH] ldac: 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: --- ext/ldac/gstldacenc.c | 2 ++ ext/ldac/gstldacenc.h | 1 + ext/ldac/ldac-plugin.c | 3 +-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/ldac/gstldacenc.c b/ext/ldac/gstldacenc.c index 191fba41e6..1820d3ab0f 100644 --- a/ext/ldac/gstldacenc.c +++ b/ext/ldac/gstldacenc.c @@ -50,6 +50,8 @@ GST_DEBUG_CATEGORY_STATIC (ldac_enc_debug); #define parent_class gst_ldac_enc_parent_class G_DEFINE_TYPE (GstLdacEnc, gst_ldac_enc, GST_TYPE_AUDIO_ENCODER); +GST_ELEMENT_REGISTER_DEFINE (ldacenc, "ldacenc", GST_RANK_NONE, + GST_TYPE_LDAC_ENC); #define SAMPLE_RATES "44100, 48000, 88200, 96000" diff --git a/ext/ldac/gstldacenc.h b/ext/ldac/gstldacenc.h index 5fe80e5113..b1ca32a086 100644 --- a/ext/ldac/gstldacenc.h +++ b/ext/ldac/gstldacenc.h @@ -62,5 +62,6 @@ struct _GstLdacEncClass { }; GType gst_ldac_enc_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (ldacenc); G_END_DECLS diff --git a/ext/ldac/ldac-plugin.c b/ext/ldac/ldac-plugin.c index f9af7b2382..da0cb5aead 100644 --- a/ext/ldac/ldac-plugin.c +++ b/ext/ldac/ldac-plugin.c @@ -27,8 +27,7 @@ static gboolean plugin_init (GstPlugin * plugin) { - gst_element_register (plugin, "ldacenc", GST_RANK_NONE, GST_TYPE_LDAC_ENC); - return TRUE; + return GST_ELEMENT_REGISTER (ldacenc, plugin);; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,