imagefreeze: 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 17:22:47 +01:00
parent 3347e1786f
commit 2ba958555f
2 changed files with 8 additions and 9 deletions

View file

@ -100,7 +100,11 @@ GST_DEBUG_CATEGORY_STATIC (gst_image_freeze_debug);
#define gst_image_freeze_parent_class parent_class
G_DEFINE_TYPE (GstImageFreeze, gst_image_freeze, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (imagefreeze, "imagefreeze",
GST_RANK_NONE, GST_TYPE_IMAGE_FREEZE,
GST_DEBUG_CATEGORY_INIT (gst_image_freeze_debug, "imagefreeze", 0,
"imagefreeze element");
);
static void
gst_image_freeze_class_init (GstImageFreezeClass * klass)
@ -1237,14 +1241,7 @@ gst_image_freeze_provide_clock (GstElement * element)
static gboolean
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_image_freeze_debug, "imagefreeze", 0,
"imagefreeze element");
if (!gst_element_register (plugin, "imagefreeze", GST_RANK_NONE,
GST_TYPE_IMAGE_FREEZE))
return FALSE;
return TRUE;
return GST_ELEMENT_REGISTER (imagefreeze, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -80,6 +80,8 @@ struct _GstImageFreezeClass
GType gst_image_freeze_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (imagefreeze);
G_END_DECLS
#endif /* __GST_IMAGE_FREEZE_H__ */