summaryrefslogtreecommitdiff
path: root/gst/gstcontrolsource.c
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2011-12-22 23:48:30 +0100
committerStefan Sauer <ensonic@users.sf.net>2011-12-25 20:48:14 +0100
commit39d6b7462f44b4eb55b46ee17ff5e5c7a3d77e5f (patch)
treec1119ba95ceb4e6b2b84881118a0e54c0384b462 /gst/gstcontrolsource.c
parenta80401b22c6f8693e733767aec3086296ac6ed05 (diff)
downloadgstreamer-39d6b7462f44b4eb55b46ee17ff5e5c7a3d77e5f.tar.gz
controller: move GValue handling from control-sources to -binding
ControlSources are now gdouble based. A control source is mapped to a particullar GObject property using a ControlBinding.
Diffstat (limited to 'gst/gstcontrolsource.c')
-rw-r--r--gst/gstcontrolsource.c52
1 files changed, 6 insertions, 46 deletions
diff --git a/gst/gstcontrolsource.c b/gst/gstcontrolsource.c
index 85f242d5fc..a2b116120c 100644
--- a/gst/gstcontrolsource.c
+++ b/gst/gstcontrolsource.c
@@ -61,10 +61,6 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstControlSource, gst_control_source,
static void
gst_control_source_class_init (GstControlSourceClass * klass)
{
- //GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
- /* Has to be implemented by children */
- klass->bind = NULL;
}
static void
@@ -72,7 +68,6 @@ gst_control_source_init (GstControlSource * self)
{
self->get_value = NULL;
self->get_value_array = NULL;
- self->bound = FALSE;
}
/**
@@ -87,7 +82,7 @@ gst_control_source_init (GstControlSource * self)
*/
gboolean
gst_control_source_get_value (GstControlSource * self, GstClockTime timestamp,
- GValue * value)
+ gdouble * value)
{
g_return_val_if_fail (GST_IS_CONTROL_SOURCE (self), FALSE);
@@ -102,23 +97,19 @@ gst_control_source_get_value (GstControlSource * self, GstClockTime timestamp,
/**
* gst_control_source_get_value_array:
* @self: the #GstControlSource object
- * @timestamp: the time that should be processed
+ * @timestamp: the first timestamp
+ * @interval: the time steps
+ * @n_values: the number of values to fetch
* @value_array: array to put control-values in
*
- * Gets an array of values for one element property.
- *
- * All fields of @value_array must be filled correctly. Especially the
- * @value_array->values array must be big enough to keep the requested amount
- * of values.
- *
- * The type of the values in the array is the same as the property's type.
+ * Gets an array of values for for this #GstControlSource.
*
* Returns: %TRUE if the given array could be filled, %FALSE otherwise
*/
gboolean
gst_control_source_get_value_array (GstControlSource * self,
GstClockTime timestamp, GstClockTime interval, guint n_values,
- gpointer values)
+ gdouble * values)
{
g_return_val_if_fail (GST_IS_CONTROL_SOURCE (self), FALSE);
@@ -129,34 +120,3 @@ gst_control_source_get_value_array (GstControlSource * self,
return FALSE;
}
}
-
-/**
- * gst_control_source_bind:
- * @self: the #GstControlSource object
- * @pspec: #GParamSpec for the property for which this #GstControlSource should generate values.
- *
- * Binds a #GstControlSource to a specific property. This must be called only once for a
- * #GstControlSource.
- *
- * Returns: %TRUE if the #GstControlSource was bound correctly, %FALSE otherwise.
- */
-gboolean
-gst_control_source_bind (GstControlSource * self, GParamSpec * pspec)
-{
- gboolean ret = FALSE;
-
- g_return_val_if_fail (GST_IS_CONTROL_SOURCE (self), FALSE);
- g_return_val_if_fail (GST_CONTROL_SOURCE_GET_CLASS (self)->bind, FALSE);
- g_return_val_if_fail (!self->bound, FALSE);
-
- ret = GST_CONTROL_SOURCE_GET_CLASS (self)->bind (self, pspec);
-
- if (ret) {
- GST_DEBUG ("bound control source for param %s", pspec->name);
- self->bound = TRUE;
- } else {
- GST_DEBUG ("failed to bind control source for param %s", pspec->name);
- }
-
- return ret;
-}