diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2003-11-02 12:48:08 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2003-11-02 12:48:08 +0000 |
commit | 9e42080f8d894ae130b32cb34143f7df31e8ce10 (patch) | |
tree | eab3bb158391bc9cf057348c1f2bf26cfbb072e2 /gst/effectv/gsteffectv.c | |
parent | c4ec05bbd7db334984dd034213948720c1a37538 (diff) |
Updated for the new plugin loading code
Original commit message from CVS:
Updated for the new plugin loading code
Diffstat (limited to 'gst/effectv/gsteffectv.c')
-rw-r--r-- | gst/effectv/gsteffectv.c | 56 |
1 files changed, 25 insertions, 31 deletions
diff --git a/gst/effectv/gsteffectv.c b/gst/effectv/gsteffectv.c index 50979086..28fac81c 100644 --- a/gst/effectv/gsteffectv.c +++ b/gst/effectv/gsteffectv.c @@ -21,6 +21,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <string.h> #include <gst/gst.h> #include <gst/video/video.h> @@ -30,19 +34,17 @@ struct _elements_entry { gchar *name; GType (*type) (void); - GstElementDetails *details; - gboolean (*factoryinit) (GstElementFactory *factory); }; static struct _elements_entry _elements[] = { - { "edgeTV", gst_edgetv_get_type, &gst_edgetv_details, NULL }, - { "agingTV", gst_agingtv_get_type, &gst_agingtv_details, NULL }, - { "diceTV", gst_dicetv_get_type, &gst_dicetv_details, NULL }, - { "warpTV", gst_warptv_get_type, &gst_warptv_details, NULL }, - { "shagadelicTV", gst_shagadelictv_get_type, &gst_shagadelictv_details, NULL }, - { "vertigoTV", gst_vertigotv_get_type, &gst_vertigotv_details, NULL }, - { "revTV", gst_revtv_get_type, &gst_revtv_details, NULL }, - { "quarkTV", gst_quarktv_get_type, &gst_quarktv_details, NULL }, + { "edgeTV", gst_edgetv_get_type }, + { "agingTV", gst_agingtv_get_type }, + { "diceTV", gst_dicetv_get_type }, + { "warpTV", gst_warptv_get_type }, + { "shagadelicTV", gst_shagadelictv_get_type }, + { "vertigoTV", gst_vertigotv_get_type }, + { "revTV", gst_revtv_get_type }, + { "quarkTV", gst_quarktv_get_type }, { NULL, 0 }, }; @@ -86,37 +88,29 @@ gst_effectv_sink_factory (void) } static gboolean -plugin_init (GModule * module, GstPlugin * plugin) +plugin_init (GstPlugin * plugin) { - GstElementFactory *factory; gint i = 0; while (_elements[i].name) { - factory = gst_element_factory_new (_elements[i].name, - (_elements[i].type) (), - _elements[i].details); - - if (!factory) { - g_warning ("gst_effecttv_new failed for `%s'", - _elements[i].name); - continue; - } - gst_element_factory_add_pad_template (factory, gst_effectv_src_factory ()); - gst_element_factory_add_pad_template (factory, gst_effectv_sink_factory ()); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - if (_elements[i].factoryinit) { - _elements[i].factoryinit (factory); - } + if (!gst_element_register (plugin, _elements[i].name, + GST_RANK_NONE, (_elements[i].type) ())) + return FALSE; i++; } return TRUE; } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "effectv", - plugin_init -}; + "effect plugins from the effectv project", + plugin_init, + VERSION, + "LGPL", + "Wim Taymans <wim.taymans@chello.be>, (c) 2001 FUKUCHI Kentarou, (c) 2001 Sam Mertens, (c) 2002 Ed Tannenbaum", + GST_PACKAGE, + GST_ORIGIN +); |