summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorIain Holmes <iain@prettypeople.org>2003-11-01 13:13:38 +0000
committerIain Holmes <iain@prettypeople.org>2003-11-01 13:13:38 +0000
commitc9b2638183671e6446bf0a8a24033327e4662b11 (patch)
tree13d2cec315d5eacae09d57555afc33128f8bf0d0 /ext
parent0cc17ce52cd6cc858ed4958b178ca5e7f896dbe0 (diff)
downloadgst-plugins-bad-c9b2638183671e6446bf0a8a24033327e4662b11.tar.gz
gst-plugins-bad-c9b2638183671e6446bf0a8a24033327e4662b11.tar.bz2
gst-plugins-bad-c9b2638183671e6446bf0a8a24033327e4662b11.zip
Update artsdsink too
Original commit message from CVS: Update artsdsink too
Diffstat (limited to 'ext')
-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)