GstTimedValueControlSource

## GstTimedValueControlSource GstTimedValueControlSource — timed value control source base class |

## Synopsis

    #include <libs/controller/gsttimedvaluecontrolsource.h>

    struct              GstTimedValueControlSource;
    GSequenceIter *     gst_timed_value_control_source_find_control_point_iter
                                                            (GstTimedValueControlSource *self,
                                                             GstClockTime timestamp);
    gboolean            gst_timed_value_control_source_set  (GstTimedValueControlSource *self,
                                                             GstClockTime timestamp,
                                                             const gdouble value);
    gboolean            gst_timed_value_control_source_set_from_list
                                                            (GstTimedValueControlSource *self,
                                                             const GSList *timedvalues);
    GList *             gst_timed_value_control_source_get_all
                                                            (GstTimedValueControlSource *self);
    gboolean            gst_timed_value_control_source_unset
                                                            (GstTimedValueControlSource *self,
                                                             GstClockTime timestamp);
    void                gst_timed_value_control_source_unset_all
                                                            (GstTimedValueControlSource *self);
    gint                gst_timed_value_control_source_get_count
                                                            (GstTimedValueControlSource *self);
    void                gst_timed_value_control_invalidate_cache
                                                            (GstTimedValueControlSource *self);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GstObject
                   +----GstControlSource
                         +----GstTimedValueControlSource
                               +----GstInterpolationControlSource
                               +----GstTriggerControlSource

## Description

Base class for GstContrlSources that use time-stamped values.

When overriding bind, chain up first to give this bind implementation a chance to setup things.

All functions are MT-safe.

## Details

### struct GstTimedValueControlSource

    struct GstTimedValueControlSource;

The instance structure of GstControlSource.

### gst_timed_value_control_source_find_control_point_iter ()

    GSequenceIter *     gst_timed_value_control_source_find_control_point_iter
                                                            (GstTimedValueControlSource *self,
                                                             GstClockTime timestamp);

Find last value before given timestamp in control point list. If all values in the control point list come after the given timestamp or no values exist, `NULL` is returned.

For use in control source implementations.

`self` : | the control source to search in
`timestamp` : | the search key
Returns : | the found GSequenceIter or `NULL`

### gst_timed_value_control_source_set ()

    gboolean            gst_timed_value_control_source_set  (GstTimedValueControlSource *self,
                                                             GstClockTime timestamp,
                                                             const gdouble value);

Set the value of given controller-handled property at a certain time.

`self` : | the GstTimedValueControlSource object
`timestamp` : | the time the control-change is scheduled for
`value` : | the control-value
Returns : | FALSE if the values couldn't be set, TRUE otherwise.

### gst_timed_value_control_source_set_from_list ()

    gboolean            gst_timed_value_control_source_set_from_list
                                                            (GstTimedValueControlSource *self,
                                                             const GSList *timedvalues);

Sets multiple timed values at once.

`self` : | the GstTimedValueControlSource object
`timedvalues` : | a list with GstTimedValue items. [transfer none][element-type GstTimedValue]
Returns : | FALSE if the values couldn't be set, TRUE otherwise.

### gst_timed_value_control_source_get_all ()

    GList *             gst_timed_value_control_source_get_all
                                                            (GstTimedValueControlSource *self);

Returns a read-only copy of the list of GstTimedValue for the given property. Free the list after done with it.

`self` : | the GstTimedValueControlSource to get the list from
Returns : | a copy of the list, or `NULL` if the property isn't handled by the controller. [transfer container][element-type GstTimedValue]

### gst_timed_value_control_source_unset ()

    gboolean            gst_timed_value_control_source_unset
                                                            (GstTimedValueControlSource *self,
                                                             GstClockTime timestamp);

Used to remove the value of given controller-handled property at a certain time.

`self` : | the GstTimedValueControlSource object
`timestamp` : | the time the control-change should be removed from
Returns : | FALSE if the value couldn't be unset (i.e. not found, TRUE otherwise.

### gst_timed_value_control_source_unset_all ()

    void                gst_timed_value_control_source_unset_all
                                                            (GstTimedValueControlSource *self);

Used to remove all time-stamped values of given controller-handled property

`self` : | the GstTimedValueControlSource object

### gst_timed_value_control_source_get_count ()

    gint                gst_timed_value_control_source_get_count
                                                            (GstTimedValueControlSource *self);

Get the number of control points that are set.

`self` : | the GstTimedValueControlSource to get the number of values from
Returns : | the number of control points that are set.

### gst_timed_value_control_invalidate_cache ()

    void                gst_timed_value_control_invalidate_cache
                                                            (GstTimedValueControlSource *self);

Reset the controlled value cache.

`self` : | the GstTimedValueControlSource