From 41e26035dc5307f005ba8497c07829ab22196769 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 31 Aug 2005 18:45:41 +0000 Subject: [PATCH] libs/gst/controller/gst-controller.c: fixed boolean again 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 | 7 +++++++ libs/gst/controller/gst-controller.c | 18 ++++++++++++------ libs/gst/controller/gstcontroller.c | 18 ++++++++++++------ 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 69788ac..f6cd568 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-08-31 Stefan Kost + + * 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 * docs/faq/gst-uninstalled: diff --git a/libs/gst/controller/gst-controller.c b/libs/gst/controller/gst-controller.c index a7c295b..f2aacbb 100644 --- a/libs/gst/controller/gst-controller.c +++ b/libs/gst/controller/gst-controller.c @@ -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); diff --git a/libs/gst/controller/gstcontroller.c b/libs/gst/controller/gstcontroller.c index a7c295b..f2aacbb 100644 --- a/libs/gst/controller/gstcontroller.c +++ b/libs/gst/controller/gstcontroller.c @@ -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); -- 2.7.4