diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-02 21:37:09 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-02 21:37:09 +0000 |
commit | ac6d8c026fbc68e493f2ceb919a5ada2215a79cd (patch) | |
tree | cc8f5fd9b225cb6a4496ab4519f3fd807ad673be | |
parent | c19bddc886f6ae203f4139f9b316ec04d054496b (diff) | |
download | gst-plugins-bad-ac6d8c026fbc68e493f2ceb919a5ada2215a79cd.tar.gz gst-plugins-bad-ac6d8c026fbc68e493f2ceb919a5ada2215a79cd.tar.bz2 gst-plugins-bad-ac6d8c026fbc68e493f2ceb919a5ada2215a79cd.zip |
Passthrough... New plugin system... Bla...
Original commit message from CVS:
Passthrough... New plugin system... Bla...
-rw-r--r-- | gst/passthrough/gstpassthrough.c | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/gst/passthrough/gstpassthrough.c b/gst/passthrough/gstpassthrough.c index 9cfcfba6..351a3426 100644 --- a/gst/passthrough/gstpassthrough.c +++ b/gst/passthrough/gstpassthrough.c @@ -33,12 +33,9 @@ static GstElementDetails passthrough_details = { "Passthrough", "Filter/Audio/Effect", - "LGPL", "Transparent filter for audio/raw (boilerplate for effects)", - VERSION, "Thomas <thomas@apestaart.org>, "\ - "Andy Wingo <apwingo@eos.ncsu.edu>", - "(C) 2001", + "Andy Wingo <apwingo@eos.ncsu.edu>" }; enum { @@ -88,6 +85,7 @@ passthrough_src_factory (void) } static void passthrough_class_init (GstPassthroughClass *klass); +static void passthrough_base_init (GstPassthroughClass *klass); static void passthrough_init (GstPassthrough *filter); static void passthrough_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); @@ -164,7 +162,8 @@ gst_passthrough_get_type (void) if (!passthrough_type) { static const GTypeInfo passthrough_info = { - sizeof (GstPassthroughClass), NULL, + sizeof (GstPassthroughClass), + (GBaseInitFunc) passthrough_base_init, NULL, (GClassInitFunc) passthrough_class_init, NULL, @@ -179,6 +178,16 @@ gst_passthrough_get_type (void) } static void +passthrough_base_init (GstPassthroughClass *klass) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + + gst_element_class_add_pad_template (element_class, passthrough_src_factory ()); + gst_element_class_add_pad_template (element_class, passthrough_sink_factory ()); + gst_element_class_set_details (element_class, &passthrough_details); +} + +static void passthrough_class_init (GstPassthroughClass *klass) { GObjectClass *gobject_class; @@ -307,24 +316,21 @@ passthrough_get_property (GObject *object, guint prop_id, GValue *value, GParamS } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - factory = gst_element_factory_new ("passthrough", GST_TYPE_PASSTHROUGH, &passthrough_details); - g_return_val_if_fail (factory != NULL, FALSE); - - gst_element_factory_add_pad_template (factory, passthrough_src_factory ()); - gst_element_factory_add_pad_template (factory, passthrough_sink_factory ()); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - - return TRUE; + return gst_element_register (plugin, "passthrough", + GST_RANK_NONE, GST_TYPE_PASSTHROUGH); } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "passthrough", - plugin_init -}; + "Transparent filter for audio/raw (boilerplate for effects)", + plugin_init, + VERSION, + "LGPL", + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +) |