openni2: 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:
parent
96a923fab2
commit
051ae23c2f
@ -48,10 +48,7 @@
|
|||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_openni2src_plugin_init (plugin))
|
return GST_ELEMENT_REGISTER (openni2src, plugin);
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
@ -111,6 +111,8 @@ static GstFlowReturn openni2_read_gstbuffer (GstOpenni2Src * src,
|
|||||||
|
|
||||||
#define parent_class gst_openni2_src_parent_class
|
#define parent_class gst_openni2_src_parent_class
|
||||||
G_DEFINE_TYPE (GstOpenni2Src, gst_openni2_src, GST_TYPE_PUSH_SRC);
|
G_DEFINE_TYPE (GstOpenni2Src, gst_openni2_src, GST_TYPE_PUSH_SRC);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (openni2src, "openni2src", GST_RANK_NONE,
|
||||||
|
GST_TYPE_OPENNI2_SRC);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_openni2_src_class_init (GstOpenni2SrcClass * klass)
|
gst_openni2_src_class_init (GstOpenni2SrcClass * klass)
|
||||||
@ -512,14 +514,6 @@ gst_openni2src_decide_allocation (GstBaseSrc * bsrc, GstQuery * query)
|
|||||||
return GST_BASE_SRC_CLASS (parent_class)->decide_allocation (bsrc, query);
|
return GST_BASE_SRC_CLASS (parent_class)->decide_allocation (bsrc, query);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_openni2src_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "openni2src", GST_RANK_NONE,
|
|
||||||
GST_TYPE_OPENNI2_SRC);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
openni2_initialise_library (void)
|
openni2_initialise_library (void)
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,8 @@ struct _GstOpenni2SrcClass
|
|||||||
};
|
};
|
||||||
|
|
||||||
GType gst_openni2_src_get_type (void);
|
GType gst_openni2_src_get_type (void);
|
||||||
gboolean gst_openni2src_plugin_init (GstPlugin * plugin);
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (openni2src);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_OPENNI2_SRC_H__ */
|
#endif /* __GST_OPENNI2_SRC_H__ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user