From ccd1a2e8aded89642d3f80ddd2eed5efd49e223a Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 9 Nov 2009 14:55:54 +0200 Subject: [PATCH] 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). --- tools/gst-inspect.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 8769ee48f0..b2502f44cc 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -1434,6 +1434,23 @@ print_plugin_automatic_install_info (GstPlugin * plugin) 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 main (int argc, char *argv[]) { @@ -1450,7 +1467,7 @@ main (int argc, char *argv[]) N_("Print list of blacklisted files"), NULL}, {"print-plugin-auto-install-info", '\0', 0, G_OPTION_ARG_NONE, &print_aii, 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 " "installation mechanisms"), NULL}, {"plugin", '\0', 0, G_OPTION_ARG_NONE, &plugin_name, @@ -1506,8 +1523,12 @@ main (int argc, char *argv[]) } else if (argc == 1 || print_all) { if (do_print_blacklist) print_blacklist (); - else - print_element_list (print_all); + else { + if (print_aii) + print_all_plugin_automatic_install_info (); + else + print_element_list (print_all); + } } else { /* else we try to get a factory */ GstElementFactory *factory;