icydemux: allow per feature registration
authorStéphane Cerveau <scerveau@collabora.com>
Tue, 16 Feb 2021 16:16:33 +0000 (17:16 +0100)
committerStéphane Cerveau <scerveau@collabora.com>
Mon, 29 Mar 2021 10:45:23 +0000 (12:45 +0200)
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-good/-/merge_requests/876>

gst/icydemux/gsticydemux.c
gst/icydemux/gsticydemux.h

index 035e724..c8420e8 100644 (file)
@@ -87,7 +87,11 @@ static gboolean gst_icydemux_send_tag_event (GstICYDemux * icydemux,
 
 #define gst_icydemux_parent_class parent_class
 G_DEFINE_TYPE (GstICYDemux, gst_icydemux, GST_TYPE_ELEMENT);
-
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (icydemux, "icydemux",
+    GST_RANK_PRIMARY, GST_TYPE_ICYDEMUX,
+    GST_DEBUG_CATEGORY_INIT (icydemux_debug, "icydemux", 0,
+        "GStreamer ICY tag demuxer");
+    );
 static void
 gst_icydemux_class_init (GstICYDemuxClass * klass)
 {
@@ -662,11 +666,8 @@ gst_icydemux_send_tag_event (GstICYDemux * icydemux, GstTagList * tags)
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  GST_DEBUG_CATEGORY_INIT (icydemux_debug, "icydemux", 0,
-      "GStreamer ICY tag demuxer");
+  return GST_ELEMENT_REGISTER (icydemux, plugin);
 
-  return gst_element_register (plugin, "icydemux",
-      GST_RANK_PRIMARY, GST_TYPE_ICYDEMUX);
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
index 3f05218..d51a54b 100644 (file)
@@ -82,6 +82,8 @@ struct _GstICYDemuxClass
 
 GType gst_icydemux_get_type (void);
 
+GST_ELEMENT_REGISTER_DECLARE (icydemux);
+
 G_END_DECLS
 
 #endif /* __GST_ICYDEMUX_H__ */