summaryrefslogtreecommitdiffstats
path: root/ext/artsd
diff options
context:
space:
mode:
Diffstat (limited to 'ext/artsd')
-rw-r--r--ext/artsd/gstartsdsink.c40
1 files changed, 23 insertions, 17 deletions
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 <richard-gst@tartarus.org>",
- "(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,
@@ -115,6 +114,15 @@ gst_artsdsink_get_type (void)
}
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)
{
GObjectClass *gobject_class;
@@ -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)