From a3875c7d024b44526e68a735f564b099288bbf57 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 11 Feb 2021 10:49:48 +0100 Subject: [PATCH] overlaycomposition: 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: --- gst/overlaycomposition/gstoverlaycomposition.c | 5 +++-- gst/overlaycomposition/gstoverlaycomposition.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/overlaycomposition/gstoverlaycomposition.c b/gst/overlaycomposition/gstoverlaycomposition.c index af38691..b58a84d 100644 --- a/gst/overlaycomposition/gstoverlaycomposition.c +++ b/gst/overlaycomposition/gstoverlaycomposition.c @@ -84,6 +84,8 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", #define parent_class gst_overlay_composition_parent_class G_DEFINE_TYPE (GstOverlayComposition, gst_overlay_composition, GST_TYPE_ELEMENT); +GST_ELEMENT_REGISTER_DEFINE (overlaycomposition, "overlaycomposition", + GST_RANK_NONE, GST_TYPE_OVERLAY_COMPOSITION); static GstFlowReturn gst_overlay_composition_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer); @@ -774,8 +776,7 @@ map_failed: static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "overlaycomposition", GST_RANK_NONE, - GST_TYPE_OVERLAY_COMPOSITION); + return GST_ELEMENT_REGISTER (overlaycomposition, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/overlaycomposition/gstoverlaycomposition.h b/gst/overlaycomposition/gstoverlaycomposition.h index 6374a0c..cc92f98 100644 --- a/gst/overlaycomposition/gstoverlaycomposition.h +++ b/gst/overlaycomposition/gstoverlaycomposition.h @@ -43,6 +43,8 @@ struct _GstOverlayComposition { gboolean attach_compo_to_buffer; }; +GST_ELEMENT_REGISTER_DECLARE (overlaycomposition); + G_END_DECLS #endif /* __GST_OVERLAY_COMPOSITION_H__ */ -- 2.7.4