mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
add a source plugin description field, to represent the source module this plugin is a part of. By default GST_PLUGI...
Original commit message from CVS: 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.
This commit is contained in:
parent
91cd48e4b7
commit
25169fe885
10 changed files with 66 additions and 12 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
||||||
|
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>
|
2005-09-03 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* Makefile.am:
|
* Makefile.am:
|
||||||
|
|
|
@ -89,6 +89,7 @@ loaded will use this variable to initialize the plugin.
|
||||||
@plugin_exit:
|
@plugin_exit:
|
||||||
@version: version of the plugin
|
@version: version of the plugin
|
||||||
@license: effective license of plugin
|
@license: effective license of plugin
|
||||||
|
@module:
|
||||||
@package: package plugin belongs to
|
@package: package plugin belongs to
|
||||||
@origin: URL to provider of plugin
|
@origin: URL to provider of plugin
|
||||||
@_gst_reserved:
|
@_gst_reserved:
|
||||||
|
|
|
@ -77,4 +77,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
"gstelements",
|
"gstelements",
|
||||||
"standard GStreamer elements",
|
"standard GStreamer elements",
|
||||||
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
|
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
|
||||||
|
|
|
@ -677,6 +677,7 @@ static GstPluginDesc plugin_desc = {
|
||||||
NULL,
|
NULL,
|
||||||
VERSION,
|
VERSION,
|
||||||
GST_LICENSE,
|
GST_LICENSE,
|
||||||
|
PACKAGE,
|
||||||
GST_PACKAGE,
|
GST_PACKAGE,
|
||||||
GST_ORIGIN,
|
GST_ORIGIN,
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,8 @@ gst_plugin_register_func (GstPlugin * plugin, GModule * module,
|
||||||
return NULL;
|
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)
|
if (GST_CAT_DEFAULT)
|
||||||
GST_INFO ("plugin \"%s\" has incorrect GstPluginDesc, not loading",
|
GST_INFO ("plugin \"%s\" has incorrect GstPluginDesc, not loading",
|
||||||
plugin->filename);
|
plugin->filename);
|
||||||
|
@ -498,6 +499,8 @@ gst_plugin_desc_copy (GstPluginDesc * dest, const GstPluginDesc * src)
|
||||||
dest->version = g_strdup (src->version);
|
dest->version = g_strdup (src->version);
|
||||||
g_free (dest->license);
|
g_free (dest->license);
|
||||||
dest->license = g_strdup (src->license);
|
dest->license = g_strdup (src->license);
|
||||||
|
g_free (dest->source);
|
||||||
|
dest->source = g_strdup (src->source);
|
||||||
g_free (dest->package);
|
g_free (dest->package);
|
||||||
dest->package = g_strdup (src->package);
|
dest->package = g_strdup (src->package);
|
||||||
g_free (dest->origin);
|
g_free (dest->origin);
|
||||||
|
@ -513,6 +516,7 @@ gst_plugin_desc_free (GstPluginDesc * desc)
|
||||||
g_free (desc->description);
|
g_free (desc->description);
|
||||||
g_free (desc->version);
|
g_free (desc->version);
|
||||||
g_free (desc->license);
|
g_free (desc->license);
|
||||||
|
g_free (desc->source);
|
||||||
g_free (desc->package);
|
g_free (desc->package);
|
||||||
g_free (desc->origin);
|
g_free (desc->origin);
|
||||||
|
|
||||||
|
@ -627,6 +631,22 @@ gst_plugin_get_license (GstPlugin * plugin)
|
||||||
return plugin->desc.license;
|
return plugin->desc.license;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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:
|
* gst_plugin_get_package:
|
||||||
* @plugin: plugin to get the package of
|
* @plugin: plugin to get the package of
|
||||||
|
|
|
@ -58,10 +58,11 @@ struct _GstPluginDesc {
|
||||||
gchar *name; /* unique name of plugin */
|
gchar *name; /* unique name of plugin */
|
||||||
gchar *description; /* description of plugin */
|
gchar *description; /* description of plugin */
|
||||||
GstPluginInitFunc plugin_init; /* pointer to plugin_init function */
|
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 *version; /* version of the plugin */
|
||||||
gchar *license; /* effective license of 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 */
|
gchar *origin; /* URL to provider of plugin */
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
|
@ -90,6 +91,7 @@ GST_PLUGIN_EXPORT GstPluginDesc gst_plugin_desc = { \
|
||||||
NULL, \
|
NULL, \
|
||||||
version, \
|
version, \
|
||||||
license, \
|
license, \
|
||||||
|
PACKAGE, \
|
||||||
package, \
|
package, \
|
||||||
origin, \
|
origin, \
|
||||||
GST_PADDING_INIT \
|
GST_PADDING_INIT \
|
||||||
|
@ -108,6 +110,7 @@ _gst_plugin_static_init__ ##init (void) \
|
||||||
NULL, \
|
NULL, \
|
||||||
version, \
|
version, \
|
||||||
license, \
|
license, \
|
||||||
|
PACKAGE, \
|
||||||
package, \
|
package, \
|
||||||
origin, \
|
origin, \
|
||||||
GST_PADDING_INIT \
|
GST_PADDING_INIT \
|
||||||
|
@ -132,6 +135,7 @@ G_CONST_RETURN gchar* gst_plugin_get_description (GstPlugin *plugin);
|
||||||
G_CONST_RETURN gchar* gst_plugin_get_filename (GstPlugin *plugin);
|
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_version (GstPlugin *plugin);
|
||||||
G_CONST_RETURN gchar* gst_plugin_get_license (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_package (GstPlugin *plugin);
|
||||||
G_CONST_RETURN gchar* gst_plugin_get_origin (GstPlugin *plugin);
|
G_CONST_RETURN gchar* gst_plugin_get_origin (GstPlugin *plugin);
|
||||||
GModule * gst_plugin_get_module (GstPlugin *plugin);
|
GModule * gst_plugin_get_module (GstPlugin *plugin);
|
||||||
|
|
|
@ -838,6 +838,9 @@ load_plugin (xmlTextReaderPtr reader)
|
||||||
} else if (g_str_equal (tag, "license")) {
|
} else if (g_str_equal (tag, "license")) {
|
||||||
if (!read_string (reader, &plugin->desc.license))
|
if (!read_string (reader, &plugin->desc.license))
|
||||||
break;
|
break;
|
||||||
|
} else if (g_str_equal (tag, "source")) {
|
||||||
|
if (!read_string (reader, &plugin->desc.source))
|
||||||
|
break;
|
||||||
} else if (g_str_equal (tag, "package")) {
|
} else if (g_str_equal (tag, "package")) {
|
||||||
if (!read_string (reader, &plugin->desc.package))
|
if (!read_string (reader, &plugin->desc.package))
|
||||||
break;
|
break;
|
||||||
|
@ -1134,6 +1137,7 @@ gst_xml_registry_save_plugin (GstXMLRegistry * xmlregistry, GstPlugin * plugin)
|
||||||
PUT_ESCAPED ("filename", plugin->filename);
|
PUT_ESCAPED ("filename", plugin->filename);
|
||||||
PUT_ESCAPED ("version", plugin->desc.version);
|
PUT_ESCAPED ("version", plugin->desc.version);
|
||||||
PUT_ESCAPED ("license", plugin->desc.license);
|
PUT_ESCAPED ("license", plugin->desc.license);
|
||||||
|
PUT_ESCAPED ("source", plugin->desc.source);
|
||||||
PUT_ESCAPED ("package", plugin->desc.package);
|
PUT_ESCAPED ("package", plugin->desc.package);
|
||||||
PUT_ESCAPED ("origin", plugin->desc.origin);
|
PUT_ESCAPED ("origin", plugin->desc.origin);
|
||||||
|
|
||||||
|
|
|
@ -741,6 +741,8 @@ gst_xml_registry_parse_plugin (GMarkupParseContext * context, const gchar * tag,
|
||||||
plugin->desc.version = g_strndup (text, text_len);
|
plugin->desc.version = g_strndup (text, text_len);
|
||||||
} else if (!strcmp (tag, "license")) {
|
} else if (!strcmp (tag, "license")) {
|
||||||
plugin->desc.license = g_strndup (text, text_len);
|
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")) {
|
} else if (!strcmp (tag, "package")) {
|
||||||
plugin->desc.package = g_strndup (text, text_len);
|
plugin->desc.package = g_strndup (text, text_len);
|
||||||
} else if (!strcmp (tag, "origin")) {
|
} else if (!strcmp (tag, "origin")) {
|
||||||
|
@ -1270,6 +1272,7 @@ gst_xml_registry_save_plugin (GstXMLRegistry * xmlregistry, GstPlugin * plugin)
|
||||||
PUT_ESCAPED ("filename", plugin->filename);
|
PUT_ESCAPED ("filename", plugin->filename);
|
||||||
PUT_ESCAPED ("version", plugin->desc.version);
|
PUT_ESCAPED ("version", plugin->desc.version);
|
||||||
PUT_ESCAPED ("license", plugin->desc.license);
|
PUT_ESCAPED ("license", plugin->desc.license);
|
||||||
|
PUT_ESCAPED ("source", plugin->desc.source);
|
||||||
PUT_ESCAPED ("package", plugin->desc.package);
|
PUT_ESCAPED ("package", plugin->desc.package);
|
||||||
PUT_ESCAPED ("origin", plugin->desc.origin);
|
PUT_ESCAPED ("origin", plugin->desc.origin);
|
||||||
|
|
||||||
|
|
|
@ -77,4 +77,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
"gstelements",
|
"gstelements",
|
||||||
"standard GStreamer elements",
|
"standard GStreamer elements",
|
||||||
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
|
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
|
||||||
|
|
|
@ -898,13 +898,15 @@ static void
|
||||||
print_plugin_info (GstPlugin * plugin)
|
print_plugin_info (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
n_print ("Plugin Details:\n");
|
n_print ("Plugin Details:\n");
|
||||||
n_print (" Name:\t\t%s\n", plugin->desc.name);
|
n_print (" Name:\t\t\t%s\n", plugin->desc.name);
|
||||||
n_print (" Description:\t%s\n", plugin->desc.description);
|
n_print (" Description:\t\t%s\n", plugin->desc.description);
|
||||||
n_print (" Filename:\t%s\n", plugin->filename ? plugin->filename : "(null)");
|
n_print (" Filename:\t\t%s\n",
|
||||||
n_print (" Version:\t%s\n", plugin->desc.version);
|
plugin->filename ? plugin->filename : "(null)");
|
||||||
n_print (" License:\t%s\n", plugin->desc.license);
|
n_print (" Version:\t\t%s\n", plugin->desc.version);
|
||||||
n_print (" Package:\t%s\n", plugin->desc.package);
|
n_print (" License:\t\t%s\n", plugin->desc.license);
|
||||||
n_print (" Origin URL:\t%s\n", plugin->desc.origin);
|
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");
|
n_print ("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue