GstControlBinding

GstControlBinding — attachment for control source sources

Functions

Properties

gchar * name Read / Write / Construct Only
GstObject * object Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstControlBinding

Includes

#include <gst/gst.h>

Description

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.

Functions

gst_control_binding_sync_values ()

gboolean
gst_control_binding_sync_values (GstControlBinding *binding,
                                 GstObject *object,
                                 GstClockTime timestamp,
                                 GstClockTime last_sync);

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

Parameters

binding

the control binding

 

object

the object that has controlled properties

 

timestamp

the time that should be processed

 

last_sync

the last time this was called

 

Returns

TRUE if the controller value could be applied to the object property, FALSE otherwise


gst_control_binding_get_value ()

GValue *
gst_control_binding_get_value (GstControlBinding *binding,
                               GstClockTime timestamp);

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

Parameters

binding

the control binding

 

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.


gst_control_binding_get_value_array ()

gboolean
gst_control_binding_get_value_array (GstControlBinding *binding,
                                     GstClockTime timestamp,
                                     GstClockTime interval,
                                     guint n_values,
                                     gpointer values);

Gets a number of values for the given controlled property starting at the requested time. The array values need to hold enough space for n_values 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

binding

the control binding

 

timestamp

the time that should be processed

 

interval

the time spacing between subsequent values

 

n_values

the number of values

 

values

array to put control-values in

 

Returns

TRUE if the given array could be filled, FALSE otherwise


gst_control_binding_get_g_value_array ()

gboolean
gst_control_binding_get_g_value_array (GstControlBinding *binding,
                                       GstClockTime timestamp,
                                       GstClockTime interval,
                                       guint n_values,
                                       GValue *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 n_values 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

binding

the control binding

 

timestamp

the time that should be processed

 

interval

the time spacing between subsequent values

 

n_values

the number of values

 

values

array to put control-values in

 

Returns

TRUE if the given array could be filled, FALSE otherwise


gst_control_binding_set_disabled ()

void
gst_control_binding_set_disabled (GstControlBinding *binding,
                                  gboolean disabled);

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

Parameters

binding

the control binding

 

disabled

boolean that specifies whether to disable the controller or not.

 

gst_control_binding_is_disabled ()

gboolean
gst_control_binding_is_disabled (GstControlBinding *binding);

Check if the control binding is disabled.

Parameters

binding

the control binding

 

Returns

TRUE if the binding is inactive

Types and Values

struct GstControlBinding

struct GstControlBinding {
  gchar *name;
  GParamSpec *pspec;
};

The instance structure of GstControlBinding.

Members

gchar *name;

name of the property of this binding

 

GParamSpec *pspec;

GParamSpec for this property

 

struct GstControlBindingClass

struct GstControlBindingClass {
  GstObjectClass parent_class;

  /* virtual methods */
  gboolean (* sync_values) (GstControlBinding *binding, GstObject *object, GstClockTime timestamp, GstClockTime last_sync);
  GValue * (* get_value) (GstControlBinding *binding, GstClockTime timestamp);
  gboolean (* get_value_array) (GstControlBinding *binding, GstClockTime timestamp,GstClockTime interval, guint n_values, gpointer values);
  gboolean (* get_g_value_array) (GstControlBinding *binding, GstClockTime timestamp,GstClockTime interval, guint n_values, GValue *values);
};

The class structure of GstControlBinding.

Members

GstObjectClass parent_class;

Parent class

 

sync_values ()

   

get_value ()

   

get_value_array ()

   

get_g_value_array ()

   

Property Details

The “name” property

  “name”                     gchar *

The name of the property.

Flags: Read / Write / Construct Only

Default value: NULL


The “object” property

  “object”                   GstObject *

The object of the property.

Flags: Read / Write / Construct Only