summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Ospite <antonio.ospite@collabora.com>2019-04-05 11:43:53 +0200
committerTim-Philipp Müller <tim@centricular.com>2019-05-02 08:31:25 +0100
commit1f9b375f96c7548f78807be615cdb95dce83c2df (patch)
tree1628225350f0158aa4765699b244bc9ce285b232
parent26bd067ff4d745bc1b6b0c98d81e528c06422b00 (diff)
downloadgstreamer-1f9b375f96c7548f78807be615cdb95dce83c2df.tar.gz
gst-inspect: fix printing the first field of a GstStructure
When printing a GstStructure property (e.g. the "stats" property in rtpsession) the first field is printed on the same line of the type description, and this is both inconsistent compared to how Enum values are printed and confusing as the reader might miss the first field. To fix this, add a newline before printing GstStructure fields in properties. NOTE: this does not change the existing inconsistent behavior of an extra newline *after* a GstStructure property, but the latter is not as annoying and it would take more effort to fix because GstStructure fields are printed in CAPS descriptions too.
-rw-r--r--tools/gst-inspect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c
index 89a1fab92c..9619fd202c 100644
--- a/tools/gst-inspect.c
+++ b/tools/gst-inspect.c
@@ -506,9 +506,11 @@ print_object_properties_info (GObject * obj, GObjectClass * obj_class,
g_type_name (param->value_type));
if (param->value_type == GST_TYPE_STRUCTURE) {
const GstStructure *s = gst_value_get_structure (&value);
- if (s)
+ if (s) {
+ g_print ("\n");
gst_structure_foreach (s, print_field,
(gpointer) " ");
+ }
}
} else if (G_IS_PARAM_SPEC_POINTER (param)) {
if (param->value_type != G_TYPE_POINTER) {