GstInterpolationControlSource

GstInterpolationControlSource — interpolation control source

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GstControlSource
        ╰── GstInterpolationControlSource

Includes

#include <libs/controller/gstinterpolationcontrolsource.h>

Description

GstInterpolationControlSource is a GstControlSource, that interpolates values between user-given control points. It supports several interpolation modes and property types.

To use GstInterpolationControlSource get a new instance by calling gst_interpolation_control_source_new(), bind it to a GParamSpec, select a interpolation mode with gst_interpolation_control_source_set_interpolation_mode() and set some control points by calling gst_interpolation_control_source_set().

All functions are MT-safe.

Functions

gst_interpolation_control_source_new ()

GstInterpolationControlSource *
gst_interpolation_control_source_new (void);

This returns a new, unbound GstInterpolationControlSource.

Returns

a new, unbound GstInterpolationControlSource.


gst_interpolation_control_source_set ()

gboolean
gst_interpolation_control_source_set (GstInterpolationControlSource *self,
                                      GstClockTime timestamp,
                                      const GValue *value);

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

Parameters

self

the GstInterpolationControlSource 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_interpolation_control_source_set_from_list ()

gboolean
gst_interpolation_control_source_set_from_list
                               (GstInterpolationControlSource *self,
                                const GSList *timedvalues);

Sets multiple timed values at once.

Parameters

self

the GstInterpolationControlSource object

 

timedvalues

a list with GstTimedValue items

 

Returns

FALSE if the values couldn't be set, TRUE otherwise.


gst_interpolation_control_source_set_interpolation_mode ()

gboolean
gst_interpolation_control_source_set_interpolation_mode
                               (GstInterpolationControlSource *self,
                                GstInterpolateMode mode);

Sets the given interpolation mode.

User interpolation is not yet available and quadratic interpolation is deprecated and maps to cubic interpolation.

Parameters

self

the GstInterpolationControlSource object

 

mode

interpolation mode

 

Returns

TRUE if the interpolation mode could be set, FALSE otherwise


gst_interpolation_control_source_get_all ()

GList *
gst_interpolation_control_source_get_all
                               (GstInterpolationControlSource *self);

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

Parameters

self

the GstInterpolationControlSource to get the list from

 

Returns

a copy of the list, or NULL if the property isn't handled by the controller


gst_interpolation_control_source_unset ()

gboolean
gst_interpolation_control_source_unset
                               (GstInterpolationControlSource *self,
                                GstClockTime timestamp);

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

Parameters

self

the GstInterpolationControlSource 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_interpolation_control_source_unset_all ()

void
gst_interpolation_control_source_unset_all
                               (GstInterpolationControlSource *self);

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

Parameters

self

the GstInterpolationControlSource object

 

gst_interpolation_control_source_get_count ()

gint
gst_interpolation_control_source_get_count
                               (GstInterpolationControlSource *self);

Returns the number of control points that are set.

Parameters

self

the GstInterpolationControlSource to get the number of values from

 

Returns

the number of control points that are set.

Types and Values

struct GstInterpolationControlSource

struct GstInterpolationControlSource;

The instance structure of GstControlSource.


enum GstInterpolateMode

The various interpolation modes available.

Members

GST_INTERPOLATE_NONE

steps-like interpolation, default

 

GST_INTERPOLATE_TRIGGER

returns the default value of the property, except for times with specific values

 

GST_INTERPOLATE_LINEAR

linear interpolation

 

GST_INTERPOLATE_QUADRATIC

square interpolation (deprecated, maps to cubic)

 

GST_INTERPOLATE_CUBIC

cubic interpolation

 

GST_INTERPOLATE_USER

user-provided interpolation (not yet available)