mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
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:
parent
67455089a4
commit
aff2828040
4 changed files with 25 additions and 9 deletions
|
@ -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>
|
||||
|
||||
* gst/elements/gstmultifilesrc.c: (gst_multifilesrc_class_init):
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue