*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
/**
* SECTION:gstlfocontrolsource
+ * @title: GstLFOControlSource
* @short_description: LFO control source
*
- * #GstLFOControlSource is a #GstControlSource, that provides several periodic waveforms
- * as control values. It supports all fundamental, numeric GValue types as property.
+ * #GstLFOControlSource is a #GstControlSource, that provides several periodic
+ * waveforms as control values.
*
- * To use #GstLFOControlSource get a new instance by calling gst_lfo_control_source_new(),
- * bind it to a #GParamSpec and set the relevant properties or use
- * gst_lfo_control_source_set_waveform.
+ * To use #GstLFOControlSource get a new instance by calling
+ * gst_lfo_control_source_new(), bind it to a #GParamSpec and set the relevant
+ * properties.
*
* All functions are MT-safe.
- *
*/
+#include <float.h>
+
#include <glib-object.h>
#include <gst/gst.h>
#include <gst/gstcontrolsource.h>
#define _do_init \
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "lfo control source", 0, "low frequency oscillator control source")
+#define gst_lfo_control_source_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstLFOControlSource, gst_lfo_control_source,
GST_TYPE_CONTROL_SOURCE, _do_init);
self->priv->waveform = gst_lfo_control_source_set_waveform (self,
GST_LFO_WAVEFORM_SINE);
self->priv->frequency = 1.0;
+ self->priv->amplitude = 1.0;
self->priv->period = GST_SECOND / self->priv->frequency;
self->priv->timeshift = 0;
gst_lfo_control_source_reset (self);
g_mutex_clear (&self->lock);
- G_OBJECT_CLASS (gst_lfo_control_source_parent_class)->finalize (obj);
+ G_OBJECT_CLASS (parent_class)->finalize (obj);
}
static void
case PROP_FREQUENCY:{
gdouble frequency = g_value_get_double (value);
- g_return_if_fail (frequency > 0
- || ((GstClockTime) (GST_SECOND / frequency)) != 0);
+ g_return_if_fail (((GstClockTime) (GST_SECOND / frequency)) != 0);
g_mutex_lock (&self->lock);
self->priv->frequency = frequency;
gobject_class->get_property = gst_lfo_control_source_get_property;
/**
- * GstLFOControlSource:waveform
+ * GstLFOControlSource:waveform:
*
* Specifies the waveform that should be used for this #GstLFOControlSource.
*/
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
- * GstLFOControlSource:frequency
+ * GstLFOControlSource:frequency:
*
* Specifies the frequency that should be used for the waveform
* of this #GstLFOControlSource. It should be large enough
*/
g_object_class_install_property (gobject_class, PROP_FREQUENCY,
g_param_spec_double ("frequency", "Frequency",
- "Frequency of the waveform", 0.0, G_MAXDOUBLE, 1.0,
+ "Frequency of the waveform", DBL_MIN, G_MAXDOUBLE, 1.0,
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
/**
- * GstLFOControlSource:timeshift
+ * GstLFOControlSource:timeshift:
*
* Specifies the timeshift to the right that should be used for the waveform
* of this #GstLFOControlSource in nanoseconds.
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
/**
- * GstLFOControlSource:amplitude
+ * GstLFOControlSource:amplitude:
*
* Specifies the amplitude for the waveform of this #GstLFOControlSource.
*/
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
/**
- * GstLFOControlSource:offset
+ * GstLFOControlSource:offset:
*
* Specifies the value offset for the waveform of this #GstLFOControlSource.
*/