diff options
author | Iain Holmes <iain@prettypeople.org> | 2003-11-01 15:28:33 +0000 |
---|---|---|
committer | Iain Holmes <iain@prettypeople.org> | 2003-11-01 15:28:33 +0000 |
commit | 4865820a8f7168ebb72a6ab8f6b30a6c714883e0 (patch) | |
tree | 6de3d7147485f802d8dbce756c38a8ba648e833f /ext/esd/esdsink.c | |
parent | adc599bb661aa932ba6eb36cbaa5911f13095c67 (diff) |
ESD Updated
Original commit message from CVS:
ESD Updated
Diffstat (limited to 'ext/esd/esdsink.c')
-rw-r--r-- | ext/esd/esdsink.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c index 7169b0e7..219f7327 100644 --- a/ext/esd/esdsink.c +++ b/ext/esd/esdsink.c @@ -32,11 +32,8 @@ static GstElementDetails esdsink_details = { "Esound audio sink", "Sink/Audio", - "LGPL", "Plays audio to an esound server", - VERSION, "Richard Boulton <richard-gst@tartarus.org>", - "(C) 2001", }; /* Signals and args */ @@ -82,6 +79,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory, ) ); +static void gst_esdsink_base_init (gpointer g_class); static void gst_esdsink_class_init (GstEsdsinkClass *klass); static void gst_esdsink_init (GstEsdsink *esdsink); @@ -110,7 +108,8 @@ gst_esdsink_get_type (void) if (!esdsink_type) { static const GTypeInfo esdsink_info = { - sizeof(GstEsdsinkClass), NULL, + sizeof(GstEsdsinkClass), + gst_esdsink_base_init, NULL, (GClassInitFunc)gst_esdsink_class_init, NULL, @@ -125,6 +124,15 @@ gst_esdsink_get_type (void) } static void +gst_esdsink_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, &esdsink_details); +} + +static void gst_esdsink_class_init (GstEsdsinkClass *klass) { GObjectClass *gobject_class; @@ -424,16 +432,8 @@ gst_esdsink_get_property (GObject *object, guint prop_id, GValue *value, GParamS gboolean gst_esdsink_factory_init (GstPlugin *plugin) { - GstElementFactory *factory; - - factory = gst_element_factory_new("esdsink", GST_TYPE_ESDSINK, - &esdsink_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, "esdsink", GST_RANK_NONE, GST_TYPE_ESDSINK)) + return FALSE; return TRUE; } |