More cruft
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sun, 2 Nov 2003 14:38:31 +0000 (14:38 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sun, 2 Nov 2003 14:38:31 +0000 (14:38 +0000)
Original commit message from CVS:
More cruft

ext/shout2/gstshout2.c

index e9ef5f5..3faccb6 100644 (file)
 static GstElementDetails shout2send_details = {
   "An Icecast plugin",
   "Sink/Network",
-  "LGPL",
   "Sends data to an icecast server",
-  VERSION,
-  "Wim Taymans <wim.taymans@chello.be>, Pedro Corte-Real <typo@netcabo.pt>",
-  "(C) 2000",
+  "Wim Taymans <wim.taymans@chello.be>\n"
+  "Pedro Corte-Real <typo@netcabo.pt>"
 };
 
 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,
@@ -140,6 +140,15 @@ gst_shout2send_get_type(void)
 }
 
 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)
 {
   GObjectClass *gobject_class;
@@ -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"
+)