xingmux: allow per feature registration
authorStéphane Cerveau <scerveau@collabora.com>
Mon, 29 Mar 2021 11:41:07 +0000 (13:41 +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>

gst/xingmux/gstxingmux.c
gst/xingmux/gstxingmux.h
gst/xingmux/plugin.c

index 38c1abb..33087cc 100644 (file)
@@ -52,6 +52,8 @@ GST_DEBUG_CATEGORY_STATIC (xing_mux_debug);
 
 #define gst_xing_mux_parent_class parent_class
 G_DEFINE_TYPE (GstXingMux, gst_xing_mux, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE (xingmux, "xingmux", GST_RANK_MARGINAL,
+    GST_TYPE_XING_MUX);
 
 /* Xing Header stuff */
 #define GST_XING_FRAME_FIELD   (1 << 0)
index 9f0c47a..0d8e82c 100644 (file)
@@ -79,6 +79,7 @@ struct _GstXingMuxClass {
 
 /* Standard function returning type information. */
 GType gst_xing_mux_get_type (void);
+GST_ELEMENT_REGISTER_DECLARE (xingmux);
 
 G_END_DECLS
 
index 470a24e..21dabbb 100644 (file)
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  if (!gst_element_register (plugin, "xingmux", GST_RANK_MARGINAL,
-          GST_TYPE_XING_MUX))
-    return FALSE;
-
-  return TRUE;
+  return GST_ELEMENT_REGISTER (xingmux, plugin);
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,