From f5ef4dec93d6316d57b2fddcbbf483b715c2ffec Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 21 Feb 2003 19:41:02 +0000 Subject: [PATCH] - indentation fixes Original commit message from CVS: - indentation fixes - dynamic properties fixes - object hierarchy fixes - float ranges and property fixes --- tools/gst-xmlinspect.c | 46 +++++++++++++----------- tools/xml2text.xsl | 95 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 104 insertions(+), 37 deletions(-) diff --git a/tools/gst-xmlinspect.c b/tools/gst-xmlinspect.c index 5ed04d2..77db842 100644 --- a/tools/gst-xmlinspect.c +++ b/tools/gst-xmlinspect.c @@ -363,7 +363,7 @@ print_element_properties (GstElement *element, gint pfx) case G_TYPE_FLOAT: { GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param); - PUT_STRING (pfx + 2, "", + PUT_STRING (pfx + 2, "", pfloat->minimum, pfloat->maximum); PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value)); break; @@ -448,39 +448,48 @@ print_element_dynparamaters (GstElement *element, gint pfx) GParamSpec** specs; gint x; + PUT_START_TAG (pfx, "dyn-params"); + if((dpman = gst_dpman_get_manager (element))) { - PUT_START_TAG (pfx, "dyn-params"); specs = gst_dpman_list_dparam_specs (dpman); for (x = 0; specs[x] != NULL; x++) { - g_print (" %-20.20s: ", g_param_spec_get_name (specs[x])); + PUT_START_TAG (pfx + 1, "dyn-param"); + + PUT_ESCAPED (pfx + 2, "name", g_param_spec_get_name (specs[x])); + PUT_ESCAPED (pfx + 2, "type", g_type_name (specs[x]->value_type)); + PUT_ESCAPED (pfx + 2, "nick", g_param_spec_get_nick (specs[x])); + PUT_ESCAPED (pfx + 2, "blurb", g_param_spec_get_blurb (specs[x])); switch (G_PARAM_SPEC_VALUE_TYPE (specs[x])) { case G_TYPE_INT64: - g_print ("64 Bit Integer (Default %" G_GINT64_FORMAT ", Range %" G_GINT64_FORMAT " -> %" G_GINT64_FORMAT ")", - ((GParamSpecInt64 *) specs[x])->default_value, - ((GParamSpecInt64 *) specs[x])->minimum, - ((GParamSpecInt64 *) specs[x])->maximum); + PUT_STRING (pfx + 2, "", + ((GParamSpecInt64 *) specs[x])->minimum, + ((GParamSpecInt64 *) specs[x])->maximum); + PUT_STRING (pfx + 2, "%"G_GINT64_FORMAT"", + ((GParamSpecInt64 *) specs[x])->default_value); break; case G_TYPE_INT: - g_print ("Integer (Default %d, Range %d -> %d)", - ((GParamSpecInt *) specs[x])->default_value, - ((GParamSpecInt *) specs[x])->minimum, - ((GParamSpecInt *) specs[x])->maximum); + PUT_STRING (pfx + 2, "", + ((GParamSpecInt *) specs[x])->minimum, + ((GParamSpecInt *) specs[x])->maximum); + PUT_STRING (pfx + 2, "%d", + ((GParamSpecInt *) specs[x])->default_value); break; case G_TYPE_FLOAT: - g_print ("Float. Default: %-8.8s %15.7g\n", "", - ((GParamSpecFloat *) specs[x])->default_value); - g_print ("%-23.23s Range: %15.7g - %15.7g", "", + PUT_STRING (pfx + 2, "", ((GParamSpecFloat *) specs[x])->minimum, ((GParamSpecFloat *) specs[x])->maximum); + PUT_STRING (pfx + 2, "%f", + ((GParamSpecFloat *) specs[x])->default_value); break; default: - g_print ("unknown %ld", G_PARAM_SPEC_VALUE_TYPE (specs[x])); + break; } - PUT_END_TAG (pfx, "dyn-params"); + PUT_END_TAG (pfx + 1, "dyn-param"); } g_free (specs); } + PUT_END_TAG (pfx, "dyn-params"); } static void @@ -524,8 +533,6 @@ print_element_signals (GstElement *element, gint pfx) for (j = 0; j < n_params; j++) { PUT_ESCAPED (pfx + 3, "type", g_type_name (param_types[j])); } - if (k == 0) - PUT_ESCAPED (pfx + 3, "type", "gpointer"); PUT_END_TAG (pfx + 2, "params"); @@ -754,8 +761,7 @@ print_element_info (GstElementFactory *factory) PUT_END_TAG (3, "implementation"); if (realpad->caps) { - g_print (" Capabilities:\n"); - print_caps (realpad->caps, 8); + print_caps (realpad->caps, 3); } PUT_END_TAG (2, "pad"); } diff --git a/tools/xml2text.xsl b/tools/xml2text.xsl index 448432c..6797ee5 100644 --- a/tools/xml2text.xsl +++ b/tools/xml2text.xsl @@ -1,6 +1,7 @@ - + + @@ -11,9 +12,9 @@ - + @@ -35,7 +36,27 @@ + + + + + + + + + + +---- + + + + + + + + + + @@ -105,10 +126,22 @@ + + Float: + + + + + + Float range: + + + + - + : String: ' ' @@ -116,7 +149,7 @@ - + : FourCC: ' ' @@ -124,7 +157,7 @@ - + : Integer: @@ -132,12 +165,28 @@ - + : Integer range: + + + + : Float: + + + + + + + + : Float range: + + + + @@ -202,12 +251,13 @@ - Dynamic Parameters: + Dynamic Parameters: none + @@ -327,23 +377,33 @@ . (Default ) + + + + + + Range : + + - + - - : + + : - + - + - , + , + + arg @@ -351,9 +411,7 @@ - " - - " : + user_function @@ -369,7 +427,10 @@ - , gpointer user_data); + , + + + gpointer user_data); -- 2.7.4