mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
validate: report: Do not repeat type name when printing its details
This commit is contained in:
parent
b4ddea0fd2
commit
eb6739c91b
1 changed files with 15 additions and 23 deletions
|
@ -476,35 +476,33 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args)
|
||||||
} else if (*(GType *) source == GST_TYPE_VALIDATE_ACTION_TYPE) {
|
} else if (*(GType *) source == GST_TYPE_VALIDATE_ACTION_TYPE) {
|
||||||
gint i;
|
gint i;
|
||||||
gchar *desc, *tmp;
|
gchar *desc, *tmp;
|
||||||
|
|
||||||
GstValidateActionType *type = GST_VALIDATE_ACTION_TYPE (source);
|
GstValidateActionType *type = GST_VALIDATE_ACTION_TYPE (source);
|
||||||
|
|
||||||
g_string_printf (string, "\n%s Action type:", type->name);
|
g_string_printf (string, "\nAction type:");
|
||||||
g_string_append_printf (string, "\n%s Name: %s", type->name,
|
g_string_append_printf (string, "\n Name: %s", type->name);
|
||||||
type->name);
|
|
||||||
|
|
||||||
if (type->is_config)
|
if (type->is_config)
|
||||||
g_string_append_printf (string,
|
g_string_append_printf (string,
|
||||||
"\n%s Is config action (meaning it will be executing right "
|
"\n Is config action (meaning it will be executing right "
|
||||||
"at the begining of the execution of the pipeline)", type->name);
|
"at the begining of the execution of the pipeline)");
|
||||||
|
|
||||||
tmp = g_strdup_printf ("\n%s ", type->name);
|
tmp = g_strdup_printf ("\n ");
|
||||||
desc =
|
desc =
|
||||||
g_regex_replace (newline_regex, type->description, -1, 0, tmp, 0,
|
g_regex_replace (newline_regex, type->description, -1, 0, tmp, 0,
|
||||||
NULL);
|
NULL);
|
||||||
g_string_append_printf (string, "\n%s\n%s Description: \n%s %s",
|
g_string_append_printf (string, "\n\n Description: \n %s", desc);
|
||||||
type->name, type->name, type->name, desc);
|
|
||||||
g_free (desc);
|
g_free (desc);
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
|
|
||||||
if (type->parameters) {
|
if (type->parameters) {
|
||||||
g_string_append_printf (string, "\n%s\n%s Parametters:",
|
g_string_append_printf (string, "\n\n Parametters:");
|
||||||
type->name, type->name);
|
|
||||||
|
|
||||||
for (i = 0; type->parameters[i].name; i++) {
|
for (i = 0; type->parameters[i].name; i++) {
|
||||||
gint nw = 0;
|
gint nw = 0;
|
||||||
gchar *param_head =
|
gchar *param_head =
|
||||||
g_strdup_printf (" %s", type->parameters[i].name);
|
g_strdup_printf (" %s", type->parameters[i].name);
|
||||||
gchar *tmp_head = g_strdup_printf ("\n%s %-30s : %s", type->name,
|
gchar *tmp_head = g_strdup_printf ("\n %-30s : %s",
|
||||||
param_head, "something");
|
param_head, "something");
|
||||||
|
|
||||||
|
|
||||||
|
@ -513,9 +511,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args)
|
||||||
|
|
||||||
g_free (tmp_head);
|
g_free (tmp_head);
|
||||||
|
|
||||||
tmp =
|
tmp = g_strdup_printf ("\n%*s", nw + 1, " ");
|
||||||
g_strdup_printf ("\n%s%*s", type->name,
|
|
||||||
nw - (gint) strlen (type->name) + 1, " ");
|
|
||||||
|
|
||||||
if (g_strcmp0 (type->parameters[i].description, "")) {
|
if (g_strcmp0 (type->parameters[i].description, "")) {
|
||||||
desc =
|
desc =
|
||||||
|
@ -525,13 +521,11 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args)
|
||||||
desc = g_strdup_printf ("No description");
|
desc = g_strdup_printf ("No description");
|
||||||
}
|
}
|
||||||
|
|
||||||
g_string_append_printf (string, "\n%s %-30s : %s", type->name,
|
g_string_append_printf (string, "\n %-30s : %s", param_head, desc);
|
||||||
param_head, desc);
|
|
||||||
g_free (desc);
|
g_free (desc);
|
||||||
|
|
||||||
if (type->parameters[i].possible_variables) {
|
if (type->parameters[i].possible_variables) {
|
||||||
gchar *tmp1 = g_strdup_printf ("\n%s%*s", type->name,
|
gchar *tmp1 = g_strdup_printf ("\n%*s", nw + 4, " ");
|
||||||
nw - (gint) strlen (type->name) + 4, " ");
|
|
||||||
desc =
|
desc =
|
||||||
g_regex_replace (newline_regex,
|
g_regex_replace (newline_regex,
|
||||||
type->parameters[i].possible_variables, -1, 0, tmp1, 0, NULL);
|
type->parameters[i].possible_variables, -1, 0, tmp1, 0, NULL);
|
||||||
|
@ -542,8 +536,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type->parameters[i].types) {
|
if (type->parameters[i].types) {
|
||||||
gchar *tmp1 = g_strdup_printf ("\n%s%*s", type->name,
|
gchar *tmp1 = g_strdup_printf ("\n%*s", nw + 4, " ");
|
||||||
nw - (gint) strlen (type->name) + 4, " ");
|
|
||||||
desc =
|
desc =
|
||||||
g_regex_replace (newline_regex,
|
g_regex_replace (newline_regex,
|
||||||
type->parameters[i].types, -1, 0, tmp1, 0, NULL);
|
type->parameters[i].types, -1, 0, tmp1, 0, NULL);
|
||||||
|
@ -566,8 +559,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args)
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
g_string_append_printf (string, "\n%s\n%s No Parameters", type->name,
|
g_string_append_printf (string, "\n\n No Parameters");
|
||||||
type->name);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (GST_IS_OBJECT (source)) {
|
} else if (GST_IS_OBJECT (source)) {
|
||||||
|
|
Loading…
Reference in a new issue