inspect: allow to get plugin-install-info for all installed plugins

If no plugin is given, print the info for all plugins. This can be used as a
starting point to generate a profile about what the gstreamer installation can
potentialy handle (e.g. for MTP or DLNA).
This commit is contained in:
Stefan Kost 2009-11-09 14:55:54 +02:00
parent 2ffbb1a374
commit ccd1a2e8ad

View file

@ -1434,6 +1434,23 @@ print_plugin_automatic_install_info (GstPlugin * plugin)
g_list_free (features); g_list_free (features);
} }
static void
print_all_plugin_automatic_install_info (void)
{
GList *plugins, *orig_plugins;
orig_plugins = plugins = gst_default_registry_get_plugin_list ();
while (plugins) {
GstPlugin *plugin;
plugin = (GstPlugin *) (plugins->data);
plugins = g_list_next (plugins);
print_plugin_automatic_install_info (plugin);
}
gst_plugin_list_free (orig_plugins);
}
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
@ -1450,7 +1467,7 @@ main (int argc, char *argv[])
N_("Print list of blacklisted files"), NULL}, N_("Print list of blacklisted files"), NULL},
{"print-plugin-auto-install-info", '\0', 0, G_OPTION_ARG_NONE, &print_aii, {"print-plugin-auto-install-info", '\0', 0, G_OPTION_ARG_NONE, &print_aii,
N_("Print a machine-parsable list of features the specified plugin " N_("Print a machine-parsable list of features the specified plugin "
"provides.\n " "or all plugins provide.\n "
"Useful in connection with external automatic plugin " "Useful in connection with external automatic plugin "
"installation mechanisms"), NULL}, "installation mechanisms"), NULL},
{"plugin", '\0', 0, G_OPTION_ARG_NONE, &plugin_name, {"plugin", '\0', 0, G_OPTION_ARG_NONE, &plugin_name,
@ -1506,8 +1523,12 @@ main (int argc, char *argv[])
} else if (argc == 1 || print_all) { } else if (argc == 1 || print_all) {
if (do_print_blacklist) if (do_print_blacklist)
print_blacklist (); print_blacklist ();
else else {
print_element_list (print_all); if (print_aii)
print_all_plugin_automatic_install_info ();
else
print_element_list (print_all);
}
} else { } else {
/* else we try to get a factory */ /* else we try to get a factory */
GstElementFactory *factory; GstElementFactory *factory;