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.
This commit is contained in:
David Schleef 2004-02-19 01:47:04 +00:00
parent 67455089a4
commit aff2828040
4 changed files with 25 additions and 9 deletions

View file

@ -1,3 +1,11 @@
2004-02-18 David Schleef <ds@schleef.org>
* 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 <ds@schleef.org> 2004-02-17 David Schleef <ds@schleef.org>
* gst/elements/gstmultifilesrc.c: (gst_multifilesrc_class_init): * gst/elements/gstmultifilesrc.c: (gst_multifilesrc_class_init):

View file

@ -94,7 +94,7 @@ gst_dparam_class_init (GstDParamClass *klass)
"The value that should be changed if gfloat is the type", "The value that should be changed if gfloat is the type",
-G_MAXFLOAT, G_MAXFLOAT, 0.0F, G_PARAM_READWRITE)); -G_MAXFLOAT, G_MAXFLOAT, 0.0F, G_PARAM_READWRITE));
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_VALUE_DOUBLE, 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", "The value that should be changed if gdouble is the type",
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE));
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_VALUE_INT, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_VALUE_INT,

View file

@ -98,15 +98,15 @@ gst_dpsmooth_class_init (GstDParamSmoothClass *klass)
"The time period to define slope_delta by", "The time period to define slope_delta by",
0LL, G_MAXINT64, 10000000LL, G_PARAM_READWRITE)); 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), g_object_class_install_property(G_OBJECT_CLASS(klass),
ARG_SLOPE_DELTA_FLOAT, 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", "The amount a double value can change for a given slope_time",
0.0, G_MAXDOUBLE, 0.2, G_PARAM_READWRITE)); 0.0, G_MAXDOUBLE, 0.2, G_PARAM_READWRITE));
@ -140,7 +140,8 @@ gst_dpsmooth_new (GType type)
switch (type){ switch (type){
case G_TYPE_FLOAT: { case G_TYPE_FLOAT: {
dparam->do_update_func = gst_dpsmooth_do_update_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; break;
} }
case G_TYPE_DOUBLE: { case G_TYPE_DOUBLE: {

View file

@ -652,6 +652,13 @@ print_element_info (GstElementFactory *factory)
((GParamSpecFloat *) specs[x])->minimum, ((GParamSpecFloat *) specs[x])->minimum,
((GParamSpecFloat *) specs[x])->maximum); ((GParamSpecFloat *) specs[x])->maximum);
break; 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])); default: g_print ("unknown %ld", G_PARAM_SPEC_VALUE_TYPE (specs[x]));
} }
g_print ("\n"); g_print ("\n");