mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
tools/gst-inspect.c: Add --plugin option. Fixes #560301.
Original commit message from CVS: * tools/gst-inspect.c: (main): Add --plugin option. Fixes #560301.
This commit is contained in:
parent
162b2a6a3c
commit
c1620298ba
2 changed files with 19 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-11-12 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* tools/gst-inspect.c: (main):
|
||||
Add --plugin option. Fixes #560301.
|
||||
|
||||
2008-11-12 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* docs/random/wtay/poll-timeout:
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue