[Bug 773090] paramspecs: Add int range

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Nov 14 11:13:22 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=773090

--- Comment #5 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
The validate func is called when _set_property() is called with a value, to
make sure the value in the GValue adheres to the restrictions imposed by the
param spec.


> So the intent for _gst_param_int_range_validate is to modify value contents
> in the least destructive way, so that it complies with the requirements. In
> this case I think that would be to make sure the value's range lies within
> the allowed range.

Yes, that's how it should be aiui.


> The patch does not do this correctly, and I will fix that if we agree that
> this is the desired behavior?
> 
> I'm sure a common macro can be defined for int_range, int64_range and
> double_range, but probably not fraction_range. And it's not like the macro
> will make the code any easier to read. I'll wait with that until at least
> we've agreed on how int_range should be implemented.

I'm all in favour of clarity. Can always macro-fy it later.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list