From 8d74428b85041ff69f0917ae8c2b0e29d53968cf Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Sat, 1 Nov 2003 01:43:05 +0000 Subject: Updated gstarts Original commit message from CVS: Updated gstarts --- ext/arts/gst_arts.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) (limited to 'ext') diff --git a/ext/arts/gst_arts.c b/ext/arts/gst_arts.c index fd2d1be3..15534cfe 100644 --- a/ext/arts/gst_arts.c +++ b/ext/arts/gst_arts.c @@ -32,12 +32,9 @@ static GstElementDetails gst_arts_details = { "aRts plugin", "Filter/Audio", - "LGPL", "aRts wrapper filter", - VERSION, "Erik Walthinsen ", - "(C) 2000", }; @@ -77,6 +74,7 @@ enum { ARG_LAST, }; +static void gst_arts_base_init (gpointer g_class); static void gst_arts_class_init (GstARTSClass *klass); static void gst_arts_init (GstARTS *arts); @@ -93,7 +91,8 @@ gst_arts_get_type (void) if (!gst_arts_type) { static const GTypeInfo gst_arts_info = { - sizeof(GstARTSClass), NULL, + sizeof(GstARTSClass), + gst_arts_base_init, NULL, (GClassInitFunc)gst_arts_class_init, NULL, @@ -107,6 +106,18 @@ gst_arts_get_type (void) return gst_arts_type; } +static void +gst_arts_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_add_pad_template (element_class, + GST_PAD_TEMPLATE_GET (sink_temp)); + gst_element_class_add_pad_template (element_class, + GST_PAD_TEMPLATE_GET (src_temp)); + gst_element_class_set_details (element_class, &gst_arts_details); +} + static void gst_arts_class_init (GstARTSClass *klass) { @@ -144,24 +155,23 @@ gst_arts_loop (GstElement *element) } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *gstarts; - - gstarts = gst_element_factory_new("gstarts",GST_TYPE_ARTS,&gst_arts_details); - g_return_val_if_fail(gstarts != NULL, FALSE); - - gst_element_factory_add_pad_template(gstarts, GST_PAD_TEMPLATE_GET(sink_temp)); - gst_element_factory_add_pad_template(gstarts, GST_PAD_TEMPLATE_GET(src_temp)); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (gstarts)); + if (!gst_element_register (plugin, "gstarts", GST_RANK_NONE, GST_TYPE_ARTS)) + return FALSE; return TRUE; } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "gst_arts", - plugin_init -}; + "arTs filter wrapper", + plugin_init, + VERSION, + "LGPL", + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +) -- cgit v1.2.1