![]() |
![]() |
![]() |
GStreamer 0.10 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <libs/controller/gstinterpolationcontrolsource.h> struct GstInterpolationControlSource; enum GstInterpolateMode; GstInterpolationControlSource * gst_interpolation_control_source_new (void
); gboolean gst_interpolation_control_source_set (GstInterpolationControlSource *self
,GstClockTime timestamp
,const GValue *value
); gboolean gst_interpolation_control_source_set_from_list (GstInterpolationControlSource *self
,const 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.
struct 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.
steps-like interpolation, default | |
returns the default value of the property, except for times with specific values | |
linear interpolation | |
square interpolation (deprecated, maps to cubic) | |
cubic interpolation | |
user-provided interpolation (not yet 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
,const GValue *value
);
Set the value of given controller-handled property at a certain time.
|
the GstInterpolationControlSource object |
|
the time the control-change is scheduled for |
|
the control-value |
Returns : |
FALSE if the values couldn't be set, TRUE otherwise. |
gboolean gst_interpolation_control_source_set_from_list (GstInterpolationControlSource *self
,const GSList *timedvalues
);
Sets multiple timed values at once.
|
the GstInterpolationControlSource object |
|
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.
|
the GstInterpolationControlSource object |
|
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.
|
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.
|
the GstInterpolationControlSource object |
|
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
|
the GstInterpolationControlSource object |
gint gst_interpolation_control_source_get_count
(GstInterpolationControlSource *self
);
Returns the number of control points that are set.
|
the GstInterpolationControlSource to get the number of values from |
Returns : |
the number of control points that are set. |