Class ControlBinding

All Implemented Interfaces:
Proxy
Direct Known Subclasses:
ControlBinding.ControlBinding$Impl

@Generated("org.javagi.JavaGI") public abstract class ControlBinding extends GstObject
A base class for value mapping objects that attaches control sources to GObject properties. Such an object is taking one or more GstControlSource instances, combines them and maps the resulting value to the type and value range of the bound property.
  • Constructor Details

    • ControlBinding

      public ControlBinding(MemorySegment address)
      Create a ControlBinding instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ControlBinding

      public ControlBinding()
      Create a new ControlBinding.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the ControlBinding class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected ControlBinding asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GstObject
      Returns:
      the instance as if it were its parent type
    • getGValueArray

      public boolean getGValueArray(ClockTime timestamp, ClockTime interval, @Nullable Value @Nullable [] values)

      Gets a number of GValues for the given controlled property starting at the requested time. The array values need to hold enough space for nValues of GValue.

      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.

      Parameters:
      timestamp - the time that should be processed
      interval - the time spacing between subsequent values
      values - array to put control-values in
      Returns:
      true if the given array could be filled, false otherwise
    • getValue

      public @Nullable Value getValue(ClockTime timestamp)
      Gets the value for the given controlled property at the requested time.
      Parameters:
      timestamp - the time the control-change should be read from
      Returns:
      the GValue of the property at the given time, or null if the property isn't controlled.
    • getValueArray

      public boolean getValueArray(ClockTime timestamp, ClockTime interval, @Nullable MemorySegment @Nullable [] values)

      Gets a number of values for the given controlled property starting at the requested time. The array values needs to hold enough space for nValues of the same type as the objects property's type.

      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.

      The values are unboxed and ready to be used. The similar function gst_control_binding_get_g_value_array() returns the array as GValues and is more suitable for bindings.

      Parameters:
      timestamp - the time that should be processed
      interval - the time spacing between subsequent values
      values - array to put control-values in
      Returns:
      true if the given array could be filled, false otherwise
    • isDisabled

      public boolean isDisabled()
      Checks if the control binding is disabled.
      Returns:
      true if the binding is inactive
    • setDisabled

      public void setDisabled(boolean disabled)
      This function is used to disable a control binding for some time, i.e. gst_object_sync_values() will do nothing.
      Parameters:
      disabled - boolean that specifies whether to disable the controller or not.
    • syncValues

      public boolean syncValues(GstObject object, ClockTime timestamp, ClockTime lastSync)

      Sets the property of the object, according to the GstControlSources that handles it 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.

      Parameters:
      object - the object that has controlled properties
      timestamp - the time that should be processed
      lastSync - the last time this was called
      Returns:
      true if the controller value could be applied to the object property, false otherwise