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),
+ (gst_xml_registry_save_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:
@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:
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);
NULL,
VERSION,
GST_LICENSE,
+ PACKAGE,
GST_PACKAGE,
GST_ORIGIN,
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);
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);
g_free (desc->description);
g_free (desc->version);
g_free (desc->license);
+ g_free (desc->source);
g_free (desc->package);
g_free (desc->origin);
}
/**
+ * 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
*
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];
NULL, \
version, \
license, \
+ PACKAGE, \
package, \
origin, \
GST_PADDING_INIT \
NULL, \
version, \
license, \
+ PACKAGE, \
package, \
origin, \
GST_PADDING_INIT \
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);
} 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))
break;
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);
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")) {
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);
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);
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");
}