diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2021-02-18 15:48:12 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-03-23 14:19:17 +0000 |
commit | 051ae23c2f8059a817c752bf575066b6bd0204bd (patch) | |
tree | eae5e8e1b5c7bdf84052a6be9d5395a9b351e559 | |
parent | 96a923fab2cf8f8986c8974b521004e1184ea537 (diff) | |
download | gstreamer-plugins-bad-051ae23c2f8059a817c752bf575066b6bd0204bd.tar.gz |
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>
-rw-r--r-- | ext/openni2/gstopenni2.cpp | 5 | ||||
-rw-r--r-- | ext/openni2/gstopenni2src.cpp | 10 | ||||
-rw-r--r-- | ext/openni2/gstopenni2src.h | 3 |
3 files changed, 5 insertions, 13 deletions
diff --git a/ext/openni2/gstopenni2.cpp b/ext/openni2/gstopenni2.cpp index 493f0a57b..0509194a8 100644 --- a/ext/openni2/gstopenni2.cpp +++ b/ext/openni2/gstopenni2.cpp @@ -48,10 +48,7 @@ static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_openni2src_plugin_init (plugin)) - return FALSE; - - return TRUE; + return GST_ELEMENT_REGISTER (openni2src, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/openni2/gstopenni2src.cpp b/ext/openni2/gstopenni2src.cpp index 696dca23b..8df5b65b3 100644 --- a/ext/openni2/gstopenni2src.cpp +++ b/ext/openni2/gstopenni2src.cpp @@ -111,6 +111,8 @@ static GstFlowReturn openni2_read_gstbuffer (GstOpenni2Src * src, #define parent_class gst_openni2_src_parent_class 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 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); } -gboolean -gst_openni2src_plugin_init (GstPlugin * plugin) -{ - return gst_element_register (plugin, "openni2src", GST_RANK_NONE, - GST_TYPE_OPENNI2_SRC); -} - - static gboolean openni2_initialise_library (void) { diff --git a/ext/openni2/gstopenni2src.h b/ext/openni2/gstopenni2src.h index 39ec2a0c1..216fba2ca 100644 --- a/ext/openni2/gstopenni2src.h +++ b/ext/openni2/gstopenni2src.h @@ -75,7 +75,8 @@ struct _GstOpenni2SrcClass }; GType gst_openni2_src_get_type (void); -gboolean gst_openni2src_plugin_init (GstPlugin * plugin); + +GST_ELEMENT_REGISTER_DECLARE (openni2src); G_END_DECLS #endif /* __GST_OPENNI2_SRC_H__ */ |