diff options
author | Iain Holmes <iain@prettypeople.org> | 2003-11-01 14:04:20 +0000 |
---|---|---|
committer | Iain Holmes <iain@prettypeople.org> | 2003-11-01 14:04:20 +0000 |
commit | 6d5504f6497bac3dfd697b0482b937153fd083ed (patch) | |
tree | f826eee69b4da10ed8bb1b62fb3a5b9a91445ac8 /ext/audiofile/gstafsink.c | |
parent | c9b2638183671e6446bf0a8a24033327e4662b11 (diff) | |
download | gst-plugins-bad-6d5504f6497bac3dfd697b0482b937153fd083ed.tar.gz gst-plugins-bad-6d5504f6497bac3dfd697b0482b937153fd083ed.tar.bz2 gst-plugins-bad-6d5504f6497bac3dfd697b0482b937153fd083ed.zip |
Update all the audiofile stuff
Original commit message from CVS:
Update all the audiofile stuff
Diffstat (limited to 'ext/audiofile/gstafsink.c')
-rw-r--r-- | ext/audiofile/gstafsink.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c index fd80975e..efe242d4 100644 --- a/ext/audiofile/gstafsink.c +++ b/ext/audiofile/gstafsink.c @@ -31,11 +31,8 @@ static GstElementDetails afsink_details = { "Audiofile Sink", "Sink/Audio", - "LGPL", "Write audio streams to disk using libaudiofile", - VERSION, "Thomas <thomas@apestaart.org>", - "(C) 2001" }; @@ -98,6 +95,7 @@ gst_afsink_types_get_type (void) return afsink_types_type; } +static void gst_afsink_base_init (gpointer g_class); static void gst_afsink_class_init (GstAFSinkClass *klass); static void gst_afsink_init (GstAFSink *afsink); @@ -125,7 +123,8 @@ gst_afsink_get_type (void) if (!afsink_type) { static const GTypeInfo afsink_info = { - sizeof (GstAFSinkClass), NULL, + sizeof (GstAFSinkClass), + gst_afsink_base_init, NULL, (GClassInitFunc) gst_afsink_class_init, NULL, @@ -140,6 +139,15 @@ gst_afsink_get_type (void) } static void +gst_afsink_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 (afsink_sink_factory)); + gst_element_class_set_details (element_class, &afsink_details); +} + +static void gst_afsink_class_init (GstAFSinkClass *klass) { GObjectClass *gobject_class; @@ -263,17 +271,10 @@ gst_afsink_get_property (GObject *object, guint prop_id, GValue *value, GParamSp } gboolean -gst_afsink_plugin_init (GModule *module, GstPlugin *plugin) +gst_afsink_plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - factory = gst_element_factory_new ("afsink", GST_TYPE_AFSINK, - &afsink_details); - g_return_val_if_fail (factory != NULL, FALSE); - - gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (afsink_sink_factory)); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); + if (!gst_element_register (plugin, "afsink", GST_RANK_NONE, GST_TYPE_AFSINK)) + return FALSE; return TRUE; } |