gstvalue: use value_nick for serialization

not value_name . This was causing incorrect launch lines to be
displayed by gst-device-monitor, and the deserialization code
below works with nicks.
This commit is contained in:
Mathieu Duponchelle 2019-09-07 04:36:18 +02:00 committed by Mathieu Duponchelle
parent a9e2776074
commit 0dafe6e639
2 changed files with 4 additions and 4 deletions

View file

@ -3754,7 +3754,7 @@ gst_value_serialize_enum (const GValue * value)
}
g_return_val_if_fail (en, NULL);
return g_strdup (en->value_name);
return g_strdup (en->value_nick);
}
static gint

View file

@ -2668,9 +2668,9 @@ GST_START_TEST (test_serialize_deserialize_format_enum)
str = gst_structure_to_string (s);
GST_LOG ("Got structure string '%s'", GST_STR_NULL (str));
fail_unless (str != NULL);
fail_unless (strstr (str, "TIME") != NULL);
fail_unless (strstr (str, "BYTE") != NULL);
fail_unless (strstr (str, "DEFAULT") != NULL);
fail_unless (strstr (str, "time") != NULL);
fail_unless (strstr (str, "byte") != NULL);
fail_unless (strstr (str, "default") != NULL);
fail_unless (strstr (str, "FOOBAR") != NULL);
s2 = gst_structure_from_string (str, &end);