- Add case where we have element in subset that are equal to element in
superset. In this case subset is still a subset if at least one element is a
subset of the corresponding element in superset.
- clarify gst_value_is_subset inline documentation
- Add helper VALUE_TYPE_SINGLETON (type) to identify GType that represent a
value that is not a collection.
- Fixed issue in gst_value_is_subset_array_array (<1, 2, 3>, <0, 1, 4, 2, 3>)
would have returned TRUE because because the alignment of the subset could be
done multiple times. Now once alignment of set as been done once, everything
else in the superset need to be a subset of corresponding element without
interuption. is_subset (<1, 2, 3>, <0, 1, 2, 3>) => TRUE, but is_subset (<1,
2, 3>, <0, 1, 4, 2, 3>) => FALSE.
- If both array are fixed value and we perform a is_subset on them, both value
can't be equal to be considered subset. (For consistency with other fixed
values)
- Define gst_value_subtract (singleton, array) and
gst_value_subtract (array, singleton), to allow a gst_value_is_subset
(singleton, array) and gst_value_is_subset (array, singleton). General
case of gst_value_is_subset (v1, v2) use gst_value_subtract (v1, v2) and
gst_value_subtract (v2, v1) to evaluate _is_subset(), therefore we need these
for is_subset() operation that involve singleton and array.
Note gst_value_subtract (array, array) is not implemented but this case is not
require by gst_value_is_subset () and as it has a direct handling. Warned if
the case is used.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9220>