summaryrefslogtreecommitdiffstats
path: root/gst/monoscope
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-11-02 21:25:42 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-11-02 21:25:42 +0000
commit7a34944aa9788cf8d3751cd2baa14ae4d4bb7199 (patch)
tree8965f8412984ff8f99653458cc549d104703e41d /gst/monoscope
parent302cf767d9ce10576be370c5266f40f088a63ba6 (diff)
That was monoscope...
Original commit message from CVS: That was monoscope...
Diffstat (limited to 'gst/monoscope')
-rw-r--r--gst/monoscope/gstmonoscope.c49
1 files changed, 27 insertions, 22 deletions
diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c
index a87414ac..b4169c2f 100644
--- a/gst/monoscope/gstmonoscope.c
+++ b/gst/monoscope/gstmonoscope.c
@@ -66,11 +66,8 @@ GType gst_monoscope_get_type(void);
static GstElementDetails gst_monoscope_details = {
"Monoscope",
"Visualization",
- "GPL",
"Displays a highly stabilised waveform of audio input",
- VERSION,
- "Richard Boulton <richard@tartarus.org>",
- "(C) 2002",
+ "Richard Boulton <richard@tartarus.org>"
};
/* signals and args */
@@ -122,6 +119,7 @@ GST_PAD_TEMPLATE_FACTORY (sink_template,
static void gst_monoscope_class_init (GstMonoscopeClass *klass);
+static void gst_monoscope_base_init (GstMonoscopeClass *klass);
static void gst_monoscope_init (GstMonoscope *monoscope);
static void gst_monoscope_chain (GstPad *pad, GstData *_data);
@@ -141,7 +139,7 @@ gst_monoscope_get_type (void)
if (!type) {
static const GTypeInfo info = {
sizeof (GstMonoscopeClass),
- NULL,
+ (GBaseInitFunc) gst_monoscope_base_init,
NULL,
(GClassInitFunc) gst_monoscope_class_init,
NULL,
@@ -156,6 +154,18 @@ gst_monoscope_get_type (void)
}
static void
+gst_monoscope_base_init (GstMonoscopeClass *klass)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+ gst_element_class_add_pad_template (element_class,
+ GST_PAD_TEMPLATE_GET (src_template));
+ gst_element_class_add_pad_template (element_class,
+ GST_PAD_TEMPLATE_GET (sink_template));
+ gst_element_class_set_details (element_class, &gst_monoscope_details);
+}
+
+static void
gst_monoscope_class_init(GstMonoscopeClass *klass)
{
GObjectClass *gobject_class;
@@ -310,26 +320,21 @@ gst_monoscope_chain (GstPad *pad, GstData *_data)
}
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
- /* create an elementfactory for the monoscope element */
- factory = gst_element_factory_new("monoscope",GST_TYPE_MONOSCOPE,
- &gst_monoscope_details);
- g_return_val_if_fail(factory != NULL, FALSE);
-
- gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_template));
- gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_template));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
- return TRUE;
+ return gst_element_register(plugin, "monoscope",
+ GST_RANK_NONE, GST_TYPE_MONOSCOPE);
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"monoscope",
- plugin_init
-};
+ "Monoscope visualization",
+ plugin_init,
+ VERSION,
+ "LGPL",
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN
+)