1 /* GStreamer 2 * 3 * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org> 4 * 5 * gstlfocontrolsource.h: Control source that provides some periodic waveforms 6 * as control values. 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_LFO_CONTROL_SOURCE_H__ 25 #define __GST_LFO_CONTROL_SOURCE_H__ 26 27 #include <glib-object.h> 28 #include <gst/gst.h> 29 #include <gst/controller/controller-enumtypes.h> 30 31 G_BEGIN_DECLS 32 33 #define GST_TYPE_LFO_CONTROL_SOURCE \ 34 (gst_lfo_control_source_get_type ()) 35 #define GST_LFO_CONTROL_SOURCE(obj) \ 36 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_LFO_CONTROL_SOURCE, GstLFOControlSource)) 37 #define GST_LFO_CONTROL_SOURCE_CLASS(vtable) \ 38 (G_TYPE_CHECK_CLASS_CAST ((vtable), GST_TYPE_LFO_CONTROL_SOURCE, GstLFOControlSourceClass)) 39 #define GST_IS_LFO_CONTROL_SOURCE(obj) \ 40 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_LFO_CONTROL_SOURCE)) 41 #define GST_IS_LFO_CONTROL_SOURCE_CLASS(vtable) \ 42 (G_TYPE_CHECK_CLASS_TYPE ((vtable), GST_TYPE_LFO_CONTROL_SOURCE)) 43 #define GST_LFO_CONTROL_SOURCE_GET_CLASS(inst) \ 44 (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_LFO_CONTROL_SOURCE, GstLFOControlSourceClass)) 45 46 typedef struct _GstLFOControlSource GstLFOControlSource; 47 typedef struct _GstLFOControlSourceClass GstLFOControlSourceClass; 48 typedef struct _GstLFOControlSourcePrivate GstLFOControlSourcePrivate; 49 50 /** 51 * GstLFOWaveform: 52 * @GST_LFO_WAVEFORM_SINE: sine waveform 53 * @GST_LFO_WAVEFORM_SQUARE: square waveform 54 * @GST_LFO_WAVEFORM_SAW: saw waveform 55 * @GST_LFO_WAVEFORM_REVERSE_SAW: reverse saw waveform 56 * @GST_LFO_WAVEFORM_TRIANGLE: triangle waveform 57 * 58 * The various waveform modes available. 59 */ 60 typedef enum 61 { 62 GST_LFO_WAVEFORM_SINE, 63 GST_LFO_WAVEFORM_SQUARE, 64 GST_LFO_WAVEFORM_SAW, 65 GST_LFO_WAVEFORM_REVERSE_SAW, 66 GST_LFO_WAVEFORM_TRIANGLE 67 } GstLFOWaveform; 68 69 /** 70 * GstLFOControlSource: 71 * 72 * The instance structure of #GstControlSource. 73 */ 74 struct _GstLFOControlSource { 75 GstControlSource parent; 76 77 /* <private> */ 78 GstLFOControlSourcePrivate *priv; 79 GMutex lock; 80 gpointer _gst_reserved[GST_PADDING]; 81 }; 82 83 struct _GstLFOControlSourceClass { 84 GstControlSourceClass parent_class; 85 86 /*< private >*/ 87 gpointer _gst_reserved[GST_PADDING]; 88 }; 89 90 GST_CONTROLLER_API 91 GType gst_lfo_control_source_get_type (void); 92 93 /* Functions */ 94 95 GST_CONTROLLER_API 96 GstControlSource *gst_lfo_control_source_new (void); 97 98 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstLFOControlSource, gst_object_unref) 99 100 G_END_DECLS 101 102 #endif /* __GST_LFO_CONTROL_SOURCE_H__ */ 103