diff options
author | Iain Holmes <iain@prettypeople.org> | 2003-11-01 01:43:05 +0000 |
---|---|---|
committer | Iain Holmes <iain@prettypeople.org> | 2003-11-01 01:43:05 +0000 |
commit | 8d74428b85041ff69f0917ae8c2b0e29d53968cf (patch) | |
tree | b77304ccfa22f36e840c341627dc67dec805e1c0 /ext/arts/gst_arts.c | |
parent | 7c1ac98ca4b3b52c5c7d7ba005972803fab0b7e9 (diff) | |
download | gstreamer-plugins-bad-8d74428b85041ff69f0917ae8c2b0e29d53968cf.tar.gz |
Updated gstarts
Original commit message from CVS:
Updated gstarts
Diffstat (limited to 'ext/arts/gst_arts.c')
-rw-r--r-- | ext/arts/gst_arts.c | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/ext/arts/gst_arts.c b/ext/arts/gst_arts.c index fd2d1be3a..15534cfe7 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 <omega@temple-baptist.com,\n" "Stefan Westerfeld <stefan@space.twc.de>", - "(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, @@ -108,6 +107,18 @@ gst_arts_get_type (void) } 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) { GObjectClass *gobject_class; @@ -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 +) |