summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2021-02-17 12:10:31 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-03-23 14:19:16 +0000
commit8e1d1325fb4648065d915863f43ee21dc65c40fe (patch)
tree1b9e08a63bd803bd4b7fa3711a1dcc1f2c098709
parent447ea8372e8db95fa1186cc2e221488b744864af (diff)
downloadgstreamer-plugins-bad-8e1d1325fb4648065d915863f43ee21dc65c40fe.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038>
-rw-r--r--ext/directfb/dfbvideosink.c17
-rw-r--r--ext/directfb/dfbvideosink.h2
2 files changed, 9 insertions, 10 deletions
diff --git a/ext/directfb/dfbvideosink.c b/ext/directfb/dfbvideosink.c
index ea77b3778..790d0d928 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 69b32f4ff..647cf7ae3 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__ */