:right-sidebar: True ControlSource =================================================================== .. currentmodule:: gi.repository.Gst .. class:: ControlSource(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gst.Object`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` The :obj:`~gi.repository.Gst.ControlSource` is a base class for control value sources that could be used to get timestamp-value pairs. A control source essentially is a function over time. A :obj:`~gi.repository.Gst.ControlSource` is used by first getting an instance of a specific control-source, creating a binding for the control-source to the target property of the element and then adding the binding to the element. The binding will convert the data types and value range to fit to the bound property. For implementing a new :obj:`~gi.repository.Gst.ControlSource` one has to implement :obj:`~gi.repository.Gst.ControlSourceGetValue` and :obj:`~gi.repository.Gst.ControlSourceGetValueArray` functions. These are then used by :func:`~gi.repository.Gst.ControlSource.control_source_get_value` and :func:`~gi.repository.Gst.ControlSource.control_source_get_value_array` to get values for specific timestamps. Methods ------- .. rst-class:: interim-class .. class:: ControlSource :no-index: .. method:: control_source_get_value(timestamp: int) -> ~typing.Tuple[bool, float] Gets the value for this :obj:`~gi.repository.Gst.ControlSource` at a given timestamp. :param timestamp: the time for which the value should be returned .. method:: control_source_get_value_array(timestamp: int, interval: int, values: list[float]) -> bool Gets an array of values for for this :obj:`~gi.repository.Gst.ControlSource`\. Values that are undefined contain NANs. :param timestamp: the first timestamp :param interval: the time steps :param values: array to put control-values in Fields ------ .. rst-class:: interim-class .. class:: ControlSource :no-index: .. attribute:: get_value Function for returning a value for a given timestamp .. attribute:: get_value_array Function for returning a values array for a given timestamp .. attribute:: parent The parent structure