diff options
author | Jose Antonio Santos Cadenas <santoscadenas@gmail.com> | 2013-04-11 14:54:32 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2013-04-13 12:08:12 +0100 |
commit | 52a5bd9b4b06bdf27f14b2cb003c4c2228efa1ab (patch) | |
tree | e6de1db9a7821df73e9f15868703bb5dfc2ad3a0 | |
parent | 5ef30a7019641c19ec4b1789622ab048d5fe5695 (diff) |
gst-inspect: add pointer mark to signal and action return types that are pointers
When the return type of a signal or action is a pointer, it
should have an asterisk to mark it as such.
https://bugzilla.gnome.org/show_bug.cgi?id=697791
-rw-r--r-- | tools/gst-inspect.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 23b7c440a..d414cae92 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -884,18 +884,29 @@ print_signal_info (GstElement * element) for (l = found_signals; l; l = l->next) { gchar *indent; + const gchar *pmark; int indent_len; query = (GSignalQuery *) l->data; indent_len = strlen (query->signal_name) + strlen (g_type_name (query->return_type)) + 24; + + if (G_TYPE_FUNDAMENTAL (query->return_type) == G_TYPE_POINTER + || G_TYPE_IS_BOXED (query->return_type) + || G_TYPE_IS_OBJECT (query->return_type)) { + pmark = "* "; + indent_len += 2; + } else { + pmark = ""; + } + indent = g_new0 (gchar, indent_len + 1); memset (indent, ' ', indent_len); - n_print (" \"%s\" : %s user_function (%s* object", - query->signal_name, - g_type_name (query->return_type), g_type_name (type)); + n_print (" \"%s\" : %s %suser_function (%s* object", + query->signal_name, g_type_name (query->return_type), pmark, + g_type_name (type)); for (j = 0; j < query->n_params; j++) { g_print (",\n"); |