diff options
-rw-r--r-- | gst/spectrum/gstspectrum.c | 45 | ||||
-rw-r--r-- | gst/speed/gstspeed.c | 49 | ||||
-rw-r--r-- | gst/stereo/README | 3 | ||||
-rw-r--r-- | gst/stereo/gststereo.c | 47 | ||||
-rw-r--r-- | gst/vbidec/gstvbidec.c | 51 |
5 files changed, 105 insertions, 90 deletions
diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c index 5a2e8eb9..eab15fe1 100644 --- a/gst/spectrum/gstspectrum.c +++ b/gst/spectrum/gstspectrum.c @@ -25,15 +25,12 @@ #include "gstspectrum.h" /* elementfactory information */ -static GstElementDetails gst_spectrum_details = { +static GstElementDetails gst_spectrum_details = GST_ELEMENT_DETAILS ( "Spectrum analyzer", "Filter/Audio/Analysis", - "LGPL", "Run an FFT on the audio signal, output spectrum data", - VERSION, - "Erik Walthinsen <omega@cse.ogi.edu>", - "(C) 1999", -}; + "Erik Walthinsen <omega@cse.ogi.edu>" +); /* Spectrum signals and args */ enum { @@ -47,6 +44,7 @@ enum { }; +static void gst_spectrum_base_init (gpointer g_class); static void gst_spectrum_class_init (GstSpectrumClass *klass); static void gst_spectrum_init (GstSpectrum *spectrum); @@ -70,7 +68,8 @@ gst_spectrum_get_type (void) if (!spectrum_type) { static const GTypeInfo spectrum_info = { - sizeof(GstSpectrumClass), NULL, + sizeof(GstSpectrumClass), + gst_spectrum_base_init, NULL, (GClassInitFunc)gst_spectrum_class_init, NULL, @@ -85,6 +84,13 @@ gst_spectrum_get_type (void) } static void +gst_spectrum_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_set_details (element_class, &gst_spectrum_details); +} +static void gst_spectrum_class_init (GstSpectrumClass *klass) { GObjectClass *gobject_class; @@ -193,23 +199,20 @@ gst_spectrum_chain (GstPad *pad, GstData *_data) } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - /* create an elementfactory for the spectrum element */ - factory = gst_element_factory_new ("spectrum",GST_TYPE_SPECTRUM, - &gst_spectrum_details); - g_return_val_if_fail (factory != NULL, FALSE); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - - return TRUE; + return gst_element_register (plugin, "spectrum", GST_RANK_NONE, GST_TYPE_SPECTRUM); } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "spectrum", - plugin_init -}; + "Run an FFT on the audio signal, output spectrum data", + plugin_init, + VERSION, + GST_LICENSE, + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +) diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c index 0137e807..9fa1c7cf 100644 --- a/gst/speed/gstspeed.c +++ b/gst/speed/gstspeed.c @@ -36,15 +36,12 @@ #define SPEED_NUMBUF 6 /* elementfactory information */ -static GstElementDetails speed_details = { +static GstElementDetails speed_details = GST_ELEMENT_DETAILS ( "Speed", "Filter/Audio/Effect", - "LGPL", "Set speed/pitch on audio/raw streams (resampler)", - VERSION, - "Andy Wingo <apwingo@eos.ncsu.edu>", - "(C) 2001" -}; + "Andy Wingo <apwingo@eos.ncsu.edu>" +); /* Filter signals and args */ @@ -102,6 +99,7 @@ speed_sink_get_bufferpool (GstPad *pad) return filter->sinkpool; } +static void speed_base_init (gpointer g_class); static void speed_class_init (GstSpeedClass *klass); static void speed_init (GstSpeed *filter); @@ -170,7 +168,8 @@ gst_speed_get_type(void) { if (!speed_type) { static const GTypeInfo speed_info = { - sizeof(GstSpeedClass), NULL, + sizeof(GstSpeedClass), + speed_base_init, NULL, (GClassInitFunc)speed_class_init, NULL, @@ -185,6 +184,16 @@ gst_speed_get_type(void) { } static void +speed_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_set_details (element_class, &speed_details); + + gst_element_class_add_pad_template (element_class, speed_src_factory ()); + gst_element_class_add_pad_template (element_class, speed_sink_factory ()); +} +static void speed_class_init (GstSpeedClass *klass) { GObjectClass *gobject_class = (GObjectClass*)klass; @@ -303,24 +312,20 @@ speed_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *p } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - factory = gst_element_factory_new("speed", GST_TYPE_SPEED, &speed_details); - g_return_val_if_fail(factory != NULL, FALSE); - - gst_element_factory_add_pad_template (factory, speed_src_factory ()); - gst_element_factory_add_pad_template (factory, speed_sink_factory ()); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - - return TRUE; + return gst_element_register(plugin, "speed", GST_RANK_NONE, GST_TYPE_SPEED); } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "speed", - plugin_init -}; + "Set speed/pitch on audio/raw streams (resampler)", + plugin_init, + VERSION, + GST_LICENSE, + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +) diff --git a/gst/stereo/README b/gst/stereo/README deleted file mode 100644 index a61e66ae..00000000 --- a/gst/stereo/README +++ /dev/null @@ -1,3 +0,0 @@ -This effect is borrowed from xmms-0.6.1, though I mangled it so badly in -the process of copying it over that the xmms people probably won't want -any credit for it ;-) diff --git a/gst/stereo/gststereo.c b/gst/stereo/gststereo.c index 2ff34092..cb8ff0dd 100644 --- a/gst/stereo/gststereo.c +++ b/gst/stereo/gststereo.c @@ -17,21 +17,23 @@ * Boston, MA 02111-1307, USA. */ +/* This effect is borrowed from xmms-0.6.1, though I mangled it so badly in + * the process of copying it over that the xmms people probably won't want + * any credit for it ;-) + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <gststereo.h> /* elementfactory information */ -static GstElementDetails stereo_details = { +static GstElementDetails stereo_details = GST_ELEMENT_DETAILS ( "Stereo effect", "Filter/Audio/Effect", - "LGPL", "Muck with the stereo signal, enhance it's 'stereo-ness'", - VERSION, - "Erik Walthinsen <omega@cse.ogi.edu>", - "(C) 1999", -}; + "Erik Walthinsen <omega@cse.ogi.edu>" +); /* Stereo signals and args */ @@ -47,6 +49,7 @@ enum { }; +static void gst_stereo_base_init (gpointer g_class); static void gst_stereo_class_init (GstStereoClass *klass); static void gst_stereo_init (GstStereo *stereo); @@ -64,7 +67,8 @@ gst_stereo_get_type(void) { if (!stereo_type) { static const GTypeInfo stereo_info = { - sizeof(GstStereoClass), NULL, + sizeof(GstStereoClass), + gst_stereo_base_init, NULL, (GClassInitFunc)gst_stereo_class_init, NULL, @@ -79,6 +83,12 @@ gst_stereo_get_type(void) { } static void +gst_stereo_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + gst_element_class_set_details (element_class, &stereo_details); +} +static void gst_stereo_class_init (GstStereoClass *klass) { GObjectClass *gobject_class; @@ -210,22 +220,21 @@ gst_stereo_get_property (GObject *object, guint prop_id, GValue *value, GParamSp } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - factory = gst_element_factory_new("stereo",GST_TYPE_STEREO, - &stereo_details); - g_return_val_if_fail(factory != NULL, FALSE); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - - return TRUE; + return gst_element_register (plugin, "stereo", GST_RANK_NONE, GST_TYPE_STEREO); } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "stereo", - plugin_init -}; + "Muck with the stereo signal, enhance it's 'stereo-ness'", + plugin_init, + VERSION, + GST_LICENSE, + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +) diff --git a/gst/vbidec/gstvbidec.c b/gst/vbidec/gstvbidec.c index bfd5aa34..1655623d 100644 --- a/gst/vbidec/gstvbidec.c +++ b/gst/vbidec/gstvbidec.c @@ -63,15 +63,12 @@ struct _GstVBIDecClass { GType gst_vbidec_get_type(void); /* elementfactory information */ -static GstElementDetails gst_vbidec_details = { +static GstElementDetails gst_vbidec_details = GST_ELEMENT_DETAILS ( "VBI decoder", "Codec/Video/Decoder", - "GPL", "Decodes closed captions and XDS data from VBI data", - VERSION, - "David I. Lehn <dlehn@users.sourceforge.net>", - "(C) 2002" -}; + "David I. Lehn <dlehn@users.sourceforge.net>" +); /* VBIDec signals and args */ enum { @@ -131,6 +128,7 @@ gst_vbidec_caption_type_get_type (void) return vbidec_caption_type_type; } +static void gst_vbidec_base_init (gpointer g_class); static void gst_vbidec_class_init (GstVBIDecClass *klass); static void gst_vbidec_init (GstVBIDec *vbidec); @@ -152,7 +150,7 @@ gst_vbidec_get_type (void) if (!vbidec_type) { static const GTypeInfo vbidec_info = { sizeof(GstVBIDecClass), - NULL, + gst_vbidec_base_init, NULL, (GClassInitFunc)gst_vbidec_class_init, NULL, @@ -167,6 +165,16 @@ gst_vbidec_get_type (void) } static void +gst_vbidec_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_set_details (element_class, &gst_vbidec_details); + + gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (src_template_factory)); + gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (sink_template_factory)); +} +static void gst_vbidec_class_init(GstVBIDecClass *klass) { GObjectClass *gobject_class; @@ -358,27 +366,20 @@ gst_vbidec_get_property (GObject *object, guint prop_id, GValue *value, GParamSp } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - /* create an elementfactory for the vbidec element */ - factory = gst_element_factory_new("vbidec",GST_TYPE_VBIDEC, - &gst_vbidec_details); - g_return_val_if_fail(factory != NULL, FALSE); - gst_element_factory_set_rank (factory, GST_ELEMENT_RANK_PRIMARY); - - gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_template_factory)); - gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_template_factory)); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - - return TRUE; + return gst_element_register (plugin, "vbidec", GST_RANK_NONE, GST_TYPE_VBIDEC); } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "vbidec", - plugin_init -}; + "Decodes closed captions and XDS data from VBI data", + plugin_init, + VERSION, + "GPL", + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +) |