From 8e1d1325fb4648065d915863f43ee21dc65c40fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 17 Feb 2021 12:10:31 +0100 Subject: [PATCH] directfb: 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/directfb/dfbvideosink.c | 17 +++++++---------- ext/directfb/dfbvideosink.h | 2 ++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ext/directfb/dfbvideosink.c b/ext/directfb/dfbvideosink.c index ea77b37785..790d0d928f 100644 --- a/ext/directfb/dfbvideosink.c +++ b/ext/directfb/dfbvideosink.c @@ -512,8 +512,12 @@ G_DEFINE_TYPE_WITH_CODE (GstDfbVideoSink, gst_dfbvideosink, GST_TYPE_VIDEO_SINK, G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, gst_dfbvideosink_navigation_init); G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE, - gst_dfbvideosink_colorbalance_init)); - + gst_dfbvideosink_colorbalance_init); + GST_DEBUG_CATEGORY_INIT (dfbvideosink_debug, "dfbvideosink", 0, + "DirectFB video sink element"); + ); +GST_ELEMENT_REGISTER_DEFINE (dfbvideosink, "dfbvideosink", GST_RANK_MARGINAL, + GST_TYPE_DFBVIDEOSINK); #ifndef GST_DISABLE_GST_DEBUG static const char * gst_dfbvideosink_get_format_name (DFBSurfacePixelFormat format) @@ -2460,14 +2464,7 @@ gst_dfbvideosink_class_init (GstDfbVideoSinkClass * klass) static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "dfbvideosink", GST_RANK_MARGINAL, - GST_TYPE_DFBVIDEOSINK)) - return FALSE; - - GST_DEBUG_CATEGORY_INIT (dfbvideosink_debug, "dfbvideosink", 0, - "DirectFB video sink element"); - - return TRUE; + return GST_ELEMENT_REGISTER (dfbvideosink, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/directfb/dfbvideosink.h b/ext/directfb/dfbvideosink.h index 69b32f4ff6..647cf7ae35 100644 --- a/ext/directfb/dfbvideosink.h +++ b/ext/directfb/dfbvideosink.h @@ -156,6 +156,8 @@ struct _GstDfbVideoSinkClass { GType gst_dfbvideosink_get_type (void); GType gst_dfb_buffer_pool_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (dfbvideosink); + G_END_DECLS #endif /* __GST_DFBVIDEOSINK_H__ */