From: Iain <nod...@us...> - 2003-11-01 15:19:57
|
CVS Root: /cvsroot/gstreamer Module: gst-plugins Changes by: nodatadj Date: Sat Nov 01 2003 07:19:52 PST Log message: DVDReadSrc updated as well Modified files: ext/dvdread : dvdreadsrc.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/dvdread/dvdreadsrc.c.diff?r1=1.6&r2=1.7 ====Begin Diffs==== Index: dvdreadsrc.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/ext/dvdread/dvdreadsrc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- dvdreadsrc.c 8 Oct 2003 16:07:37 -0000 1.6 +++ dvdreadsrc.c 1 Nov 2003 15:19:40 -0000 1.7 @@ -89,11 +89,8 @@ GstElementDetails dvdreadsrc_details = { "DVD Source", "Source/File/DVD", - "GPL", "Access a DVD title/chapter/angle using libdvdread", - VERSION, "Erik Walthinsen <om...@cs...>", - "(C) 2001", }; @@ -111,7 +108,7 @@ ARG_ANGLE }; - +static void dvdreadsrc_base_init (gpointer g_class); static void dvdreadsrc_class_init (DVDReadSrcClass *klass); static void dvdreadsrc_init (DVDReadSrc *dvdreadsrc); @@ -135,7 +132,8 @@ if (!dvdreadsrc_type) { static const GTypeInfo dvdreadsrc_info = { - sizeof(DVDReadSrcClass), NULL, + sizeof(DVDReadSrcClass), + dvdreadsrc_base_init, NULL, (GClassInitFunc)dvdreadsrc_class_init, NULL, @@ -150,6 +148,14 @@ } static void +dvdreadsrc_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_set_details (element_class, &dvdreadsrc_details); +} + +static void dvdreadsrc_class_init (DVDReadSrcClass *klass) { GObjectClass *gobject_class; @@ -771,24 +777,23 @@ } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; + if (!gst_element_register (plugin, "dvdreadsrc", GST_RANK_NONE, GST_TYPE_DVDREADSRC)) + return FALSE; - /* create an elementfactory for the dvdreadsrc element */ - factory = gst_element_factory_new ("dvdreadsrc", GST_TYPE_DVDREADSRC, - &dvdreadsrc_details); - g_return_val_if_fail (factory != NULL, FALSE); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - return TRUE; } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "dvdreadsrc", - plugin_init -}; + "Access a DVD with dvdread", + plugin_init, + VERSION, + "GPL", + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN) |