From 1eabad6d80cd2eb435d3526b8559dd0340ca2e29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Cerveau?= Date: Tue, 16 Feb 2021 14:54:15 +0100 Subject: [PATCH] videobox: 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/videobox/gstvideobox.c | 9 ++++----- gst/videobox/gstvideobox.h | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gst/videobox/gstvideobox.c b/gst/videobox/gstvideobox.c index 0e69c7c..0fa7655 100644 --- a/gst/videobox/gstvideobox.c +++ b/gst/videobox/gstvideobox.c @@ -2409,6 +2409,9 @@ GST_STATIC_PAD_TEMPLATE ("sink", #define gst_video_box_parent_class parent_class G_DEFINE_TYPE (GstVideoBox, gst_video_box, GST_TYPE_VIDEO_FILTER); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (videobox, "videobox", GST_RANK_NONE, + GST_TYPE_VIDEO_BOX, GST_DEBUG_CATEGORY_INIT (videobox_debug, "videobox", 0, + "Resizes a video by adding borders or cropping")); static void gst_video_box_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -3336,11 +3339,7 @@ gst_video_box_transform_frame (GstVideoFilter * vfilter, static gboolean plugin_init (GstPlugin * plugin) { - GST_DEBUG_CATEGORY_INIT (videobox_debug, "videobox", 0, - "Resizes a video by adding borders or cropping"); - - return gst_element_register (plugin, "videobox", GST_RANK_NONE, - GST_TYPE_VIDEO_BOX); + return GST_ELEMENT_REGISTER (videobox, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/videobox/gstvideobox.h b/gst/videobox/gstvideobox.h index cbb98ac..f2e5585 100644 --- a/gst/videobox/gstvideobox.h +++ b/gst/videobox/gstvideobox.h @@ -89,4 +89,6 @@ struct _GstVideoBoxClass GType gst_video_box_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (videobox); + #endif /* __GST_VIDEO_BOX_H__ */ -- 2.7.4