From aaa5a140d70c4d6f39bef4a57b7f74a2f60f6e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Fri, 12 Feb 2021 15:35:11 +0100 Subject: [PATCH] alpha: 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/alpha/gstalpha.c | 3 ++- gst/alpha/gstalpha.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/alpha/gstalpha.c b/gst/alpha/gstalpha.c index e3fc649a69..a9a75dcd63 100644 --- a/gst/alpha/gstalpha.c +++ b/gst/alpha/gstalpha.c @@ -184,6 +184,7 @@ static void gst_alpha_finalize (GObject * object); #define gst_alpha_parent_class parent_class G_DEFINE_TYPE (GstAlpha, gst_alpha, GST_TYPE_VIDEO_FILTER); +GST_ELEMENT_REGISTER_DEFINE (alpha, "alpha", GST_RANK_NONE, GST_TYPE_ALPHA); #define GST_TYPE_ALPHA_METHOD (gst_alpha_method_get_type()) static GType @@ -2606,7 +2607,7 @@ not_negotiated: static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "alpha", GST_RANK_NONE, GST_TYPE_ALPHA); + return GST_ELEMENT_REGISTER (alpha, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/alpha/gstalpha.h b/gst/alpha/gstalpha.h index 48ee36f751..b0a61bc7c7 100644 --- a/gst/alpha/gstalpha.h +++ b/gst/alpha/gstalpha.h @@ -92,6 +92,8 @@ struct _GstAlpha guint noise_level2; }; +GST_ELEMENT_REGISTER_DECLARE (alpha); + G_END_DECLS #endif /* __GST_ALPHA_H__ */