mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 13:55:41 +00:00
gstvalue: add GstTagList compare function
When serializing GstStructures from events in GDP it will add a taglist as a GstStructure field, having the compare function allows comparison of GstStructures to check if the serialized/deserialized version matches the original one, among other cases. https://bugzilla.gnome.org/show_bug.cgi?id=733131
This commit is contained in:
parent
6d05df01b0
commit
4ca6694e09
1 changed files with 11 additions and 1 deletions
|
@ -2159,6 +2159,16 @@ gst_value_deserialize_caps_features (GValue * dest, const gchar * s)
|
|||
/**************
|
||||
* GstTagList *
|
||||
**************/
|
||||
static gint
|
||||
gst_value_compare_tag_list (const GValue * value1, const GValue * value2)
|
||||
{
|
||||
GstTagList *taglist1 = GST_TAG_LIST (g_value_get_boxed (value1));
|
||||
GstTagList *taglist2 = GST_TAG_LIST (g_value_get_boxed (value2));
|
||||
|
||||
if (gst_tag_list_is_equal (taglist1, taglist2))
|
||||
return GST_VALUE_EQUAL;
|
||||
return GST_VALUE_UNORDERED;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_value_deserialize_tag_list (GValue * dest, const gchar * s)
|
||||
|
@ -6295,7 +6305,7 @@ _priv_gst_value_initialize (void)
|
|||
{
|
||||
static GstValueTable gst_value = {
|
||||
0,
|
||||
NULL,
|
||||
gst_value_compare_tag_list,
|
||||
gst_value_serialize_tag_list,
|
||||
gst_value_deserialize_tag_list,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue