From c9b2638183671e6446bf0a8a24033327e4662b11 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Sat, 1 Nov 2003 13:13:38 +0000 Subject: Update artsdsink too Original commit message from CVS: Update artsdsink too --- ext/artsd/gstartsdsink.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'ext/artsd') diff --git a/ext/artsd/gstartsdsink.c b/ext/artsd/gstartsdsink.c index e70dbda7..e02229ea 100644 --- a/ext/artsd/gstartsdsink.c +++ b/ext/artsd/gstartsdsink.c @@ -29,11 +29,8 @@ static GstElementDetails artsdsink_details = { "aRtsd audio sink", "Sink/Audio", - "LGPL", "Plays audio to an aRts server", - VERSION, "Richard Boulton ", - "(C) 2001", }; /* Signals and args */ @@ -75,6 +72,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory, ) ); +static void gst_artsdsink_base_init (gpointer g_class); static void gst_artsdsink_class_init (GstArtsdsinkClass *klass); static void gst_artsdsink_init (GstArtsdsink *artsdsink); @@ -100,7 +98,8 @@ gst_artsdsink_get_type (void) if (!artsdsink_type) { static const GTypeInfo artsdsink_info = { - sizeof(GstArtsdsinkClass), NULL, + sizeof(GstArtsdsinkClass), + gst_artsdsink_base_init, NULL, (GClassInitFunc)gst_artsdsink_class_init, NULL, @@ -114,6 +113,15 @@ gst_artsdsink_get_type (void) return artsdsink_type; } +static void +gst_artsdsink_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_factory)); + gst_element_class_set_details (element_class, &artsdsink_details); +} + static void gst_artsdsink_class_init (GstArtsdsinkClass *klass) { @@ -271,27 +279,25 @@ gst_artsdsink_get_property (GObject *object, guint prop_id, GValue *value, GPara } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - factory = gst_element_factory_new("artsdsink", GST_TYPE_ARTSDSINK, - &artsdsink_details); - g_return_val_if_fail(factory != NULL, FALSE); - - gst_element_factory_add_pad_template(factory, GST_PAD_TEMPLATE_GET (sink_factory)); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); + if (!gst_element_register (plugin, "artsdsink", GST_RANK_NONE, GST_TYPE_ARTSDSINK)) + return FALSE; return TRUE; } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "artsdsink", - plugin_init -}; + "Plays audio to an aRts server", + plugin_init, + VERSION, + "LGPL", + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN) static gboolean gst_artsdsink_open_audio (GstArtsdsink *sink) -- cgit v1.2.1