compositor: allow per feature registration
authorStéphane Cerveau <scerveau@collabora.com>
Thu, 11 Feb 2021 08:58:59 +0000 (09:58 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 16 Mar 2021 17:58:59 +0000 (17:58 +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-base/-/merge_requests/1029>

gst/compositor/compositor.c
gst/compositor/compositor.h

index c86793e..38eba76 100644 (file)
@@ -610,6 +610,8 @@ gst_compositor_set_property (GObject * object,
 G_DEFINE_TYPE_WITH_CODE (GstCompositor, gst_compositor,
     GST_TYPE_VIDEO_AGGREGATOR, G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY,
         gst_compositor_child_proxy_init));
+GST_ELEMENT_REGISTER_DEFINE (compositor, "compositor", GST_RANK_PRIMARY + 1,
+    GST_TYPE_COMPOSITOR);
 
 static gboolean
 set_functions (GstCompositor * self, const GstVideoInfo * info)
@@ -1497,8 +1499,7 @@ plugin_init (GstPlugin * plugin)
 
   gst_compositor_init_blend ();
 
-  return gst_element_register (plugin, "compositor", GST_RANK_PRIMARY + 1,
-      GST_TYPE_COMPOSITOR);
+  return GST_ELEMENT_REGISTER (compositor, plugin);
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
index f1ad16a..4067fb1 100644 (file)
@@ -149,5 +149,7 @@ struct _GstCompositorPad
   GstCompositorOperator op;
 };
 
+GST_ELEMENT_REGISTER_DECLARE (compositor);
+
 G_END_DECLS
 #endif /* __GST_COMPOSITOR_H__ */