*
* Note that operations on the same #GValue from multiple threads may lead to
* undefined behaviour.
- *
- * Last reviewed on 2008-03-11 (0.10.18)
*/
#ifdef HAVE_CONFIG_H
*
* Used by gst_value_intersect() to perform intersection for a specific #GValue
* type. If the intersection is non-empty, the result is
- * placed in @dest and TRUE is returned. If the intersection is
- * empty, @dest is unmodified and FALSE is returned.
+ * placed in @dest and %TRUE is returned. If the intersection is
+ * empty, @dest is unmodified and %FALSE is returned.
* Register a new implementation with gst_value_register_intersect_func().
*
* Returns: %TRUE if the values can intersect
static gchar *gst_string_unwrap (const gchar * s);
static void gst_value_move (GValue * dest, GValue * src);
-static void gst_value_list_append_and_take_value (GValue * value,
+static void _gst_value_list_append_and_take_value (GValue * value,
GValue * append_value);
-static void gst_value_array_append_and_take_value (GValue * value,
+static void _gst_value_array_append_and_take_value (GValue * value,
GValue * append_value);
static inline GstValueTable *
return FALSE;
}
-static void
-gst_value_list_append_and_take_value (GValue * value, GValue * append_value)
+static inline void
+_gst_value_list_append_and_take_value (GValue * value, GValue * append_value)
{
g_array_append_vals ((GArray *) value->data[0].v_pointer, append_value, 1);
memset (append_value, 0, sizeof (GValue));
}
/**
+ * gst_value_list_append_and_take_value:
+ * @value: a #GValue of type #GST_TYPE_LIST
+ * @append_value: (transfer full): the value to append
+ *
+ * Appends @append_value to the GstValueList in @value.
+ *
+ * Since: 1.2
+ */
+void
+gst_value_list_append_and_take_value (GValue * value, GValue * append_value)
+{
+ g_return_if_fail (GST_VALUE_HOLDS_LIST (value));
+ g_return_if_fail (G_IS_VALUE (append_value));
+ g_return_if_fail (gst_value_list_or_array_are_compatible (value,
+ append_value));
+
+ _gst_value_list_append_and_take_value (value, append_value);
+}
+
+/**
* gst_value_list_append_value:
* @value: a #GValue of type #GST_TYPE_LIST
- * @append_value: the value to append
+ * @append_value: (transfer none): the value to append
*
* Appends @append_value to the GstValueList in @value.
*/
g_array_append_vals ((GArray *) value->data[0].v_pointer, &val, 1);
}
-static void
-gst_value_array_append_and_take_value (GValue * value, GValue * append_value)
+static inline void
+_gst_value_array_append_and_take_value (GValue * value, GValue * append_value)
{
g_array_append_vals ((GArray *) value->data[0].v_pointer, append_value, 1);
memset (append_value, 0, sizeof (GValue));
}
/**
+ * gst_value_array_append_and_take_value:
+ * @value: a #GValue of type #GST_TYPE_ARRAY
+ * @append_value: (transfer full): the value to append
+ *
+ * Appends @append_value to the GstValueArray in @value.
+ *
+ * Since: 1.2
+ */
+void
+gst_value_array_append_and_take_value (GValue * value, GValue * append_value)
+{
+ g_return_if_fail (GST_VALUE_HOLDS_ARRAY (value));
+ g_return_if_fail (G_IS_VALUE (append_value));
+ g_return_if_fail (gst_value_list_or_array_are_compatible (value,
+ append_value));
+
+ _gst_value_array_append_and_take_value (value, append_value);
+}
+
+/**
* gst_value_array_prepend_value:
* @value: a #GValue of type #GST_TYPE_ARRAY
* @prepend_value: the value to prepend
*
* Gets the maximum of the range specified by @value.
*
- * Returns: the maxumum of the range
+ * Returns: the maximum of the range
*/
gint
gst_value_get_int_range_max (const GValue * value)
and bounds lie on the same value */
if (n1 > 1) {
if (INT_RANGE_STEP (value1) == INT_RANGE_STEP (value2) &&
- INT_RANGE_STEP (value1) == INT_RANGE_STEP (value2) &&
- INT_RANGE_STEP (value1) == INT_RANGE_STEP (value2)) {
+ INT_RANGE_MIN (value1) == INT_RANGE_MIN (value2) &&
+ INT_RANGE_MAX (value1) == INT_RANGE_MAX (value2)) {
return GST_VALUE_EQUAL;
}
return GST_VALUE_UNORDERED;
*
* Gets the maximum of the range specified by @value.
*
- * Returns: the maxumum of the range
+ * Returns: the maximum of the range
*/
gint64
gst_value_get_int64_range_max (const GValue * value)
and bounds lie on the same value */
if (n1 > 1) {
if (INT64_RANGE_STEP (value1) == INT64_RANGE_STEP (value2) &&
- INT64_RANGE_STEP (value1) == INT64_RANGE_STEP (value2) &&
- INT64_RANGE_STEP (value1) == INT64_RANGE_STEP (value2)) {
+ INT64_RANGE_MIN (value1) == INT64_RANGE_MIN (value2) &&
+ INT64_RANGE_MAX (value1) == INT64_RANGE_MAX (value2)) {
return GST_VALUE_EQUAL;
}
return GST_VALUE_UNORDERED;
*
* Gets the maximum of the range specified by @value.
*
- * Returns: the maxumum of the range
+ * Returns: the maximum of the range
*/
gdouble
gst_value_get_double_range_max (const GValue * value)
gst_value_compare_double_range (const GValue * value1, const GValue * value2)
{
if (value2->data[0].v_double == value1->data[0].v_double &&
- value2->data[0].v_double == value1->data[0].v_double)
+ value2->data[1].v_double == value1->data[1].v_double)
return GST_VALUE_EQUAL;
return GST_VALUE_UNORDERED;
}
return (GstCaps *) g_value_get_boxed (value);
}
+static gint
+gst_value_compare_caps (const GValue * value1, const GValue * value2)
+{
+ GstCaps *caps1 = GST_CAPS (gst_value_get_caps (value1));
+ GstCaps *caps2 = GST_CAPS (gst_value_get_caps (value2));
+
+ if (gst_caps_is_equal (caps1, caps2))
+ return GST_VALUE_EQUAL;
+ return GST_VALUE_UNORDERED;
+}
+
static gchar *
gst_value_serialize_caps (const GValue * value)
{
GstCaps *caps = g_value_get_boxed (value);
-
- return gst_caps_to_string (caps);
+ return gst_string_take_and_wrap (gst_caps_to_string (caps));
}
static gboolean
{
GstCaps *caps;
- caps = gst_caps_from_string (s);
+ if (*s != '"') {
+ caps = gst_caps_from_string (s);
+ } else {
+ gchar *str = gst_string_unwrap (s);
+
+ if (G_UNLIKELY (!str))
+ return FALSE;
+
+ caps = gst_caps_from_string (str);
+ g_free (str);
+ }
if (caps) {
g_value_take_boxed (dest, caps);
return FALSE;
}
+/*******************
+ * GstCapsFeatures *
+ *******************/
+
+/**
+ * gst_value_set_caps_features:
+ * @value: a GValue initialized to GST_TYPE_CAPS_FEATURES
+ * @features: the features to set the value to
+ *
+ * Sets the contents of @value to @features.
+ */
+void
+gst_value_set_caps_features (GValue * value, const GstCapsFeatures * features)
+{
+ g_return_if_fail (G_IS_VALUE (value));
+ g_return_if_fail (G_VALUE_TYPE (value) == GST_TYPE_CAPS_FEATURES);
+ g_return_if_fail (features == NULL || GST_IS_CAPS_FEATURES (features));
+
+ g_value_set_boxed (value, features);
+}
+
+/**
+ * gst_value_get_caps_features:
+ * @value: a GValue initialized to GST_TYPE_CAPS_FEATURES
+ *
+ * Gets the contents of @value.
+ *
+ * Returns: (transfer none): the contents of @value
+ */
+const GstCapsFeatures *
+gst_value_get_caps_features (const GValue * value)
+{
+ g_return_val_if_fail (G_IS_VALUE (value), NULL);
+ g_return_val_if_fail (G_VALUE_TYPE (value) == GST_TYPE_CAPS_FEATURES, NULL);
+
+ return (GstCapsFeatures *) g_value_get_boxed (value);
+}
+
+static gchar *
+gst_value_serialize_caps_features (const GValue * value)
+{
+ GstCapsFeatures *features = g_value_get_boxed (value);
+
+ return gst_string_take_and_wrap (gst_caps_features_to_string (features));
+}
+
+static gboolean
+gst_value_deserialize_caps_features (GValue * dest, const gchar * s)
+{
+ GstCapsFeatures *features;
+
+ if (*s != '"') {
+ features = gst_caps_features_from_string (s);
+ } else {
+ gchar *str = gst_string_unwrap (s);
+
+ if (G_UNLIKELY (!str))
+ return FALSE;
+
+ features = gst_caps_features_from_string (str);
+ g_free (str);
+ }
+
+ if (G_LIKELY (features)) {
+ g_value_take_boxed (dest, features);
+ return TRUE;
+ }
+ return FALSE;
+}
+
/**************
* GstTagList *
**************/
{
gboolean ret = FALSE;
gchar *end;
- gint64 mask = -1;
+ guint64 mask = ~0;
errno = 0;
*to = g_ascii_strtoull (s, &end, 0);
* 0->3, y is copied unescaped.
*
* If \xyy is found where x is an octal number but y is not, an
- * error is encountered and NULL is returned.
+ * error is encountered and %NULL is returned.
*
* the input string must be \0 terminated.
*/
found = gst_iterator_find_custom (iter,
(GCompareFunc) gst_value_deserialize_enum_iter_cmp, &res, (gpointer) s);
- g_return_val_if_fail (found, FALSE);
- format_def = g_value_get_pointer (&res);
- g_return_val_if_fail (format_def != NULL, FALSE);
- g_value_set_enum (dest, (gint) format_def->value);
- g_value_unset (&res);
+ if (found) {
+ format_def = g_value_get_pointer (&res);
+ g_return_val_if_fail (format_def != NULL, FALSE);
+ g_value_set_enum (dest, (gint) format_def->value);
+ g_value_unset (&res);
+ }
gst_iterator_free (iter);
- return TRUE;
+ return found;
}
- g_return_val_if_fail (en, FALSE);
+ /* enum name/nick not found */
+ if (en == NULL)
+ return FALSE;
+
g_value_set_enum (dest, en->value);
return TRUE;
}
gst_value_move (dest, &intersection);
ret = TRUE;
} else if (GST_VALUE_HOLDS_LIST (dest)) {
- gst_value_list_append_and_take_value (dest, &intersection);
+ _gst_value_list_append_and_take_value (dest, &intersection);
} else {
GValue temp;
g_value_unset (dest);
return FALSE;
}
- gst_value_array_append_and_take_value (dest, &val);
+ _gst_value_array_append_and_take_value (dest, &val);
}
return TRUE;
gint step = gst_value_get_int_range_step (subtrahend);
gint val = g_value_get_int (minuend);
+ if (step == 0)
+ return FALSE;
+
/* subtracting a range from an int only works if the int is not in the
* range */
if (val < min || val > max || val % step) {
g_return_val_if_fail (min < max, FALSE);
+ if (step == 0)
+ return FALSE;
+
/* value is outside of the range, return range unchanged */
if (val < min || val > max || val % step) {
if (dest)
}
step = step1;
+ if (step == 0)
+ return FALSE;
+
if (max2 >= max1 && min2 <= min1) {
return FALSE;
} else if (max2 >= max1) {
gint64 step = gst_value_get_int64_range_step (subtrahend);
gint64 val = g_value_get_int64 (minuend);
+ if (step == 0)
+ return FALSE;
/* subtracting a range from an int64 only works if the int64 is not in the
* range */
if (val < min || val > max || val % step) {
g_return_val_if_fail (min < max, FALSE);
+ if (step == 0)
+ return FALSE;
+
/* value is outside of the range, return range unchanged */
if (val < min || val > max || val % step) {
if (dest)
g_assert (FALSE);
return FALSE;
}
+
+ if (step1 == 0)
+ return FALSE;
+
step = step1;
if (max2 >= max1 && min2 <= min1) {
ret = TRUE;
} else if (G_VALUE_HOLDS (dest, ltype)
&& !G_VALUE_HOLDS (&subtraction, ltype)) {
- gst_value_list_append_and_take_value (dest, &subtraction);
+ _gst_value_list_append_and_take_value (dest, &subtraction);
} else {
GValue temp;
*
* Determines if @value1 and @value2 can be compared.
*
- * Returns: TRUE if the values can be compared
+ * Returns: %TRUE if the values can be compared
*/
gboolean
gst_value_can_compare (const GValue * value1, const GValue * value2)
const gint rmin = gst_value_get_int_range_min (value);
const gint rmax = gst_value_get_int_range_max (value);
const gint rstep = gst_value_get_int_range_step (value);
+ if (rstep == 0)
+ return FALSE;
/* note: this will overflow for min 0 and max INT_MAX, but this
would only be equal to a list of INT_MAX elements, which seems
very unlikely */
const gint64 rmax = gst_value_get_int64_range_max (value);
const gint64 rstep = gst_value_get_int64_range_step (value);
GST_DEBUG ("List/range of int64s");
+ if (rstep == 0)
+ return FALSE;
if (list_size != rmax / rstep - rmin / rstep + 1)
return FALSE;
for (n = 0; n < list_size; ++n) {
as well as lists and ranges ("{ 1, 2 }" and "[ 1, 2 ]" are equal) */
ltype = gst_value_list_get_type ();
if (G_VALUE_HOLDS (value1, ltype) && !G_VALUE_HOLDS (value2, ltype)) {
+ gint i, n, ret;
if (gst_value_list_equals_range (value1, value2)) {
return GST_VALUE_EQUAL;
- } else if (gst_value_list_get_size (value1) == 1) {
+ }
+
+ n = gst_value_list_get_size (value1);
+ if (n == 0)
+ return GST_VALUE_UNORDERED;
+
+ for (i = 0; i < n; i++) {
const GValue *elt;
- elt = gst_value_list_get_value (value1, 0);
- return gst_value_compare (elt, value2);
+ elt = gst_value_list_get_value (value1, i);
+ ret = gst_value_compare (elt, value2);
+ if (ret != GST_VALUE_EQUAL && n == 1)
+ return ret;
+ else if (ret != GST_VALUE_EQUAL)
+ return GST_VALUE_UNORDERED;
}
+
+ return GST_VALUE_EQUAL;
} else if (G_VALUE_HOLDS (value2, ltype) && !G_VALUE_HOLDS (value1, ltype)) {
+ gint i, n, ret;
+
if (gst_value_list_equals_range (value2, value1)) {
return GST_VALUE_EQUAL;
- } else if (gst_value_list_get_size (value2) == 1) {
+ }
+
+ n = gst_value_list_get_size (value2);
+ if (n == 0)
+ return GST_VALUE_UNORDERED;
+
+ for (i = 0; i < n; i++) {
const GValue *elt;
- elt = gst_value_list_get_value (value2, 0);
- return gst_value_compare (elt, value1);
+ elt = gst_value_list_get_value (value2, i);
+ ret = gst_value_compare (elt, value1);
+ if (ret != GST_VALUE_EQUAL && n == 1)
+ return ret;
+ else if (ret != GST_VALUE_EQUAL)
+ return GST_VALUE_UNORDERED;
}
+
+ return GST_VALUE_EQUAL;
}
if (G_VALUE_TYPE (value1) != G_VALUE_TYPE (value2))
*
* Determines if @value1 and @value2 can be non-trivially unioned.
* Any two values can be trivially unioned by adding both of them
- * to a GstValueList. However, certain types have the possibility
+ * to a #GstValueList. However, certain types have the possibility
* to be unioned in a simpler way. For example, an integer range
* and an integer can be unioned if the integer is a subset of the
* integer range. If there is the possibility that two values can
- * be unioned, this function returns TRUE.
+ * be unioned, this function returns %TRUE.
*
- * Returns: TRUE if there is a function allowing the two values to
+ * Returns: %TRUE if there is a function allowing the two values to
* be unioned.
*/
gboolean
*
* Creates a GValue corresponding to the union of @value1 and @value2.
*
- * Returns: TRUE if the union suceeded.
+ * Returns: %TRUE if the union succeeded.
*/
gboolean
gst_value_union (GValue * dest, const GValue * value1, const GValue * value2)
*
* Determines if intersecting two values will produce a valid result.
* Two values will produce a valid intersection if they have the same
- * type, or if there is a method (registered by
- * gst_value_register_intersect_func()) to calculate the intersection.
+ * type.
*
- * Returns: TRUE if the values can intersect
+ * Returns: %TRUE if the values can intersect
*/
gboolean
gst_value_can_intersect (const GValue * value1, const GValue * value2)
/**
* gst_value_intersect:
* @dest: (out caller-allocates) (transfer full): a uninitialized #GValue that will hold the calculated
- * intersection value. May be NULL if the resulting set if not needed.
+ * intersection value. May be %NULL if the resulting set if not needed.
* @value1: a value to intersect
* @value2: another value to intersect
*
* Calculates the intersection of two values. If the values have
* a non-empty intersection, the value representing the intersection
- * is placed in @dest, unless NULL. If the intersection is non-empty,
+ * is placed in @dest, unless %NULL. If the intersection is non-empty,
* @dest is not modified.
*
- * Returns: TRUE if the intersection is non-empty
+ * Returns: %TRUE if the intersection is non-empty
*/
gboolean
gst_value_intersect (GValue * dest, const GValue * value1,
/**
* gst_value_subtract:
* @dest: (out caller-allocates): the destination value for the result if the
- * subtraction is not empty. May be NULL, in which case the resulting set
+ * subtraction is not empty. May be %NULL, in which case the resulting set
* will not be computed, which can give a fair speedup.
* @minuend: the value to subtract from
* @subtrahend: the value to subtract
*
* Checks if it's possible to subtract @subtrahend from @minuend.
*
- * Returns: TRUE if a subtraction is possible
+ * Returns: %TRUE if a subtraction is possible
*/
gboolean
gst_value_can_subtract (const GValue * minuend, const GValue * subtrahend)
{
GstValueSubtractInfo info;
- /* one type must be unfixed, other subtractions can be done as comparisons,
- * special case: bitmasks */
- if (minuend_type != GST_TYPE_BITMASK)
- g_return_if_fail (!gst_type_is_fixed (minuend_type)
- || !gst_type_is_fixed (subtrahend_type));
+ g_return_if_fail (!gst_type_is_fixed (minuend_type)
+ || !gst_type_is_fixed (subtrahend_type));
info.minuend = minuend_type;
info.subtrahend = subtrahend_type;
*
* Free-function: g_free
*
- * Returns: (transfer full): the serialization for @value or NULL if none exists
+ * Returns: (transfer full): the serialization for @value or %NULL if none exists
*/
gchar *
gst_value_serialize (const GValue * value)
* @src: string to deserialize
*
* Tries to deserialize a string into the type specified by the given GValue.
- * If the operation succeeds, TRUE is returned, FALSE otherwise.
+ * If the operation succeeds, %TRUE is returned, %FALSE otherwise.
*
- * Returns: TRUE on success
+ * Returns: %TRUE on success
*/
gboolean
gst_value_deserialize (GValue * dest, const gchar * src)
* Fixate @src into a new value @dest.
* For ranges, the first element is taken. For lists and arrays, the
* first item is fixated and returned.
- * If @src is already fixed, this function returns FALSE.
+ * If @src is already fixed, this function returns %FALSE.
*
- * Returns: true if @dest contains a fixated version of @src.
+ * Returns: %TRUE if @dest contains a fixated version of @src.
*/
gboolean
gst_value_fixate (GValue * dest, const GValue * src)
gst_value_init_and_copy (&kid, orig_kid);
else
res = TRUE;
- gst_value_array_append_and_take_value (dest, &kid);
+ _gst_value_array_append_and_take_value (dest, &kid);
}
if (!res)
* Multiplies the two #GValue items containing a #GST_TYPE_FRACTION and sets
* @product to the product of the two fractions.
*
- * Returns: FALSE in case of an error (like integer overflow), TRUE otherwise.
+ * Returns: %FALSE in case of an error (like integer overflow), %TRUE otherwise.
*/
gboolean
gst_value_fraction_multiply (GValue * product, const GValue * factor1,
*
* Subtracts the @subtrahend from the @minuend and sets @dest to the result.
*
- * Returns: FALSE in case of an error (like integer overflow), TRUE otherwise.
+ * Returns: %FALSE in case of an error (like integer overflow), %TRUE otherwise.
*/
gboolean
gst_value_fraction_subtract (GValue * dest,
/**
* gst_value_set_bitmask:
- * @value: a GValue initialized to #GST_TYPE_FRACTION
+ * @value: a GValue initialized to #GST_TYPE_BITMASK
* @bitmask: the bitmask
*
* Sets @value to the bitmask specified by @bitmask.
/**
* gst_value_get_bitmask:
- * @value: a GValue initialized to #GST_TYPE_FRACTION
+ * @value: a GValue initialized to #GST_TYPE_BITMASK
*
* Gets the bitmask specified by @value.
*
dest_value->data[0].v_uint64 = src_value->data[0].v_uint64;
}
-static gboolean
-gst_value_intersect_bitmask_bitmask (GValue * dest, const GValue * src1,
- const GValue * src2)
+static gint
+gst_value_compare_bitmask (const GValue * value1, const GValue * value2)
{
- guint64 s1, s2;
+ guint64 v1, v2;
- s1 = gst_value_get_bitmask (src1);
- s2 = gst_value_get_bitmask (src2);
+ v1 = value1->data[0].v_uint64;
+ v2 = value2->data[0].v_uint64;
- if (dest) {
- g_value_init (dest, GST_TYPE_BITMASK);
- gst_value_set_bitmask (dest, s1 & s2);
- }
+ if (v1 == v2)
+ return GST_VALUE_EQUAL;
- return TRUE;
+ return GST_VALUE_UNORDERED;
}
-static gboolean
-gst_value_union_bitmask_bitmask (GValue * dest, const GValue * src1,
- const GValue * src2)
+
+/***********************
+ * GstAllocationParams *
+ ***********************/
+static gint
+gst_value_compare_allocation_params (const GValue * value1,
+ const GValue * value2)
{
- guint64 s1, s2;
+ GstAllocationParams *v1, *v2;
- s1 = gst_value_get_bitmask (src1);
- s2 = gst_value_get_bitmask (src2);
+ v1 = value1->data[0].v_pointer;
+ v2 = value2->data[0].v_pointer;
- g_value_init (dest, GST_TYPE_BITMASK);
- gst_value_set_bitmask (dest, s1 | s2);
+ if (v1 == NULL && v1 == v2)
+ return GST_VALUE_EQUAL;
- return TRUE;
-}
+ if (v1 == NULL || v2 == NULL)
+ return GST_VALUE_UNORDERED;
-static gboolean
-gst_value_subtract_bitmask_bitmask (GValue * dest,
- const GValue * minuend, const GValue * subtrahend)
-{
- guint64 m, s, r;
+ if (v1->flags == v2->flags && v1->align == v2->align &&
+ v1->prefix == v2->prefix && v1->padding == v2->padding)
+ return GST_VALUE_EQUAL;
- g_return_val_if_fail (GST_VALUE_HOLDS_BITMASK (minuend), FALSE);
- g_return_val_if_fail (GST_VALUE_HOLDS_BITMASK (subtrahend), FALSE);
+ return GST_VALUE_UNORDERED;
+}
- m = minuend->data[0].v_uint64;
- s = subtrahend->data[0].v_uint64;
- r = m & (~s);
- if (dest) {
- g_value_init (dest, GST_TYPE_BITMASK);
- gst_value_set_bitmask (dest, r);
- }
- return (r != 0);
-}
+/************
+ * GObject *
+ ************/
static gint
-gst_value_compare_bitmask (const GValue * value1, const GValue * value2)
+gst_value_compare_object (const GValue * value1, const GValue * value2)
{
- guint64 v1, v2;
+ gpointer v1, v2;
- v1 = value1->data[0].v_uint64;
- v2 = value2->data[0].v_uint64;
+ v1 = value1->data[0].v_pointer;
+ v2 = value2->data[0].v_pointer;
if (v1 == v2)
return GST_VALUE_EQUAL;
{
static GstValueTable gst_value = {
0,
- NULL,
+ gst_value_compare_caps,
gst_value_serialize_caps,
gst_value_deserialize_caps,
};
static GstValueTable gst_value = {
0,
NULL,
+ gst_value_serialize_caps_features,
+ gst_value_deserialize_caps_features,
+ };
+
+ gst_value.type = GST_TYPE_CAPS_FEATURES;
+ gst_value_register (&gst_value);
+ }
+ {
+ static GstValueTable gst_value = {
+ 0,
+ NULL,
gst_value_serialize_tag_list,
gst_value_deserialize_tag_list,
};
gst_value_register (&gst_value);
}
+ {
+ static GstValueTable gst_value = {
+ 0,
+ gst_value_compare_allocation_params,
+ NULL,
+ NULL,
+ };
+
+ gst_value.type = gst_allocation_params_get_type ();
+ gst_value_register (&gst_value);
+ }
+
+ {
+ static GstValueTable gst_value = {
+ 0,
+ gst_value_compare_object,
+ NULL,
+ NULL,
+ };
+
+ gst_value.type = G_TYPE_OBJECT;
+ gst_value_register (&gst_value);
+ }
+
REGISTER_SERIALIZATION (G_TYPE_DOUBLE, double);
REGISTER_SERIALIZATION (G_TYPE_FLOAT, float);
gst_value_register_intersect_func (GST_TYPE_FRACTION_RANGE,
GST_TYPE_FRACTION_RANGE,
gst_value_intersect_fraction_range_fraction_range);
- gst_value_register_intersect_func (GST_TYPE_BITMASK,
- GST_TYPE_BITMASK, gst_value_intersect_bitmask_bitmask);
gst_value_register_subtract_func (G_TYPE_INT, GST_TYPE_INT_RANGE,
gst_value_subtract_int_int_range);
gst_value_register_subtract_func (GST_TYPE_FRACTION_RANGE,
GST_TYPE_FRACTION_RANGE,
gst_value_subtract_fraction_range_fraction_range);
- gst_value_register_subtract_func (GST_TYPE_BITMASK,
- GST_TYPE_BITMASK, gst_value_subtract_bitmask_bitmask);
/* see bug #317246, #64994, #65041 */
{
gst_value_union_int_int_range);
gst_value_register_union_func (GST_TYPE_INT_RANGE, GST_TYPE_INT_RANGE,
gst_value_union_int_range_int_range);
- gst_value_register_union_func (GST_TYPE_BITMASK,
- GST_TYPE_BITMASK, gst_value_union_bitmask_bitmask);
#if 0
/* Implement these if needed */