diff --git a/ext/flite/gstflite.c b/ext/flite/gstflite.c index c28baa62df..9082b2bd21 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 63ed90d692..397d133b94 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);