Gst.ControlBinding

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

Subclasses:None

Methods

Inherited:Gst.Object (27), GObject.Object (37)
Structs:GObject.ObjectClass (5)
  get_g_value_array (timestamp, interval, values)
  get_value (timestamp)
  is_disabled ()
  set_disabled (disabled)
  sync_values (object, timestamp, last_sync)

Virtual Methods

Inherited:Gst.Object (1), GObject.Object (7)
  do_get_g_value_array (timestamp, interval, values)
  do_get_value (timestamp)
  do_sync_values (object, timestamp, last_sync)

Properties

Inherited:Gst.Object (2)
Name Type Flags Short Description
object Gst.Object r/w/co The object of the property

Fields

Inherited:Gst.Object (1), GObject.Object (1)
Name Type Access Description
disabled bool r  
name str r name of the property of this binding
object Gst.Object r  
parent Gst.Object r  
pspec GObject.ParamSpec r GObject.ParamSpec for this property

Class Details

class Gst.ControlBinding(**kwargs)
Bases:Gst.Object
Abstract:Yes
Structure:Gst.ControlBindingClass

A base class for value mapping objects that attaches control sources to gobject properties. Such an object is taking one or more Gst.ControlSource instances, combines them and maps the resulting value to the type and value range of the bound property.

get_g_value_array(timestamp, interval, values)[source]
Parameters:
  • timestamp (int) – the time that should be processed
  • interval (int) – the time spacing between subsequent values
  • values ([GObject.Value]) – array to put control-values in
Returns:

True if the given array could be filled, False otherwise

Return type:

bool

Gets a number of GObject.Values for the given controlled property starting at the requested time. The array values need to hold enough space for n_values of GObject.Value.

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.

get_value(timestamp)[source]
Parameters:timestamp (int) – the time the control-change should be read from
Returns:the GObject.Value of the property at the given time, or None if the property isn’t controlled.
Return type:GObject.Value or None

Gets the value for the given controlled property at the requested time.

is_disabled()[source]
Returns:True if the binding is inactive
Return type:bool

Check if the control binding is disabled.

set_disabled(disabled)[source]
Parameters:disabled (bool) – boolean that specifies whether to disable the controller or not.

This function is used to disable a control binding for some time, i.e. Gst.Object.sync_values() will do nothing.

sync_values(object, timestamp, last_sync)[source]
Parameters:
  • object (Gst.Object) – the object that has controlled properties
  • timestamp (int) – the time that should be processed
  • last_sync (int) – the last time this was called
Returns:

True if the controller value could be applied to the object property, False otherwise

Return type:

bool

Sets the property of the object, according to the Gst.ControlSources 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.

do_get_g_value_array(timestamp, interval, values) virtual
Parameters:
  • timestamp (int) – the time that should be processed
  • interval (int) – the time spacing between subsequent values
  • values ([GObject.Value]) – array to put control-values in
Returns:

True if the given array could be filled, False otherwise

Return type:

bool

Gets a number of GObject.Values for the given controlled property starting at the requested time. The array values need to hold enough space for n_values of GObject.Value.

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.

do_get_value(timestamp) virtual
Parameters:timestamp (int) – the time the control-change should be read from
Returns:the GObject.Value of the property at the given time, or None if the property isn’t controlled.
Return type:GObject.Value or None

Gets the value for the given controlled property at the requested time.

do_sync_values(object, timestamp, last_sync) virtual
Parameters:
  • object (Gst.Object) – the object that has controlled properties
  • timestamp (int) – the time that should be processed
  • last_sync (int) – the last time this was called
Returns:

True if the controller value could be applied to the object property, False otherwise

Return type:

bool

Sets the property of the object, according to the Gst.ControlSources 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.

Property Details

Gst.ControlBinding.props.object
Name:object
Type:Gst.Object
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The object of the property