|GStreamer Application Development Manual (0.10.14)|
|Prev||Chapter 15. Dynamic Controllable Parameters||Next|
The first step is to select the parameters that should be controlled. This returns a controller object that is needed to further adjust the behaviour.
controller = gst_object_control_properties(object, "prop1", "prop2",...);
Next we can select an interpolation mode. This mode controls how inbetween values are determined. The controller subsystem can e.g. fill gaps by smoothing parameter changes. Each controllable GObject property can be interpolated differently.
Finally one needs to set control points. These are time-stamped GValues. The values become active when the timestamp is reached. They still stay in the list. If e.g. the pipeline runs a loop (using a segmented seek), the control-curve gets repeated as well.
gst_controller_set (controller, "prop1" ,0 * GST_SECOND, value1); gst_controller_set (controller, "prop1" ,1 * GST_SECOND, value2);
The controller subsystem has a builtin live-mode. Even though a parameter
has timestamped control-values assigned one can change the GObject
This is highly useful when binding the GObject properties to GUI widgets.
When the user adjusts the value with the widget, one can set the GOBject
property and this remains active until the next timestamped value overrides.
This also works with smoothed parameters.