diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2021-02-16 14:38:37 +0100 |
---|---|---|
committer | Stéphane Cerveau <scerveau@collabora.com> | 2021-03-29 12:45:23 +0200 |
commit | 084c01dd5aba69d920435060110addcff838008d (patch) | |
tree | e57a1f3a93efbc9d3d180e618ddb4ef69372d250 | |
parent | cd8c3a2e53b26f777bb171da2e56429542bfcf58 (diff) |
shapewipe: 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>
-rw-r--r-- | gst/shapewipe/gstshapewipe.c | 12 | ||||
-rw-r--r-- | gst/shapewipe/gstshapewipe.h | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/gst/shapewipe/gstshapewipe.c b/gst/shapewipe/gstshapewipe.c index d54de85f4..06aa5b7ea 100644 --- a/gst/shapewipe/gstshapewipe.c +++ b/gst/shapewipe/gstshapewipe.c @@ -127,6 +127,9 @@ GST_DEBUG_CATEGORY_STATIC (gst_shape_wipe_debug); #define gst_shape_wipe_parent_class parent_class G_DEFINE_TYPE (GstShapeWipe, gst_shape_wipe, GST_TYPE_ELEMENT); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (shapewipe, "shapewipe", GST_RANK_NONE, + GST_TYPE_SHAPE_WIPE, GST_DEBUG_CATEGORY_INIT (gst_shape_wipe_debug, + "shapewipe", 0, "shapewipe element");); static void gst_shape_wipe_class_init (GstShapeWipeClass * klass) @@ -1133,14 +1136,7 @@ gst_shape_wipe_src_event (GstPad * pad, GstObject * parent, GstEvent * event) static gboolean plugin_init (GstPlugin * plugin) { - GST_DEBUG_CATEGORY_INIT (gst_shape_wipe_debug, "shapewipe", 0, - "shapewipe element"); - - if (!gst_element_register (plugin, "shapewipe", GST_RANK_NONE, - GST_TYPE_SHAPE_WIPE)) - return FALSE; - - return TRUE; + return GST_ELEMENT_REGISTER (shapewipe, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/shapewipe/gstshapewipe.h b/gst/shapewipe/gstshapewipe.h index 66731ce72..374e6c98a 100644 --- a/gst/shapewipe/gstshapewipe.h +++ b/gst/shapewipe/gstshapewipe.h @@ -76,6 +76,8 @@ struct _GstShapeWipeClass GType gst_shape_wipe_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (shapewipe); + G_END_DECLS #endif /* __GST_SHAPE_WIPE_H__ */ |