![]() |
![]() |
![]() |
GStreamer 0.10 Library Reference Manual | ![]() |
---|---|---|---|---|
#include <libs/controller/gstinterpolationcontrolsource.h> GstInterpolationControlSource; enum GstInterpolateMode; GstInterpolationControlSource* gst_interpolation_control_source_new (void); gboolean gst_interpolation_control_source_set (GstInterpolationControlSource *self, GstClockTime timestamp, GValue *value); gboolean gst_interpolation_control_source_set_from_list (GstInterpolationControlSource *self, GSList *timedvalues); gboolean gst_interpolation_control_source_set_interpolation_mode (GstInterpolationControlSource *self, GstInterpolateMode mode); GList* gst_interpolation_control_source_get_all (GstInterpolationControlSource *self); gboolean gst_interpolation_control_source_unset (GstInterpolationControlSource *self, GstClockTime timestamp); void gst_interpolation_control_source_unset_all (GstInterpolationControlSource *self); gint gst_interpolation_control_source_get_count (GstInterpolationControlSource *self);
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.
typedef struct _GstInterpolationControlSource GstInterpolationControlSource;
The instance structure of GstControlSource.
typedef enum { GST_INTERPOLATE_NONE, GST_INTERPOLATE_TRIGGER, GST_INTERPOLATE_LINEAR, GST_INTERPOLATE_QUADRATIC, GST_INTERPOLATE_CUBIC, GST_INTERPOLATE_USER } GstInterpolateMode;
The various interpolation modes available.
GstInterpolationControlSource* gst_interpolation_control_source_new (void);
This returns a new, unbound GstInterpolationControlSource.
Returns : | a new, unbound GstInterpolationControlSource. |
gboolean gst_interpolation_control_source_set (GstInterpolationControlSource *self, GstClockTime timestamp, GValue *value);
Set the value of given controller-handled property at a certain time.
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. |
gboolean gst_interpolation_control_source_set_from_list (GstInterpolationControlSource *self, GSList *timedvalues);
Sets multiple timed values at once.
self : |
the GstInterpolationControlSource object |
timedvalues : |
a list with GstTimedValue items |
Returns : | FALSE if the values couldn't be set, TRUE otherwise. |
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.
self : |
the GstInterpolationControlSource object |
mode : |
interpolation mode |
Returns : | TRUE if the interpolation mode could be set, FALSE otherwise
|
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.
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
|
gboolean gst_interpolation_control_source_unset (GstInterpolationControlSource *self, GstClockTime timestamp);
Used to remove the value of given controller-handled property at a certain time.
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. |
void gst_interpolation_control_source_unset_all (GstInterpolationControlSource *self);
Used to remove all time-stamped values of given controller-handled property
self : |
the GstInterpolationControlSource object |
gint gst_interpolation_control_source_get_count (GstInterpolationControlSource *self);
Returns the number of control points that are set.
self : |
the GstInterpolationControlSource to get the number of values from |
Returns : | the number of control points that are set. |