sidplay: allow per feature registration
authorStéphane Cerveau <scerveau@collabora.com>
Mon, 29 Mar 2021 10:33:00 +0000 (12:33 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 29 Mar 2021 19:13:36 +0000 (19:13 +0000)
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-ugly/-/merge_requests/79>

ext/sidplay/gstsiddec.cc
ext/sidplay/gstsiddec.h

index a9cddba..1a7c91e 100644 (file)
@@ -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,
index 127895d..15fa88e 100644 (file)
@@ -69,7 +69,8 @@ struct _GstSidDecClass {
 };
 
 GType gst_siddec_get_type (void);
-        
+GST_ELEMENT_REGISTER_DECLARE (siddec);
+
 G_END_DECLS
 
 #endif /* __GST_SIDDEC_H__ */