From: Stéphane Cerveau Date: Tue, 16 Feb 2021 16:11:26 +0000 (+0100) Subject: cutter: allow per feature registration X-Git-Tag: 1.19.3~509^2~191 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30fc194540cba1a4978bc9921936f3a5c72407fc;p=platform%2Fupstream%2Fgstreamer.git cutter: 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: --- diff --git a/gst/cutter/gstcutter.c b/gst/cutter/gstcutter.c index a8d5d44..aa1424f 100644 --- a/gst/cutter/gstcutter.c +++ b/gst/cutter/gstcutter.c @@ -84,6 +84,7 @@ enum #define gst_cutter_parent_class parent_class G_DEFINE_TYPE (GstCutter, gst_cutter, GST_TYPE_ELEMENT); +GST_ELEMENT_REGISTER_DEFINE (cutter, "cutter", GST_RANK_NONE, GST_TYPE_CUTTER); static GstStateChangeReturn gst_cutter_change_state (GstElement * element, GstStateChange transition); @@ -487,10 +488,7 @@ gst_cutter_get_property (GObject * object, guint prop_id, static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "cutter", GST_RANK_NONE, GST_TYPE_CUTTER)) - return FALSE; - - return TRUE; + return GST_ELEMENT_REGISTER (cutter, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/cutter/gstcutter.h b/gst/cutter/gstcutter.h index 3875f8f..31c135b 100644 --- a/gst/cutter/gstcutter.h +++ b/gst/cutter/gstcutter.h @@ -75,6 +75,8 @@ struct _GstCutterClass GType gst_cutter_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (cutter); + #ifdef __cplusplus } #endif /* __cplusplus */