zbar: 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>
This commit is contained in:
Stéphane Cerveau 2021-02-25 09:57:00 +01:00 committed by GStreamer Marge Bot
parent 42a8702919
commit 1277fd56b1
2 changed files with 6 additions and 4 deletions

View file

@ -110,7 +110,9 @@ static GstFlowReturn gst_zbar_transform_frame_ip (GstVideoFilter * vfilter,
GstVideoFrame * frame);
#define gst_zbar_parent_class parent_class
G_DEFINE_TYPE (GstZBar, gst_zbar, GST_TYPE_VIDEO_FILTER);
G_DEFINE_TYPE_WITH_CODE (GstZBar, gst_zbar, GST_TYPE_VIDEO_FILTER,
GST_DEBUG_CATEGORY_INIT (zbar_debug, "zbar", 0, "zbar"););
GST_ELEMENT_REGISTER_DEFINE (zbar, "zbar", GST_RANK_NONE, GST_TYPE_ZBAR);
static void
gst_zbar_class_init (GstZBarClass * g_class)
@ -361,9 +363,7 @@ gst_zbar_stop (GstBaseTransform * base)
static gboolean
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (zbar_debug, "zbar", 0, "zbar");
return gst_element_register (plugin, "zbar", GST_RANK_NONE, GST_TYPE_ZBAR);
return GST_ELEMENT_REGISTER (zbar, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -67,6 +67,8 @@ struct _GstZBarClass
GType gst_zbar_get_type(void);
GST_ELEMENT_REGISTER_DECLARE (zbar);
G_END_DECLS
#endif /* __GST_VIDEO_ZBAR_H__ */