Port gtk-doc comments to their equivalent markdown syntax
[platform/upstream/gstreamer.git] / libs / gst / controller / gstlfocontrolsource.c
index d5f23f6..403adf5 100644 (file)
  *
  * 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>
@@ -399,6 +401,7 @@ gst_lfo_waveform_get_type (void)
 #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);
 
@@ -452,6 +455,7 @@ gst_lfo_control_source_init (GstLFOControlSource * self)
   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;
 
@@ -466,7 +470,7 @@ gst_lfo_control_source_finalize (GObject * obj)
   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
@@ -485,8 +489,7 @@ gst_lfo_control_source_set_property (GObject * object, guint prop_id,
     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;
@@ -555,7 +558,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
   gobject_class->get_property = gst_lfo_control_source_get_property;
 
   /**
-   * GstLFOControlSource:waveform
+   * GstLFOControlSource:waveform:
    *
    * Specifies the waveform that should be used for this #GstLFOControlSource.
    */
@@ -565,7 +568,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
           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
@@ -573,11 +576,11 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
    */
   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.
@@ -592,7 +595,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
           G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
 
   /**
-   * GstLFOControlSource:amplitude
+   * GstLFOControlSource:amplitude:
    *
    * Specifies the amplitude for the waveform of this #GstLFOControlSource.
    */
@@ -602,7 +605,7 @@ gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
           G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
 
   /**
-   * GstLFOControlSource:offset
+   * GstLFOControlSource:offset:
    *
    * Specifies the value offset for the waveform of this #GstLFOControlSource.
    */