![]() |
![]() |
![]() |
GStreamer 1.0 Core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <gst/gst.h> struct GstControlBinding; struct GstControlBindingClass; gboolean gst_control_binding_sync_values (GstControlBinding *binding
,GstObject *object
,GstClockTime timestamp
,GstClockTime last_sync
); GValue * gst_control_binding_get_value (GstControlBinding *binding
,GstClockTime timestamp
); gboolean gst_control_binding_get_value_array (GstControlBinding *binding
,GstClockTime timestamp
,GstClockTime interval
,guint n_values
,gpointer values
); gboolean gst_control_binding_get_g_value_array (GstControlBinding *binding
,GstClockTime timestamp
,GstClockTime interval
,guint n_values
,GValue *values
); void gst_control_binding_set_disabled (GstControlBinding *binding
,gboolean disabled
); gboolean gst_control_binding_is_disabled (GstControlBinding *binding
);
"name" gchar* : Read / Write / Construct Only "object" GstObject* : Read / Write / Construct Only
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.
struct GstControlBinding { gchar *name; GParamSpec *pspec; };
The instance structure of GstControlBinding.
struct GstControlBindingClass { GstObjectClass parent_class; /* virtual methods */ 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.
GstObjectClass |
Parent class |
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.
|
the control binding |
|
the object that has controlled properties |
|
the time that should be processed |
|
the last time this was called |
Returns : |
TRUE if the controller value could be applied to the object
property, FALSE otherwise |
GValue * gst_control_binding_get_value (GstControlBinding *binding
,GstClockTime timestamp
);
Gets the value for the given controlled property at the requested time.
|
the control binding |
|
the time the control-change should be read from |
Returns : |
the GValue of the property at the given time, or NULL if the
property isn't controlled. |
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.
|
the control binding |
|
the time that should be processed |
|
the time spacing between subsequent values |
|
the number of values |
|
array to put control-values in |
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
);
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.
|
the control binding |
|
the time that should be processed |
|
the time spacing between subsequent values |
|
the number of values |
|
array to put control-values in |
Returns : |
TRUE if the given array could be filled, FALSE otherwise |
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.
|
the control binding |
|
boolean that specifies whether to disable the controller or not. |
gboolean gst_control_binding_is_disabled (GstControlBinding *binding
);
Check if the control binding is disabled.
|
the control binding |
Returns : |
TRUE if the binding is inactive |
"name"
property "name" gchar* : Read / Write / Construct Only
The name of the property.
Default value: NULL
"object"
property"object" GstObject* : Read / Write / Construct Only
The object of the property.