Gst.ControlSource

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.ControlSource Gst.ControlSource Gst.Object->Gst.ControlSource

Subclasses:

None

Methods

Inherited:

Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

control_source_get_value (timestamp)

control_source_get_value_array (timestamp, interval, values)

Virtual Methods

Inherited:

Gst.Object (1), GObject.Object (7)

Properties

Inherited:

Gst.Object (2)

Signals

Inherited:

Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

get_value

Gst.ControlSourceGetValue

r

Function for returning a value for a given timestamp

get_value_array

Gst.ControlSourceGetValueArray

r

Function for returning a values array for a given timestamp

parent

Gst.Object

r

the parent structure

Class Details

class Gst.ControlSource(**kwargs)
Bases:

Gst.Object

Abstract:

Yes

Structure:

Gst.ControlSourceClass

The 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 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 Gst.ControlSource one has to implement Gst.ControlSourceGetValue and Gst.ControlSourceGetValueArray functions. These are then used by Gst.ControlSource.control_source_get_value() and Gst.ControlSource.control_source_get_value_array() to get values for specific timestamps.

control_source_get_value(timestamp)[source]
Parameters:

timestamp (int) – the time for which the value should be returned

Returns:

False if the value couldn’t be returned, True otherwise.

value:

the value

Return type:

(bool, value: float)

Gets the value for this Gst.ControlSource at a given timestamp.

control_source_get_value_array(timestamp, interval, values)[source]
Parameters:
  • timestamp (int) – the first timestamp

  • interval (int) – the time steps

  • values ([float]) – array to put control-values in

Returns:

True if the given array could be filled, False otherwise

Return type:

bool

Gets an array of values for for this Gst.ControlSource. Values that are undefined contain NANs.