From: Stéphane Cerveau Date: Tue, 30 Mar 2021 09:34:54 +0000 (+0200) Subject: flite: allow per feature registration X-Git-Tag: 1.19.3~507^2~595 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fc9cc06db1f3d03a78fa79d3e5eb09fd13bef7d;p=platform%2Fupstream%2Fgstreamer.git flite: 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/ext/flite/gstflite.c b/ext/flite/gstflite.c index c28baa6..9082b2b 100644 --- a/ext/flite/gstflite.c +++ b/ext/flite/gstflite.c @@ -25,17 +25,12 @@ #include GType gst_flite_test_src_get_type (void); - +GST_ELEMENT_REGISTER_DECLARE (flitetestsrc); static gboolean plugin_init (GstPlugin * plugin) { - flite_init (); - - gst_element_register (plugin, "flitetestsrc", GST_RANK_NONE, - gst_flite_test_src_get_type ()); - - return TRUE; + return GST_ELEMENT_REGISTER (flitetestsrc, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/flite/gstflitetestsrc.c b/ext/flite/gstflitetestsrc.c index 63ed90d..397d133 100644 --- a/ext/flite/gstflitetestsrc.c +++ b/ext/flite/gstflitetestsrc.c @@ -90,8 +90,11 @@ GST_STATIC_PAD_TEMPLATE ("src", "rate = (int) 48000, " "channels = (int) [1, 8]") ); +GST_ELEMENT_REGISTER_DECLARE (flitetestsrc); #define gst_flite_test_src_parent_class parent_class G_DEFINE_TYPE (GstFliteTestSrc, gst_flite_test_src, GST_TYPE_BASE_SRC); +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (flitetestsrc, "flitetestsrc", + GST_RANK_NONE, gst_flite_test_src_get_type (), flite_init ()); static void gst_flite_test_src_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec);