From aff28280409ec518f0fc1b25ed848c62296b7360 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 19 Feb 2004 01:47:04 +0000 Subject: [PATCH] libs/gst/control/: Additional fixes to get double dparams working. Original commit message from CVS: * libs/gst/control/dparam.c: (gst_dparam_class_init): * libs/gst/control/dparam_smooth.c: (gst_dpsmooth_class_init), (gst_dpsmooth_new): Additional fixes to get double dparams working. * tools/gst-inspect.c: (print_element_info): Support dumping of double dparam information. --- ChangeLog | 8 ++++++++ libs/gst/control/dparam.c | 2 +- libs/gst/control/dparam_smooth.c | 17 +++++++++-------- tools/gst-inspect.c | 7 +++++++ 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11c905b0ee..a0a6f1c341 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-02-18 David Schleef + + * libs/gst/control/dparam.c: (gst_dparam_class_init): + * libs/gst/control/dparam_smooth.c: (gst_dpsmooth_class_init), + (gst_dpsmooth_new): Additional fixes to get double dparams working. + * tools/gst-inspect.c: (print_element_info): Support dumping of + double dparam information. + 2004-02-17 David Schleef * gst/elements/gstmultifilesrc.c: (gst_multifilesrc_class_init): diff --git a/libs/gst/control/dparam.c b/libs/gst/control/dparam.c index 310c9dd5f8..dcccb849aa 100644 --- a/libs/gst/control/dparam.c +++ b/libs/gst/control/dparam.c @@ -94,7 +94,7 @@ gst_dparam_class_init (GstDParamClass *klass) "The value that should be changed if gfloat is the type", -G_MAXFLOAT, G_MAXFLOAT, 0.0F, G_PARAM_READWRITE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_VALUE_DOUBLE, - g_param_spec_float("value_double","Double Value", + g_param_spec_double("value_double","Double Value", "The value that should be changed if gdouble is the type", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_VALUE_INT, diff --git a/libs/gst/control/dparam_smooth.c b/libs/gst/control/dparam_smooth.c index c4f49cce95..3d5af321fd 100644 --- a/libs/gst/control/dparam_smooth.c +++ b/libs/gst/control/dparam_smooth.c @@ -98,15 +98,15 @@ gst_dpsmooth_class_init (GstDParamSmoothClass *klass) "The time period to define slope_delta by", 0LL, G_MAXINT64, 10000000LL, G_PARAM_READWRITE)); - g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SLOPE_DELTA_FLOAT, - g_param_spec_float("slope_delta_float", - "Slope Delta float", - "The amount a float value can change for a given slope_time", - 0.0F, G_MAXFLOAT, 0.2F, G_PARAM_READWRITE)); - g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SLOPE_DELTA_FLOAT, - g_param_spec_float("slope_delta_double", "Slope Delta double", + g_param_spec_float("slope_delta_float", "Slope Delta float", + "The amount a float value can change for a given slope_time", + 0.0F, G_MAXFLOAT, 0.2F, G_PARAM_READWRITE)); + + g_object_class_install_property(G_OBJECT_CLASS(klass), + ARG_SLOPE_DELTA_DOUBLE, + g_param_spec_double("slope_delta_double", "Slope Delta double", "The amount a double value can change for a given slope_time", 0.0, G_MAXDOUBLE, 0.2, G_PARAM_READWRITE)); @@ -140,7 +140,8 @@ gst_dpsmooth_new (GType type) switch (type){ case G_TYPE_FLOAT: { dparam->do_update_func = gst_dpsmooth_do_update_float; - g_signal_connect (G_OBJECT (dpsmooth), "value_changed", G_CALLBACK (gst_dpsmooth_value_changed_float), NULL); + g_signal_connect (G_OBJECT (dpsmooth), "value_changed", + G_CALLBACK (gst_dpsmooth_value_changed_float), NULL); break; } case G_TYPE_DOUBLE: { diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 59bacbf557..332b2a5631 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -652,6 +652,13 @@ print_element_info (GstElementFactory *factory) ((GParamSpecFloat *) specs[x])->minimum, ((GParamSpecFloat *) specs[x])->maximum); break; + case G_TYPE_DOUBLE: + g_print ("Double. Default: %-8.8s %15.7g\n", "", + ((GParamSpecDouble *) specs[x])->default_value); + g_print ("%-23.23s Range: %15.7g - %15.7g", "", + ((GParamSpecDouble *) specs[x])->minimum, + ((GParamSpecDouble *) specs[x])->maximum); + break; default: g_print ("unknown %ld", G_PARAM_SPEC_VALUE_TYPE (specs[x])); } g_print ("\n");