From e1b127543ded10579c1e9db5ce1e369d60233b9f Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 2 Nov 2003 14:38:31 +0000 Subject: More cruft Original commit message from CVS: More cruft --- ext/shout2/gstshout2.c | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) (limited to 'ext/shout2') diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c index e9ef5f52..3faccb6c 100644 --- a/ext/shout2/gstshout2.c +++ b/ext/shout2/gstshout2.c @@ -28,11 +28,9 @@ static GstElementDetails shout2send_details = { "An Icecast plugin", "Sink/Network", - "LGPL", "Sends data to an icecast server", - VERSION, - "Wim Taymans , Pedro Corte-Real ", - "(C) 2000", + "Wim Taymans \n" + "Pedro Corte-Real " }; unsigned int audio_format = 100; @@ -87,6 +85,7 @@ sink_template_factory (void) } static void gst_shout2send_class_init (GstShout2sendClass *klass); +static void gst_shout2send_base_init (GstShout2sendClass *klass); static void gst_shout2send_init (GstShout2send *shout2send); static void gst_shout2send_chain (GstPad *pad, GstData *_data); @@ -125,7 +124,8 @@ gst_shout2send_get_type(void) if (!shout2send_type) { static const GTypeInfo shout2send_info = { - sizeof(GstShout2sendClass), NULL, + sizeof(GstShout2sendClass), + (GBaseInitFunc)gst_shout2send_base_init, NULL, (GClassInitFunc)gst_shout2send_class_init, NULL, @@ -139,6 +139,15 @@ gst_shout2send_get_type(void) return shout2send_type; } +static void +gst_shout2send_base_init (GstShout2sendClass *klass) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + + gst_element_class_add_pad_template (element_class, sink_template_factory()); + gst_element_class_set_details (element_class, &shout2send_details); +} + static void gst_shout2send_class_init (GstShout2sendClass *klass) { @@ -519,24 +528,21 @@ gst_shout2send_change_state (GstElement *element) } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - factory = gst_element_factory_new("shout2send", GST_TYPE_SHOUT2SEND, &shout2send_details); - g_return_val_if_fail(factory != NULL, FALSE); - - gst_element_factory_add_pad_template (factory, sink_template_factory ()); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - - return TRUE; + return gst_element_register (plugin, "shout2send", GST_RANK_NONE, + GST_TYPE_SHOUT2SEND); } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "shout2send", - plugin_init -}; - + "Sends data to an icecast server using libshout2", + plugin_init, + VERSION, + "LGPL", + GST_COPYRIGHT, + "libshout2", + "http://www.icecast.org/download.html" +) -- cgit