mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
tools/gst-inspect.c (main): Fallback to plugin if no element is found. This matches the old behavior better. Thanks t...
Original commit message from CVS: * tools/gst-inspect.c (main): Fallback to plugin if no element is found. This matches the old behavior better. Thanks to Thomas for pointing out.
This commit is contained in:
parent
4a26e6f2c7
commit
d6ae3e5426
2 changed files with 24 additions and 32 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-06-15 Johan Dahlin <johan@gnome.org>
|
||||||
|
|
||||||
|
* tools/gst-inspect.c (main): Fallback to plugin if no element is
|
||||||
|
found. This matches the old behavior better. Thanks to Thomas for
|
||||||
|
pointing out.
|
||||||
|
|
||||||
2004-06-14 David Schleef <ds@schleef.org>
|
2004-06-14 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* gst/gstcpu.c: (gst_cpuid_i386): Fix problem when using
|
* gst/gstcpu.c: (gst_cpuid_i386): Fix problem when using
|
||||||
|
|
|
@ -1109,9 +1109,6 @@ print_element_info (GstElementFactory * factory, gboolean print_names)
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
GstElementFactory *factory;
|
|
||||||
GstPlugin *plugin;
|
|
||||||
gchar *so;
|
|
||||||
gboolean print_all = FALSE;
|
gboolean print_all = FALSE;
|
||||||
struct poptOption options[] = {
|
struct poptOption options[] = {
|
||||||
{"print-all", 'a', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &print_all, 0,
|
{"print-all", 'a', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &print_all, 0,
|
||||||
|
@ -1138,41 +1135,30 @@ main (int argc, char *argv[])
|
||||||
print_element_list (print_all);
|
print_element_list (print_all);
|
||||||
/* else we try to get a factory */
|
/* else we try to get a factory */
|
||||||
} else {
|
} else {
|
||||||
|
GstElementFactory *factory;
|
||||||
|
GstPlugin *plugin;
|
||||||
const char *arg = argv[argc - 1];
|
const char *arg = argv[argc - 1];
|
||||||
|
int retval;
|
||||||
|
|
||||||
/* only search for a factory if there's not a '.so' */
|
factory = gst_element_factory_find (arg);
|
||||||
if (!strstr (argv[1], ".so")) {
|
/* if there's a factory, print out the info */
|
||||||
int retval;
|
if (factory) {
|
||||||
|
retval = print_element_info (factory, print_all);
|
||||||
factory = gst_element_factory_find (arg);
|
|
||||||
/* if there's a factory, print out the info */
|
|
||||||
if (factory) {
|
|
||||||
retval = print_element_info (factory, print_all);
|
|
||||||
} else {
|
|
||||||
retval = print_element_features (arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (retval)
|
|
||||||
g_print ("No such element: '%s'\n", arg);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
} else {
|
} else {
|
||||||
/* strip the .so */
|
retval = print_element_features (arg);
|
||||||
so = strstr (argv[argc - 1], ".so");
|
|
||||||
so[0] = '\0';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* otherwise assume it's a plugin */
|
/* otherwise check if it's a plugin */
|
||||||
plugin = gst_registry_pool_find_plugin (arg);
|
if (retval) {
|
||||||
|
plugin = gst_registry_pool_find_plugin (arg);
|
||||||
|
|
||||||
/* if there is such a plugin, print out info */
|
/* if there is such a plugin, print out info */
|
||||||
|
if (plugin) {
|
||||||
if (plugin) {
|
print_plugin_info (plugin);
|
||||||
print_plugin_info (plugin);
|
} else {
|
||||||
|
g_print ("No such element or plugin '%s'\n", arg);
|
||||||
} else {
|
return -1;
|
||||||
g_print ("No such plugin '%s'\n", arg);
|
}
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue