/* estimate minimum string length to minimise re-allocs in GString */
s = g_string_sized_new (2 + (6 * alen) + 2);
/* estimate minimum string length to minimise re-allocs in GString */
s = g_string_sized_new (2 + (6 * alen) + 2);
GstStructure *structure1 = GST_STRUCTURE (g_value_get_boxed (value1));
GstStructure *structure2 = GST_STRUCTURE (g_value_get_boxed (value2));
GstStructure *structure1 = GST_STRUCTURE (g_value_get_boxed (value1));
GstStructure *structure2 = GST_STRUCTURE (g_value_get_boxed (value2));
/* These initial sizes are used for the tables
* below, and save a couple of reallocs at startup */
/* These initial sizes are used for the tables
* below, and save a couple of reallocs at startup */
-static const gint GST_VALUE_TABLE_DEFAULT_SIZE = 35;
-static const gint GST_VALUE_UNION_TABLE_DEFAULT_SIZE = 4;
-static const gint GST_VALUE_INTERSECT_TABLE_DEFAULT_SIZE = 11;
-static const gint GST_VALUE_SUBTRACT_TABLE_DEFAULT_SIZE = 12;
+static const gint GST_VALUE_TABLE_DEFAULT_SIZE = 40;
+static const gint GST_VALUE_UNION_TABLE_DEFAULT_SIZE = 8;
+static const gint GST_VALUE_INTERSECT_TABLE_DEFAULT_SIZE = 16;
+static const gint GST_VALUE_SUBTRACT_TABLE_DEFAULT_SIZE = 16;
#if GST_VERSION_NANO == 1
/* If building from git master, check starting array sizes matched actual size
* so we can keep the defines in sync and save a few reallocs on startup */
#if GST_VERSION_NANO == 1
/* If building from git master, check starting array sizes matched actual size
* so we can keep the defines in sync and save a few reallocs on startup */
GST_ERROR ("Wrong initial gst_value_table size. "
"Please set GST_VALUE_TABLE_DEFAULT_SIZE to %u in gstvalue.c",
gst_value_table->len);
}
GST_ERROR ("Wrong initial gst_value_table size. "
"Please set GST_VALUE_TABLE_DEFAULT_SIZE to %u in gstvalue.c",
gst_value_table->len);
}
GST_ERROR ("Wrong initial gst_value_union_funcs table size. "
"Please set GST_VALUE_UNION_TABLE_DEFAULT_SIZE to %u in gstvalue.c",
gst_value_union_funcs->len);
}
GST_ERROR ("Wrong initial gst_value_union_funcs table size. "
"Please set GST_VALUE_UNION_TABLE_DEFAULT_SIZE to %u in gstvalue.c",
gst_value_union_funcs->len);
}
GST_ERROR ("Wrong initial gst_value_intersect_funcs table size. "
"Please set GST_VALUE_INTERSECT_TABLE_DEFAULT_SIZE to %u in gstvalue.c",
gst_value_intersect_funcs->len);
}
GST_ERROR ("Wrong initial gst_value_intersect_funcs table size. "
"Please set GST_VALUE_INTERSECT_TABLE_DEFAULT_SIZE to %u in gstvalue.c",
gst_value_intersect_funcs->len);
}
GST_ERROR ("Wrong initial gst_value_subtract_funcs table size. "
"Please set GST_VALUE_SUBTRACT_TABLE_DEFAULT_SIZE to %u in gstvalue.c",
gst_value_subtract_funcs->len);
GST_ERROR ("Wrong initial gst_value_subtract_funcs table size. "
"Please set GST_VALUE_SUBTRACT_TABLE_DEFAULT_SIZE to %u in gstvalue.c",
gst_value_subtract_funcs->len);