+ ret =
+ klass->get_value_array (binding, timestamp, interval, n_values, values);
+ } else {
+ GST_WARNING_OBJECT (binding, "missing get_value_array implementation");
+ }
+ return ret;
+}
+
+#define CONVERT_ARRAY(type,TYPE) \
+{ \
+ g##type *v = g_new (g##type,n_values); \
+ ret = gst_control_binding_get_value_array (binding, timestamp, interval, \
+ n_values, v); \
+ if (ret) { \
+ for (i = 0; i < n_values; i++) { \
+ g_value_init (&values[i], G_TYPE_##TYPE); \
+ g_value_set_##type (&values[i], v[i]); \
+ } \
+ } \
+ g_free (v); \
+}
+
+/**
+ * gst_control_binding_get_g_value_array:
+ * @binding: the control binding
+ * @timestamp: the time that should be processed
+ * @interval: the time spacing between subsequent values
+ * @n_values: the number of values
+ * @values: (array length=n_values): array to put control-values in
+ *
+ * Gets a number of #GValues for the given controlled property starting at the
+ * requested time. The array @values need to hold enough space for @n_values of
+ * #GValue.
+ *
+ * This function is useful if one wants to e.g. draw a graph of the control
+ * curve or apply a control curve sample by sample.
+ *
+ * Returns: %TRUE if the given array could be filled, %FALSE otherwise
+ */
+gboolean
+gst_control_binding_get_g_value_array (GstControlBinding * binding,
+ GstClockTime timestamp, GstClockTime interval, guint n_values,
+ GValue * values)
+{
+ GstControlBindingClass *klass;
+ gboolean ret = FALSE;
+
+ g_return_val_if_fail (GST_IS_CONTROL_BINDING (binding), FALSE);
+ g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), FALSE);
+ g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (interval), FALSE);
+ g_return_val_if_fail (values, FALSE);
+
+ klass = GST_CONTROL_BINDING_GET_CLASS (binding);
+
+ if (G_LIKELY (klass->get_g_value_array != NULL)) {
+ ret =
+ klass->get_g_value_array (binding, timestamp, interval, n_values,
+ values);