Debian Codegraph @

libs/gst/controller/gstinterpolationcontrolsource.h

raw
1 /* GStreamer
2 *
3 * Copyright (C) 2007 Sebastian Dröge <[email protected]>
4 *
5 * gstinterpolationcontrolsource.h: Control source that provides several
6 * interpolation methods
7 *
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.
12 *
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.
17 *
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.
22 */
23
24 #ifndef __GST_INTERPOLATION_CONTROL_SOURCE_H__
25 #define __GST_INTERPOLATION_CONTROL_SOURCE_H__
26
27 #include <glib-object.h>
28 #include <gst/gst.h>
29
30 #include <gst/controller/gsttimedvaluecontrolsource.h>
31 #include <gst/controller/controller-enumtypes.h>
32
33 G_BEGIN_DECLS
34
35 #define GST_TYPE_INTERPOLATION_CONTROL_SOURCE \
36 (gst_interpolation_control_source_get_type ())
37 #define GST_INTERPOLATION_CONTROL_SOURCE(obj) \
38 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSource))
39 #define GST_INTERPOLATION_CONTROL_SOURCE_CLASS(vtable) \
40 (G_TYPE_CHECK_CLASS_CAST ((vtable), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSourceClass))
41 #define GST_IS_INTERPOLATION_CONTROL_SOURCE(obj) \
42 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_INTERPOLATION_CONTROL_SOURCE))
43 #define GST_IS_INTERPOLATION_CONTROL_SOURCE_CLASS(vtable) \
44 (G_TYPE_CHECK_CLASS_TYPE ((vtable), GST_TYPE_INTERPOLATION_CONTROL_SOURCE))
45 #define GST_INTERPOLATION_CONTROL_SOURCE_GET_CLASS(inst) \
46 (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSourceClass))
47
48 typedef struct _GstInterpolationControlSource GstInterpolationControlSource;
49 typedef struct _GstInterpolationControlSourceClass GstInterpolationControlSourceClass;
50 typedef struct _GstInterpolationControlSourcePrivate GstInterpolationControlSourcePrivate;
51
52 /**
53 * GstInterpolationMode:
54 * @GST_INTERPOLATION_MODE_NONE: steps-like interpolation, default
55 * @GST_INTERPOLATION_MODE_LINEAR: linear interpolation
56 * @GST_INTERPOLATION_MODE_CUBIC: cubic interpolation (natural), may overshoot
57 * the min or max values set by the control point, but is more 'curvy'
58 * @GST_INTERPOLATION_MODE_CUBIC_MONOTONIC: monotonic cubic interpolation, will not
59 * produce any values outside of the min-max range set by the control points
60 * (Since: 1.8)
61 *
62 * The various interpolation modes available.
63 */
64 typedef enum
65 {
66 GST_INTERPOLATION_MODE_NONE,
67 GST_INTERPOLATION_MODE_LINEAR,
68 GST_INTERPOLATION_MODE_CUBIC,
69 GST_INTERPOLATION_MODE_CUBIC_MONOTONIC,
70 } GstInterpolationMode;
71
72 /**
73 * GstInterpolationControlSource:
74 *
75 * The instance structure of #GstControlSource.
76 */
77 struct _GstInterpolationControlSource {
78 GstTimedValueControlSource parent;
79
80 /*< private >*/
81 GstInterpolationControlSourcePrivate *priv;
82 gpointer _gst_reserved[GST_PADDING];
83 };
84
85 struct _GstInterpolationControlSourceClass {
86 GstTimedValueControlSourceClass parent_class;
87
88 /*< private >*/
89 gpointer _gst_reserved[GST_PADDING];
90 };
91
92 GST_CONTROLLER_API
93 GType gst_interpolation_control_source_get_type (void);
94
95 /* Functions */
96
97 GST_CONTROLLER_API
98 GstControlSource * gst_interpolation_control_source_new (void) G_GNUC_WARN_UNUSED_RESULT;
99
100 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstInterpolationControlSource, gst_object_unref)
101
102 G_END_DECLS
103
104 #endif /* __GST_INTERPOLATION_CONTROL_SOURCE_H__ */