From: <tho...@fr...> - 2005-09-03 17:01:05
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Sat Sep 03 2005 10:01:04 PDT Log message: add a source plugin description field, to represent the source module this plugin is a part of. By default GST_PLUGIN_DEFINE will set it to PACKAGE, which is automake's idea of the name of the source project. Modified files: . : ChangeLog docs/gst/tmpl : gstplugin.sgml gst : gst.c gstplugin.c gstplugin.h gst/elements : gstelements.c gst/registries : gstlibxmlregistry.c gstxmlregistry.c tools : gst-inspect.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.1449&r2=1.1450 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/docs/gst/tmpl/gstplugin.sgml.diff?r1=1.46&r2=1.47 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.163&r2=1.164 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstplugin.c.diff?r1=1.139&r2=1.140 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstplugin.h.diff?r1=1.47&r2=1.48 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/elements/gstelements.c.diff?r1=1.64&r2=1.65 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/registries/gstlibxmlregistry.c.diff?r1=1.11&r2=1.12 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/registries/gstxmlregistry.c.diff?r1=1.71&r2=1.72 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/tools/gst-inspect.c.diff?r1=1.89&r2=1.90 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.1449 retrieving revision 1.1450 diff -u -d -r1.1449 -r1.1450 --- ChangeLog 3 Sep 2005 13:49:47 -0000 1.1449 +++ ChangeLog 3 Sep 2005 17:00:51 -0000 1.1450 @@ -1,5 +1,24 @@ 2005-09-03 Thomas Vander Stichele <thomas at apestaart dot org> + * docs/gst/tmpl/gstplugin.sgml: + * gst/elements/gstelements.c: + * gst/gst.c: + * gst/gstplugin.c: (gst_plugin_register_func), + (gst_plugin_desc_copy), (gst_plugin_desc_free), + (gst_plugin_get_source): + * gst/gstplugin.h: + * gst/registries/gstlibxmlregistry.c: (load_plugin), + (gst_xml_registry_save_plugin): + * gst/registries/gstxmlregistry.c: (gst_xml_registry_parse_plugin), + * tools/gst-inspect.c: (print_plugin_info): + add a "source" plugin description field, to represent the source + module this plugin is a part of. By default GST_PLUGIN_DEFINE + will set it to PACKAGE, which is automake's idea of the name of + the source project. + +2005-09-03 Thomas Vander Stichele <thomas at apestaart dot org> * Makefile.am: * autogen.sh: * configure.ac: Index: gstplugin.sgml RCS file: /cvs/gstreamer/gstreamer/docs/gst/tmpl/gstplugin.sgml,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- gstplugin.sgml 5 Aug 2005 10:02:43 -0000 1.46 +++ gstplugin.sgml 3 Sep 2005 17:00:51 -0000 1.47 @@ -89,6 +89,7 @@ @plugin_exit: @version: version of the plugin @license: effective license of plugin +@module: @package: package plugin belongs to @origin: URL to provider of plugin @_gst_reserved: Index: gst.c RCS file: /cvs/gstreamer/gstreamer/gst/gst.c,v retrieving revision 1.163 retrieving revision 1.164 diff -u -d -r1.163 -r1.164 --- gst.c 2 Sep 2005 17:23:06 -0000 1.163 +++ gst.c 3 Sep 2005 17:00:51 -0000 1.164 @@ -677,6 +677,7 @@ NULL, VERSION, GST_LICENSE, + PACKAGE, GST_PACKAGE, GST_ORIGIN, Index: gstplugin.c RCS file: /cvs/gstreamer/gstreamer/gst/gstplugin.c,v retrieving revision 1.139 retrieving revision 1.140 diff -u -d -r1.139 -r1.140 --- gstplugin.c 24 Aug 2005 16:09:50 -0000 1.139 +++ gstplugin.c 3 Sep 2005 17:00:51 -0000 1.140 @@ -190,7 +190,8 @@ return NULL; } - if (!desc->license || !desc->description || !desc->package || !desc->origin) { + if (!desc->license || !desc->description || !desc->source || + !desc->package || !desc->origin) { if (GST_CAT_DEFAULT) GST_INFO ("plugin \"%s\" has incorrect GstPluginDesc, not loading", plugin->filename); @@ -498,6 +499,8 @@ dest->version = g_strdup (src->version); g_free (dest->license); dest->license = g_strdup (src->license); + g_free (dest->source); + dest->source = g_strdup (src->source); g_free (dest->package); dest->package = g_strdup (src->package); g_free (dest->origin); @@ -513,6 +516,7 @@ g_free (desc->description); g_free (desc->version); g_free (desc->license); + g_free (desc->source); g_free (desc->package); g_free (desc->origin); @@ -628,6 +632,22 @@ } /** + * gst_plugin_get_source: + * @plugin: plugin to get the source of + * + * get the source module the plugin belongs to. + * Returns: the source of the plugin + */ +G_CONST_RETURN gchar * +gst_plugin_get_source (GstPlugin * plugin) +{ + g_return_val_if_fail (plugin != NULL, NULL); + return plugin->desc.source; +} +/** * gst_plugin_get_package: * @plugin: plugin to get the package of * Index: gstplugin.h RCS file: /cvs/gstreamer/gstreamer/gst/gstplugin.h,v retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- gstplugin.h 25 Apr 2005 13:00:47 -0000 1.47 +++ gstplugin.h 3 Sep 2005 17:00:51 -0000 1.48 @@ -58,10 +58,11 @@ gchar *name; /* unique name of plugin */ gchar *description; /* description of plugin */ GstPluginInitFunc plugin_init; /* pointer to plugin_init function */ - GstPluginExitFunc plugin_exit; /* pointer to exiting function */ + GstPluginExitFunc plugin_exit; /* pointer to plugin_exit function */ gchar *version; /* version of the plugin */ gchar *license; /* effective license of plugin */ - gchar *package; /* package plugin belongs to */ + gchar *source; /* source module plugin belongs to */ + gchar *package; /* shipped package plugin belongs to */ gchar *origin; /* URL to provider of plugin */ gpointer _gst_reserved[GST_PADDING]; @@ -90,6 +91,7 @@ NULL, \ version, \ license, \ + PACKAGE, \ package, \ origin, \ GST_PADDING_INIT \ @@ -108,6 +110,7 @@ NULL, \ version, \ license, \ + PACKAGE, \ package, \ origin, \ GST_PADDING_INIT \ @@ -132,6 +135,7 @@ G_CONST_RETURN gchar* gst_plugin_get_filename (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_version (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_license (GstPlugin *plugin); +G_CONST_RETURN gchar* gst_plugin_get_source (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_package (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_origin (GstPlugin *plugin); GModule * gst_plugin_get_module (GstPlugin *plugin); Index: gstelements.c RCS file: /cvs/gstreamer/gstreamer/gst/elements/gstelements.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- gstelements.c 16 Jul 2005 19:25:41 -0000 1.64 +++ gstelements.c 3 Sep 2005 17:00:51 -0000 1.65 @@ -77,4 +77,4 @@ GST_VERSION_MINOR, "gstelements", "standard GStreamer elements", - plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN) + plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN); Index: gstlibxmlregistry.c RCS file: /cvs/gstreamer/gstreamer/gst/registries/gstlibxmlregistry.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- gstlibxmlregistry.c 25 Aug 2005 20:52:07 -0000 1.11 +++ gstlibxmlregistry.c 3 Sep 2005 17:00:51 -0000 1.12 @@ -838,6 +838,9 @@ } else if (g_str_equal (tag, "license")) { if (!read_string (reader, &plugin->desc.license)) break; + } else if (g_str_equal (tag, "source")) { + if (!read_string (reader, &plugin->desc.source)) + break; } else if (g_str_equal (tag, "package")) { if (!read_string (reader, &plugin->desc.package)) @@ -1134,6 +1137,7 @@ PUT_ESCAPED ("filename", plugin->filename); PUT_ESCAPED ("version", plugin->desc.version); PUT_ESCAPED ("license", plugin->desc.license); + PUT_ESCAPED ("source", plugin->desc.source); PUT_ESCAPED ("package", plugin->desc.package); PUT_ESCAPED ("origin", plugin->desc.origin); Index: gstxmlregistry.c RCS file: /cvs/gstreamer/gstreamer/gst/registries/gstxmlregistry.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- gstxmlregistry.c 25 Aug 2005 20:52:07 -0000 1.71 +++ gstxmlregistry.c 3 Sep 2005 17:00:51 -0000 1.72 @@ -741,6 +741,8 @@ plugin->desc.version = g_strndup (text, text_len); } else if (!strcmp (tag, "license")) { plugin->desc.license = g_strndup (text, text_len); + } else if (!strcmp (tag, "source")) { + plugin->desc.source = g_strndup (text, text_len); } else if (!strcmp (tag, "package")) { plugin->desc.package = g_strndup (text, text_len); } else if (!strcmp (tag, "origin")) { @@ -1270,6 +1272,7 @@ Index: gst-inspect.c RCS file: /cvs/gstreamer/gstreamer/tools/gst-inspect.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- gst-inspect.c 29 Aug 2005 19:59:52 -0000 1.89 +++ gst-inspect.c 3 Sep 2005 17:00:52 -0000 1.90 @@ -898,13 +898,15 @@ print_plugin_info (GstPlugin * plugin) { n_print ("Plugin Details:\n"); - n_print (" Name:\t\t%s\n", plugin->desc.name); - n_print (" Description:\t%s\n", plugin->desc.description); - n_print (" Filename:\t%s\n", plugin->filename ? plugin->filename : "(null)"); - n_print (" Version:\t%s\n", plugin->desc.version); - n_print (" License:\t%s\n", plugin->desc.license); - n_print (" Package:\t%s\n", plugin->desc.package); - n_print (" Origin URL:\t%s\n", plugin->desc.origin); + n_print (" Name:\t\t\t%s\n", plugin->desc.name); + n_print (" Description:\t\t%s\n", plugin->desc.description); + n_print (" Filename:\t\t%s\n", + plugin->filename ? plugin->filename : "(null)"); + n_print (" Version:\t\t%s\n", plugin->desc.version); + n_print (" License:\t\t%s\n", plugin->desc.license); + n_print (" Source module:\t%s\n", plugin->desc.source); + n_print (" Binary package:\t%s\n", plugin->desc.package); + n_print (" Origin URL:\t\t%s\n", plugin->desc.origin); n_print ("\n"); |