From 72de78f62f2e6e86e5d971acf1b050e33fa0bee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 17 Feb 2021 18:23:21 +0100 Subject: [PATCH] iqa: 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: --- ext/iqa/iqa.c | 9 +++++---- ext/iqa/iqa.h | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/iqa/iqa.c b/ext/iqa/iqa.c index 7cc45b88c5..afe83b9f76 100644 --- a/ext/iqa/iqa.c +++ b/ext/iqa/iqa.c @@ -175,7 +175,10 @@ gst_iqa_mode_flags_get_type (void) /* GstIqa */ #define gst_iqa_parent_class parent_class G_DEFINE_TYPE_WITH_CODE (GstIqa, gst_iqa, GST_TYPE_VIDEO_AGGREGATOR, - G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY, gst_iqa_child_proxy_init)); + G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY, gst_iqa_child_proxy_init); + GST_DEBUG_CATEGORY_INIT (gst_iqa_debug, "iqa", 0, "iqa"); + ); +GST_ELEMENT_REGISTER_DEFINE (iqa, "iqa", GST_RANK_PRIMARY, GST_TYPE_IQA); #ifdef HAVE_DSSIM inline static unsigned char @@ -510,9 +513,7 @@ gst_iqa_init (GstIqa * self) static gboolean plugin_init (GstPlugin * plugin) { - GST_DEBUG_CATEGORY_INIT (gst_iqa_debug, "iqa", 0, "iqa"); - - return gst_element_register (plugin, "iqa", GST_RANK_PRIMARY, GST_TYPE_IQA); + return GST_ELEMENT_REGISTER (iqa, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/iqa/iqa.h b/ext/iqa/iqa.h index 5c0eb7facc..bf60513d71 100644 --- a/ext/iqa/iqa.h +++ b/ext/iqa/iqa.h @@ -61,6 +61,8 @@ struct _GstIqaClass GType gst_iqa_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (iqa); + G_END_DECLS #endif /* __GST_IQA_H__ */