structure: Add a serialization for GArray in GstStructure

Instead of constantly spurting out warnings in the log files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6691>
This commit is contained in:
Edward Hervey 2024-04-19 09:34:12 +02:00 committed by GStreamer Marge Bot
parent 9ad6a9b942
commit 777c8a9b15

View file

@ -2094,6 +2094,10 @@ priv_gst_structure_append_to_gstring (const GstStructure * structure,
g_string_append (s, "NULL");
else
g_string_append_printf (s, "%p", ptr);
} else if (G_TYPE_CHECK_VALUE_TYPE (&field->value, G_TYPE_ARRAY)) {
GArray *arr = g_value_get_boxed (&field->value);
g_string_append_printf (s, "[%d %s]", arr->len,
arr->len == 1 ? "entry" : "entries");
} else {
if (!G_TYPE_CHECK_VALUE_TYPE (&field->value, G_TYPE_STRING))
GST_WARNING ("No value transform to serialize field '%s' of type '%s'",