mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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:
parent
2ffbb1a374
commit
ccd1a2e8ad
1 changed files with 24 additions and 3 deletions
|
@ -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 {
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue