mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 23:22:54 +00:00
validate: report: Fix the way we print 'repeat' values
This commit is contained in:
parent
53b2ca8f62
commit
34b5192b94
2 changed files with 6 additions and 2 deletions
|
@ -769,6 +769,9 @@ _append_value (GQuark field_id, const GValue * value, GString * string)
|
|||
if (g_strcmp0 (g_quark_to_string (field_id), "sub-action") == 0)
|
||||
return TRUE;
|
||||
|
||||
if (g_strcmp0 (g_quark_to_string (field_id), "repeat") == 0)
|
||||
return TRUE;
|
||||
|
||||
if (G_VALUE_TYPE (value) == GST_TYPE_CLOCK_TIME)
|
||||
val_str = g_strdup_printf ("%" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (g_value_get_uint64 (value)));
|
||||
|
@ -806,7 +809,8 @@ gst_validate_print_action (GstValidateAction * action, const gchar * message)
|
|||
g_string_append_printf (string, "(subaction)");
|
||||
|
||||
if (gst_structure_get_int (action->structure, "repeat", &nrepeats))
|
||||
g_string_append_printf (string, "(%d/%d)", action->repeat, nrepeats);
|
||||
g_string_append_printf (string, "(%d/%d)", nrepeats - action->repeat + 1,
|
||||
nrepeats);
|
||||
|
||||
g_string_append_printf (string, "%s",
|
||||
gst_structure_get_name (action->structure));
|
||||
|
|
|
@ -20,7 +20,7 @@ GST_START_TEST (test_expression_parser)
|
|||
NULL, NULL, NULL), 20);
|
||||
|
||||
fail_unless_equals_float (gst_validate_utils_parse_expression
|
||||
("100, (10 / 0.1)", NULL, NULL, NULL), 1);
|
||||
("max(100, (10 / 0.1))", NULL, NULL, NULL), 100);
|
||||
|
||||
fail_unless_equals_float (gst_validate_utils_parse_expression
|
||||
("min(10, (duration - 0.1) / 0.1)", get_var, GINT_TO_POINTER (1), NULL),
|
||||
|
|
Loading…
Reference in a new issue