Table of Contents
The controller subsystem offers a lightweight way to adjust gobject
properties over stream-time. Normally these properties are changed using
g_object_set()
. Timing those calls reliably so that
the changes affect certain stream times is close to impossible. The
controller takes time into account. It works by attaching control-sources
to properties using control-bindings. Control-sources provide values for a
given time-stamp that are usually in the range of 0.0 to 1.0.
Control-bindings map the control-value to a gobject property they are bound to
- converting the type and scaling to the target property value range.
At run-time the elements continuously pull values changes for the current
stream-time to update the gobject properties. GStreamer includes a few
different control-sources and control-bindings already, but applications can
define their own by sub-classing from the respective base classes.
Most parts of the controller mechanism is implemented in GstObject. Also the
base classes for control-sources and control-bindings are included in the core
library. The existing implementations are contained within the
gstcontroller
library.
You need to include the header in your application's source file:
... #include <gst/gst.h> #include <gst/controller/gstinterpolationcontrolsource.h> #include <gst/controller/gstdirectcontrolbinding.h> ...
Your application should link to the shared library
gstreamer-controller
. One can get the required flag for
compiler and linker by using pkg-config for gstreamer-controller-1.0.