3 * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
5 * gstinterpolationcontrolsource.h: Control source that provides several
6 * interpolation methods
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GST_INTERPOLATION_CONTROL_SOURCE_H__
25 #define __GST_INTERPOLATION_CONTROL_SOURCE_H__
27 #include <glib-object.h>
30 #include <gst/controller/gsttimedvaluecontrolsource.h>
34 #define GST_TYPE_INTERPOLATION_CONTROL_SOURCE \
35 (gst_interpolation_control_source_get_type ())
36 #define GST_INTERPOLATION_CONTROL_SOURCE(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSource))
38 #define GST_INTERPOLATION_CONTROL_SOURCE_CLASS(vtable) \
39 (G_TYPE_CHECK_CLASS_CAST ((vtable), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSourceClass))
40 #define GST_IS_INTERPOLATION_CONTROL_SOURCE(obj) \
41 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_INTERPOLATION_CONTROL_SOURCE))
42 #define GST_IS_INTERPOLATION_CONTROL_SOURCE_CLASS(vtable) \
43 (G_TYPE_CHECK_CLASS_TYPE ((vtable), GST_TYPE_INTERPOLATION_CONTROL_SOURCE))
44 #define GST_INTERPOLATION_CONTROL_SOURCE_GET_CLASS(inst) \
45 (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSourceClass))
47 #define GST_TYPE_INTERPOLATION_MODE (gst_interpolation_mode_get_type ())
49 typedef struct _GstInterpolationControlSource GstInterpolationControlSource;
50 typedef struct _GstInterpolationControlSourceClass GstInterpolationControlSourceClass;
51 typedef struct _GstInterpolationControlSourcePrivate GstInterpolationControlSourcePrivate;
54 * GstInterpolationMode:
55 * @GST_INTERPOLATION_MODE_NONE: steps-like interpolation, default
56 * @GST_INTERPOLATION_MODE_LINEAR: linear interpolation
57 * @GST_INTERPOLATION_MODE_CUBIC: cubic interpolation (natural), may overshoot
58 * the min or max values set by the control point, but is more 'curvy'
59 * @GST_INTERPOLATION_MODE_CUBIC_MONO: monotonic cubic interpolation, will not
60 * produce any values outside of the min-max range set by the control points
63 * The various interpolation modes available.
67 GST_INTERPOLATION_MODE_NONE,
68 GST_INTERPOLATION_MODE_LINEAR,
69 GST_INTERPOLATION_MODE_CUBIC,
70 GST_INTERPOLATION_MODE_CUBIC_MONO,
71 } GstInterpolationMode;
74 * GstInterpolationControlSource:
76 * The instance structure of #GstControlSource.
78 struct _GstInterpolationControlSource {
79 GstTimedValueControlSource parent;
82 GstInterpolationControlSourcePrivate *priv;
83 gpointer _gst_reserved[GST_PADDING];
86 struct _GstInterpolationControlSourceClass {
87 GstTimedValueControlSourceClass parent_class;
90 gpointer _gst_reserved[GST_PADDING];
93 GType gst_interpolation_control_source_get_type (void);
94 GType gst_interpolation_mode_get_type (void);
98 GstControlSource * gst_interpolation_control_source_new (void);
100 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
101 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstInterpolationControlSource, gst_object_unref)
106 #endif /* __GST_INTERPOLATION_CONTROL_SOURCE_H__ */