All interaction with dparams to actually set the dparam value is done through simple GObject properties. There is a property value for each type that dparams supports - these currently being "value_float", "value_int" and "value_int64". To set the value of a dparam, simply set the property which matches the type of your dparam instance.
#define ZERO(mem) memset(&mem, 0, sizeof(mem)) ... gfloat set_to_value; GstDParam *volume; GValue set_val; ZERO(set_val); g_value_init(&set_val, G_TYPE_FLOAT); ... g_value_set_float(&set_val, set_to_value); g_object_set_property(G_OBJECT(volume), "value_float", &set_val);
Or if you create an actual GValue instance:
gfloat set_to_value; GstDParam *volume; GValue *set_val; set_val = g_new0(GValue,1); g_value_init(set_val, G_TYPE_FLOAT); ... g_value_set_float(set_val, set_to_value); g_object_set_property(G_OBJECT(volume), "value_float", set_val);