From e3a35c127fdb6187da00cf9c0cbf55c1cbde0af6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Cerveau?= Date: Mon, 29 Mar 2021 12:33:00 +0200 Subject: [PATCH] sidplay: 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/sidplay/gstsiddec.cc | 5 +++-- ext/sidplay/gstsiddec.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/sidplay/gstsiddec.cc b/ext/sidplay/gstsiddec.cc index a9cddba..1a7c91e 100644 --- a/ext/sidplay/gstsiddec.cc +++ b/ext/sidplay/gstsiddec.cc @@ -144,6 +144,8 @@ static void gst_siddec_set_property (GObject * object, guint prop_id, #define gst_siddec_parent_class parent_class G_DEFINE_TYPE (GstSidDec, gst_siddec, GST_TYPE_ELEMENT); +GST_ELEMENT_REGISTER_DEFINE (siddec, "siddec", GST_RANK_PRIMARY, + GST_TYPE_SIDDEC); static void gst_siddec_class_init (GstSidDecClass * klass) @@ -768,8 +770,7 @@ gst_siddec_get_property (GObject * object, guint prop_id, GValue * value, static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "siddec", GST_RANK_PRIMARY, - GST_TYPE_SIDDEC); + return GST_ELEMENT_REGISTER (siddec, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/sidplay/gstsiddec.h b/ext/sidplay/gstsiddec.h index 127895d..15fa88e 100644 --- a/ext/sidplay/gstsiddec.h +++ b/ext/sidplay/gstsiddec.h @@ -69,7 +69,8 @@ struct _GstSidDecClass { }; GType gst_siddec_get_type (void); - +GST_ELEMENT_REGISTER_DECLARE (siddec); + G_END_DECLS #endif /* __GST_SIDDEC_H__ */ -- 2.7.4