From c1620298ba12720da4ed1fd4fac8f5bfd2ca4da7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 12 Nov 2008 16:55:00 +0000 Subject: [PATCH] tools/gst-inspect.c: Add --plugin option. Fixes #560301. Original commit message from CVS: * tools/gst-inspect.c: (main): Add --plugin option. Fixes #560301. --- ChangeLog | 5 +++++ tools/gst-inspect.c | 20 ++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc24038..1860298 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-11-12 Wim Taymans + * tools/gst-inspect.c: (main): + Add --plugin option. Fixes #560301. + +2008-11-12 Wim Taymans + * docs/random/wtay/poll-timeout: Quick braindump for a possible (not totally verified) atomic case. diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 477d49a..1fa580d 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -1318,6 +1318,7 @@ int main (int argc, char *argv[]) { gboolean print_all = FALSE; + gboolean plugin_name = FALSE; gboolean print_aii = FALSE; GOptionEntry options[] = { {"print-all", 'a', 0, G_OPTION_ARG_NONE, &print_all, @@ -1327,6 +1328,8 @@ main (int argc, char *argv[]) "provides.\n " "Useful in connection with external automatic plugin " "installation mechanisms"), NULL}, + {"plugin", '\0', 0, G_OPTION_ARG_NONE, &plugin_name, + N_("List the plugin contents"), NULL}, GST_TOOLS_GOPTION_VERSION, {NULL} }; @@ -1368,13 +1371,18 @@ main (int argc, char *argv[]) const char *arg = argv[argc - 1]; int retval; - factory = gst_element_factory_find (arg); - /* if there's a factory, print out the info */ - if (factory) { - retval = print_element_info (factory, print_all); - gst_object_unref (factory); + if (!plugin_name) { + factory = gst_element_factory_find (arg); + + /* if there's a factory, print out the info */ + if (factory) { + retval = print_element_info (factory, print_all); + gst_object_unref (factory); + } else { + retval = print_element_features (arg); + } } else { - retval = print_element_features (arg); + retval = -1; } /* otherwise check if it's a plugin */ -- 2.7.4