Port gtk-doc comments to their equivalent markdown syntax
[platform/upstream/gstreamer.git] / libs / gst / controller / gstdirectcontrolbinding.c
index 6916556..9e5955d 100644 (file)
  */
 /**
  * SECTION:gstdirectcontrolbinding
+ * @title: GstDirectControlBinding
  * @short_description: direct attachment for control sources
  *
  * A value mapping object that attaches control sources to gobject properties. It
- * will map the control values [0.0 ... 1.0] to the target property range. If a
- * control value is outside of the range, it will be clipped.
+ * will map the control values directly to the target property range. If a
+ * non-absolute direct control binding is used, the value range [0.0 ... 1.0]
+ * is mapped to full target property range, and all values outside the range
+ * will be clipped. An absolute control binding will not do any value
+ * transformations.
  */
 
 #include <glib-object.h>
@@ -233,7 +237,7 @@ gst_direct_control_binding_constructor (GType type, guint n_construct_params,
     /* select mapping function */
 
 #define SET_CONVERT_FUNCTION(type) \
-    if (self->want_absolute) { \
+    if (self->ABI.abi.want_absolute) { \
         self->convert_g_value = abs_convert_g_value_to_##type; \
         self->convert_value = abs_convert_value_to_##type; \
     } \
@@ -300,7 +304,7 @@ gst_direct_control_binding_set_property (GObject * object, guint prop_id,
       self->cs = g_value_dup_object (value);
       break;
     case PROP_ABSOLUTE:
-      self->want_absolute = g_value_get_boolean (value);
+      self->ABI.abi.want_absolute = g_value_get_boolean (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -319,7 +323,7 @@ gst_direct_control_binding_get_property (GObject * object, guint prop_id,
       g_value_set_object (value, self->cs);
       break;
     case PROP_ABSOLUTE:
-      g_value_set_boolean (value, self->want_absolute);
+      g_value_set_boolean (value, self->ABI.abi.want_absolute);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -343,7 +347,8 @@ gst_direct_control_binding_finalize (GObject * object)
 {
   GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (object);
 
-  g_value_unset (&self->cur_value);
+  if (G_IS_VALUE (&self->cur_value))
+    g_value_unset (&self->cur_value);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -507,7 +512,8 @@ gst_direct_control_binding_get_g_value_array (GstControlBinding * _self,
  * @cs: the control source
  *
  * Create a new control-binding that attaches the #GstControlSource to the
- * #GObject property.
+ * #GObject property. It will map the control source range [0.0 ... 1.0] to
+ * the full target property range, and clip all values outside this range.
  *
  * Returns: (transfer floating): the new #GstDirectControlBinding
  */
@@ -526,7 +532,8 @@ gst_direct_control_binding_new (GstObject * object, const gchar * property_name,
  * @cs: the control source
  *
  * Create a new control-binding that attaches the #GstControlSource to the
- * #GObject property.
+ * #GObject property. It will directly map the control source values to the
+ * target property range without any transformations.
  *
  * Returns: (transfer floating): the new #GstDirectControlBinding
  *