diff options
author | Benjamin Otte <otte@gnome.org> | 2003-11-02 22:34:11 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2003-11-02 22:34:11 +0000 |
commit | 309bd248b1e332861d4f64bc8091f4c222e6e681 (patch) | |
tree | 5309fdbbb9c318c1352f99118732a3682ae369d3 /gst/udp/gstudp.c | |
parent | 1075f2109ff170d89d76106d2fec066c4472f44f (diff) |
fix for new plugin system
Original commit message from CVS:
fix for new plugin system
Diffstat (limited to 'gst/udp/gstudp.c')
-rw-r--r-- | gst/udp/gstudp.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/gst/udp/gstudp.c b/gst/udp/gstudp.c index 1a2f4a1c..f74b4b2d 100644 --- a/gst/udp/gstudp.c +++ b/gst/udp/gstudp.c @@ -21,32 +21,27 @@ #include "gstudpsrc.h" #include "gstudpsink.h" -/* elementfactory information */ -extern GstElementDetails gst_udpsrc_details; -extern GstElementDetails gst_udpsink_details; - static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *src, *sink; - - /* create an elementfactory for the udpsrc element */ - sink = gst_element_factory_new ("udpsink",GST_TYPE_UDPSINK, - &gst_udpsink_details); - g_return_val_if_fail (sink != NULL, FALSE); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (sink)); - - src = gst_element_factory_new ("udpsrc",GST_TYPE_UDPSRC, - &gst_udpsrc_details); - g_return_val_if_fail (src != NULL, FALSE); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (src)); + if (!gst_element_register (plugin, "udpsink", GST_RANK_NONE, GST_TYPE_UDPSINK)) + return FALSE; + + if (!gst_element_register (plugin, "udpsrc", GST_RANK_NONE, GST_TYPE_UDPSRC)) + return FALSE; return TRUE; } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "udp", - plugin_init -}; + "transfer data via UDP", + plugin_init, + VERSION, + GST_LICENSE, + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +) |