Top |
Description
A base class for value mapping objects that attaches control sources to gobject properties. Such an object is taking one or more GstControlSource instances, combines them and maps the resulting value to the type and value range of the bound property.
Functions
gst_control_binding_sync_values ()
gboolean gst_control_binding_sync_values (GstControlBinding *binding
,GstObject *object
,GstClockTime timestamp
,GstClockTime last_sync
);
Sets the property of the object
, according to the GstControlSources that
handle them and for the given timestamp.
If this function fails, it is most likely the application developers fault. Most probably the control sources are not setup correctly.
gst_control_binding_get_value ()
GValue * gst_control_binding_get_value (GstControlBinding *binding
,GstClockTime timestamp
);
Gets the value for the given controlled property at the requested time.
Returns
the GValue of the property at the given time,
or NULL
if the property isn't controlled.
[nullable]
gst_control_binding_get_value_array ()
gboolean gst_control_binding_get_value_array (GstControlBinding *binding
,GstClockTime timestamp
,GstClockTime interval
,guint n_values
,gpointer values
);
Gets a number of values for the given controlled property starting at the
requested time. The array values
need to hold enough space for n_values
of
the same type as the objects property's type.
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.
The values are unboxed and ready to be used. The similar function
gst_control_binding_get_g_value_array()
returns the array as GValues and is
more suitable for bindings.
[skip]
gst_control_binding_get_g_value_array ()
gboolean gst_control_binding_get_g_value_array (GstControlBinding *binding
,GstClockTime timestamp
,GstClockTime interval
,guint n_values
,GValue *values
);
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.
gst_control_binding_set_disabled ()
void gst_control_binding_set_disabled (GstControlBinding *binding
,gboolean disabled
);
This function is used to disable a control binding for some time, i.e.
gst_object_sync_values()
will do nothing.
gst_control_binding_is_disabled ()
gboolean
gst_control_binding_is_disabled (GstControlBinding *binding
);
Check if the control binding is disabled.
Types and Values
struct GstControlBinding
struct GstControlBinding { gchar *name; GParamSpec *pspec; };
The instance structure of GstControlBinding.
Members
gchar * |
name of the property of this binding |
|
GParamSpec * |
GParamSpec for this property |
struct GstControlBindingClass
struct GstControlBindingClass { GstObjectClass parent_class; gboolean (* sync_values) (GstControlBinding *binding, GstObject *object, GstClockTime timestamp, GstClockTime last_sync); GValue * (* get_value) (GstControlBinding *binding, GstClockTime timestamp); gboolean (* get_value_array) (GstControlBinding *binding, GstClockTime timestamp,GstClockTime interval, guint n_values, gpointer values); gboolean (* get_g_value_array) (GstControlBinding *binding, GstClockTime timestamp,GstClockTime interval, guint n_values, GValue *values); };
The class structure of GstControlBinding.