g_array_set_size (dest, src->len);
for (i = 0; i < src->len; i++) {
gst_value_init_and_copy (&g_array_index (dest, GValue, i),
- &g_array_index (src, GValue, i));
+ &g_array_index (src, GValue, i));
}
return dest;
value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
} else {
value->data[0].v_pointer =
- gst_value_list_array_copy ((GArray *) collect_values[0].v_pointer);
+ gst_value_list_array_copy ((GArray *) collect_values[0].v_pointer);
}
return NULL;
}
if (!dest)
return g_strdup_printf ("value location for `%s' passed as NULL",
- G_VALUE_TYPE_NAME (value));
+ G_VALUE_TYPE_NAME (value));
if (!value->data[0].v_pointer)
return g_strdup_printf ("invalid value given for `%s'",
- G_VALUE_TYPE_NAME (value));
+ G_VALUE_TYPE_NAME (value));
if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
*dest = (GArray *) value->data[0].v_pointer;
} else {
if (GST_VALUE_HOLDS_LIST (value1)) {
for (i = 0; i < value1_length; i++) {
gst_value_init_and_copy (&g_array_index (array, GValue, i),
- gst_value_list_get_value (value1, i));
+ gst_value_list_get_value (value1, i));
}
} else {
gst_value_init_and_copy (&g_array_index (array, GValue, 0), value1);
if (GST_VALUE_HOLDS_LIST (value2)) {
for (i = 0; i < value2_length; i++) {
gst_value_init_and_copy (&g_array_index (array, GValue,
- i + value1_length), gst_value_list_get_value (value2, i));
+ i + value1_length), gst_value_list_get_value (value2, i));
}
} else {
gst_value_init_and_copy (&g_array_index (array, GValue, value1_length),
- value2);
+ value2);
}
}
for (j = 0; j < array1->len; j++) {
v2 = &g_array_index (array2, GValue, j);
if (gst_value_compare (v1, v2) == GST_VALUE_EQUAL)
- break;
+ break;
}
if (j == array1->len) {
return GST_VALUE_UNORDERED;
if (!fourcc_p)
return g_strdup_printf ("value location for `%s' passed as NULL",
- G_VALUE_TYPE_NAME (value));
+ G_VALUE_TYPE_NAME (value));
*fourcc_p = value->data[0].v_int;
g_ascii_isprint ((fourcc >> 16) & 0xff) &&
g_ascii_isprint ((fourcc >> 24) & 0xff)) {
dest_value->data[0].v_pointer =
- g_strdup_printf (GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
+ g_strdup_printf (GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
} else {
dest_value->data[0].v_pointer = g_strdup_printf ("0x%08x", fourcc);
}
if (!int_range_start)
return g_strdup_printf ("start value location for `%s' passed as NULL",
- G_VALUE_TYPE_NAME (value));
+ G_VALUE_TYPE_NAME (value));
if (!int_range_end)
return g_strdup_printf ("end value location for `%s' passed as NULL",
- G_VALUE_TYPE_NAME (value));
+ G_VALUE_TYPE_NAME (value));
*int_range_start = value->data[0].v_int;
*int_range_end = value->data[1].v_int;
if (!double_range_start)
return g_strdup_printf ("start value location for `%s' passed as NULL",
- G_VALUE_TYPE_NAME (value));
+ G_VALUE_TYPE_NAME (value));
if (!double_range_end)
return g_strdup_printf ("end value location for `%s' passed as NULL",
- G_VALUE_TYPE_NAME (value));
+ G_VALUE_TYPE_NAME (value));
*double_range_start = value->data[0].v_double;
*double_range_end = value->data[1].v_double;
dest_value->data[0].v_pointer = g_strdup_printf ("[%s,%s]",
g_ascii_dtostr (s1, G_ASCII_DTOSTR_BUF_SIZE,
- src_value->data[0].v_double),
+ src_value->data[0].v_double),
g_ascii_dtostr (s2, G_ASCII_DTOSTR_BUF_SIZE,
- src_value->data[1].v_double));
+ src_value->data[1].v_double));
}
static int
if (gst_value_intersect (&intersection, cur, value2)) {
/* append value */
if (!ret) {
- gst_value_init_and_copy (dest, &intersection);
- ret = TRUE;
+ gst_value_init_and_copy (dest, &intersection);
+ ret = TRUE;
} else if (GST_VALUE_HOLDS_LIST (dest)) {
- gst_value_list_append_value (dest, &intersection);
+ gst_value_list_append_value (dest, &intersection);
} else {
- GValue temp = { 0, };
+ GValue temp = { 0, };
- gst_value_init_and_copy (&temp, dest);
- g_value_unset (dest);
- gst_value_list_concat (dest, &temp, &intersection);
+ gst_value_init_and_copy (&temp, dest);
+ g_value_unset (dest);
+ gst_value_list_concat (dest, &temp, &intersection);
}
g_value_unset (&intersection);
}
for (i = 0; i < gst_value_union_funcs->len; i++) {
union_info = &g_array_index (gst_value_union_funcs, GstValueUnionInfo, i);
if (union_info->type1 == G_VALUE_TYPE (value1) &&
- union_info->type2 == G_VALUE_TYPE (value2))
+ union_info->type2 == G_VALUE_TYPE (value2))
return TRUE;
}
for (i = 0; i < gst_value_union_funcs->len; i++) {
union_info = &g_array_index (gst_value_union_funcs, GstValueUnionInfo, i);
if (union_info->type1 == G_VALUE_TYPE (value1) &&
- union_info->type2 == G_VALUE_TYPE (value2)) {
+ union_info->type2 == G_VALUE_TYPE (value2)) {
return union_info->func (dest, value1, value2);
}
}
for (i = 0; i < gst_value_intersect_funcs->len; i++) {
intersect_info = &g_array_index (gst_value_intersect_funcs,
- GstValueIntersectInfo, i);
+ GstValueIntersectInfo, i);
if (intersect_info->type1 == G_VALUE_TYPE (value1) &&
- intersect_info->type2 == G_VALUE_TYPE (value2))
+ intersect_info->type2 == G_VALUE_TYPE (value2))
return TRUE;
}
for (i = 0; i < gst_value_intersect_funcs->len; i++) {
intersect_info = &g_array_index (gst_value_intersect_funcs,
- GstValueIntersectInfo, i);
+ GstValueIntersectInfo, i);
if (intersect_info->type1 == G_VALUE_TYPE (value1) &&
- intersect_info->type2 == G_VALUE_TYPE (value2)) {
+ intersect_info->type2 == G_VALUE_TYPE (value2)) {
ret = intersect_info->func (dest, value1, value2);
return ret;
}
if (intersect_info->type1 == G_VALUE_TYPE (value2) &&
- intersect_info->type2 == G_VALUE_TYPE (value1)) {
+ intersect_info->type2 == G_VALUE_TYPE (value1)) {
ret = intersect_info->func (dest, value2, value1);
return ret;
}
NULL,
NULL,
};
+
//const GTypeFundamentalInfo finfo = { G_TYPE_FLAG_DERIVABLE, };
gst_value_table = g_array_new (FALSE, FALSE, sizeof (GstValueTable));
gst_value_serialize_fourcc,
gst_value_deserialize_fourcc,
};
+
info.value_table = &value_table;
gst_type_fourcc =
- g_type_register_static (G_TYPE_BOXED, "GstFourcc", &info, 0);
+ g_type_register_static (G_TYPE_BOXED, "GstFourcc", &info, 0);
gst_value.type = gst_type_fourcc;
gst_value_register (&gst_value);
}
gst_value_serialize_int_range,
gst_value_deserialize_int_range,
};
+
info.value_table = &value_table;
gst_type_int_range =
- g_type_register_static (G_TYPE_BOXED, "GstIntRange", &info, 0);
+ g_type_register_static (G_TYPE_BOXED, "GstIntRange", &info, 0);
gst_value.type = gst_type_int_range;
gst_value_register (&gst_value);
}
gst_value_serialize_double_range,
gst_value_deserialize_double_range,
};
+
info.value_table = &value_table;
gst_type_double_range =
- g_type_register_static (G_TYPE_BOXED, "GstDoubleRange", &info, 0);
+ g_type_register_static (G_TYPE_BOXED, "GstDoubleRange", &info, 0);
gst_value.type = gst_type_double_range;
gst_value_register (&gst_value);
}
gst_value_serialize_list,
gst_value_deserialize_list,
};
+
info.value_table = &value_table;
gst_type_list =
- g_type_register_static (G_TYPE_BOXED, "GstValueList", &info, 0);
+ g_type_register_static (G_TYPE_BOXED, "GstValueList", &info, 0);
gst_value.type = gst_type_list;
gst_value_register (&gst_value);
}
gst_value_serialize_int,
gst_value_deserialize_int,
};
+
gst_value_register (&gst_value);
}
gst_value_serialize_double,
gst_value_deserialize_double,
};
+
gst_value_register (&gst_value);
}
gst_value_serialize_string,
gst_value_deserialize_string,
};
+
gst_value_register (&gst_value);
}
gst_value_serialize_boolean,
gst_value_deserialize_boolean,
};
+
gst_value_register (&gst_value);
}