libs/gst/controller/gst-controller.c: fixed boolean again
authorStefan Kost <ensonic@users.sourceforge.net>
Wed, 31 Aug 2005 18:45:41 +0000 (18:45 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Wed, 31 Aug 2005 18:45:41 +0000 (18:45 +0000)
Original commit message from CVS:
* libs/gst/controller/gst-controller.c:
(gst_controlled_property_set_interpolation_mode),
(gst_controlled_property_new):
fixed boolean again

ChangeLog
libs/gst/controller/gst-controller.c
libs/gst/controller/gstcontroller.c

index 69788ac..f6cd568 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-08-31  Stefan Kost  <ensonic@users.sf.net>
+
+       * libs/gst/controller/gst-controller.c:
+       (gst_controlled_property_set_interpolation_mode),
+       (gst_controlled_property_new):
+        fixed boolean again
+
 2005-08-31  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * docs/faq/gst-uninstalled:
index a7c295b..f2aacbb 100644 (file)
@@ -205,7 +205,7 @@ gst_controlled_property_set_interpolation_mode (GstControlledProperty * self,
         self->get = NULL;
         self->get_value_array = NULL;
     }
-    if (!self->get || !self->get_value_array) {
+    if (!self->get) {           /* || !self->get_value_array) */
       GST_WARNING ("incomplete implementation for type '%d'", self->type);
       res = FALSE;
     }
@@ -306,16 +306,22 @@ gst_controlled_property_new (GObject * object, const gchar * name)
           g_value_set_double (&prop->default_value, tpspec->default_value);
         }
           break;
+        case G_TYPE_BOOLEAN:{
+          GParamSpecBoolean *tpspec = G_PARAM_SPEC_BOOLEAN (pspec);
+
+          g_value_set_boolean (&prop->default_value, tpspec->default_value);
+        }
+          break;
         default:
           GST_WARNING ("incomplete implementation for paramspec type '%s'",
               G_PARAM_SPEC_TYPE_NAME (pspec));
       }
       /* TODO what about adding a timedval with timestamp=0 and value=default
-         + a bit easier for interpolators, example:
-         * first timestamp is at 5
-         * requested value if for timestamp=3
-         * LINEAR and Co. would need to interpolate from default value
-         to value at timestamp 5 
+       * a bit easier for interpolators, example:
+       * first timestamp is at 5
+       * requested value if for timestamp=3
+       * LINEAR and Co. would need to interpolate from default value to value
+       * at timestamp 5 
        */
       signal_name = g_alloca (8 + 1 + strlen (name));
       g_sprintf (signal_name, "notify::%s", name);
index a7c295b..f2aacbb 100644 (file)
@@ -205,7 +205,7 @@ gst_controlled_property_set_interpolation_mode (GstControlledProperty * self,
         self->get = NULL;
         self->get_value_array = NULL;
     }
-    if (!self->get || !self->get_value_array) {
+    if (!self->get) {           /* || !self->get_value_array) */
       GST_WARNING ("incomplete implementation for type '%d'", self->type);
       res = FALSE;
     }
@@ -306,16 +306,22 @@ gst_controlled_property_new (GObject * object, const gchar * name)
           g_value_set_double (&prop->default_value, tpspec->default_value);
         }
           break;
+        case G_TYPE_BOOLEAN:{
+          GParamSpecBoolean *tpspec = G_PARAM_SPEC_BOOLEAN (pspec);
+
+          g_value_set_boolean (&prop->default_value, tpspec->default_value);
+        }
+          break;
         default:
           GST_WARNING ("incomplete implementation for paramspec type '%s'",
               G_PARAM_SPEC_TYPE_NAME (pspec));
       }
       /* TODO what about adding a timedval with timestamp=0 and value=default
-         + a bit easier for interpolators, example:
-         * first timestamp is at 5
-         * requested value if for timestamp=3
-         * LINEAR and Co. would need to interpolate from default value
-         to value at timestamp 5 
+       * a bit easier for interpolators, example:
+       * first timestamp is at 5
+       * requested value if for timestamp=3
+       * LINEAR and Co. would need to interpolate from default value to value
+       * at timestamp 5 
        */
       signal_name = g_alloca (8 + 1 + strlen (name));
       g_sprintf (signal_name, "notify::%s", name);