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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
This commit is contained in:
Stéphane Cerveau 2021-02-16 14:54:15 +01:00
parent 72c7ae54dd
commit 1eabad6d80
2 changed files with 6 additions and 5 deletions

View file

@ -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,

View file

@ -89,4 +89,6 @@ struct _GstVideoBoxClass
GType gst_video_box_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (videobox);
#endif /* __GST_VIDEO_BOX_H__ */