From 90beb712a02f95b2353783bd56818baa70c4d99a Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 5 Apr 2019 11:43:53 +0200 Subject: [PATCH] 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. --- tools/gst-inspect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 823e82b..56f8b11 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -636,9 +636,11 @@ print_object_properties_info (GObject * obj, GObjectClass * obj_class, g_type_name (param->value_type), RESET_COLOR); 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) { -- 2.7.4