From 178dda8623975fdad8ee0d74eabfa00af3f55749 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 24 Feb 2021 18:56:55 +0100 Subject: [PATCH] wayland: 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/wayland/gstwaylandsink.c | 5 +++-- ext/wayland/gstwaylandsink.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c index 47192df..fd196b3 100644 --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -122,6 +122,8 @@ G_DEFINE_TYPE_WITH_CODE (GstWaylandSink, gst_wayland_sink, GST_TYPE_VIDEO_SINK, gst_wayland_sink_videooverlay_init) G_IMPLEMENT_INTERFACE (GST_TYPE_WAYLAND_VIDEO, gst_wayland_sink_waylandvideo_init)); +GST_ELEMENT_REGISTER_DEFINE (waylandsink, "waylandsink", GST_RANK_MARGINAL, + GST_TYPE_WAYLAND_SINK); /* A tiny GstVideoBufferPool subclass that modify the options to remove * VideoAlignment. To support VideoAlignment we would need to pass the padded @@ -1054,8 +1056,7 @@ plugin_init (GstPlugin * plugin) gst_wl_shm_allocator_register (); - return gst_element_register (plugin, "waylandsink", GST_RANK_MARGINAL, - GST_TYPE_WAYLAND_SINK); + return GST_ELEMENT_REGISTER (waylandsink, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h index be92fe7..ce79f9c 100644 --- a/ext/wayland/gstwaylandsink.h +++ b/ext/wayland/gstwaylandsink.h @@ -76,6 +76,8 @@ struct _GstWaylandSinkClass GType gst_wayland_sink_get_type (void) G_GNUC_CONST; +GST_ELEMENT_REGISTER_DECLARE (waylandsink); + G_END_DECLS #endif /* __GST_WAYLAND_VIDEO_SINK_H__ */ -- 2.7.4