mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +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>
|
2008-11-12 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
* docs/random/wtay/poll-timeout:
|
* docs/random/wtay/poll-timeout:
|
||||||
|
|
|
@ -1318,6 +1318,7 @@ int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
gboolean print_all = FALSE;
|
gboolean print_all = FALSE;
|
||||||
|
gboolean plugin_name = FALSE;
|
||||||
gboolean print_aii = FALSE;
|
gboolean print_aii = FALSE;
|
||||||
GOptionEntry options[] = {
|
GOptionEntry options[] = {
|
||||||
{"print-all", 'a', 0, G_OPTION_ARG_NONE, &print_all,
|
{"print-all", 'a', 0, G_OPTION_ARG_NONE, &print_all,
|
||||||
|
@ -1327,6 +1328,8 @@ main (int argc, char *argv[])
|
||||||
"provides.\n "
|
"provides.\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,
|
||||||
|
N_("List the plugin contents"), NULL},
|
||||||
GST_TOOLS_GOPTION_VERSION,
|
GST_TOOLS_GOPTION_VERSION,
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
@ -1368,13 +1371,18 @@ main (int argc, char *argv[])
|
||||||
const char *arg = argv[argc - 1];
|
const char *arg = argv[argc - 1];
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
factory = gst_element_factory_find (arg);
|
if (!plugin_name) {
|
||||||
/* if there's a factory, print out the info */
|
factory = gst_element_factory_find (arg);
|
||||||
if (factory) {
|
|
||||||
retval = print_element_info (factory, print_all);
|
/* if there's a factory, print out the info */
|
||||||
gst_object_unref (factory);
|
if (factory) {
|
||||||
|
retval = print_element_info (factory, print_all);
|
||||||
|
gst_object_unref (factory);
|
||||||
|
} else {
|
||||||
|
retval = print_element_features (arg);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
retval = print_element_features (arg);
|
retval = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* otherwise check if it's a plugin */
|
/* otherwise check if it's a plugin */
|
||||||
|
|
Loading…
Reference in a new issue