[vlc-devel] [vlc-commits] macosx: advanced prefs: only choose slider if we have limits set

David Fuhrmann david.fuhrmann at gmail.com
Wed Nov 2 18:54:46 CET 2016

Hi Filip,

> Am 02.11.2016 um 00:48 schrieb Filip Roséen <filip at atch.se>:
> Hi David,
> On 2016-11-01 15:12, David Fuhrmann wrote:
>  vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org <mailto:dfuhrmann at videolan.org>> |
>  Tue Nov  1 15:10:50 2016 +0100| [d70331b13ca5c65bb1b16b7d97a8c23bf7e7d86f] |
>  committer: David Fuhrmann
>  macosx: advanced prefs: only choose slider if we have limits set
>  The RangedXXControls only make much sense if we have sensible
>  limits.
>  http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d70331b13ca5c65bb1b16b7d97a8c23bf7e7d86f <http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d70331b13ca5c65bb1b16b7d97a8c23bf7e7d86f>
> The default range for integer configurations is (INT64_MIN, INT64_MAX) after e908026, so the commit in which this email is a reply to should (probably) be modified to use these values(?).
> I also noted the usage of && instead of || in the commit, meaning that a module having a range such as (x, INT64_MAX) or (INT64_MIN, x), where x is arbitrary but not INT64_MIN and INT64_MAX respectively, would not have a slider for input (even though it has an explicit range set).
> Attached is a patch that takes care of what I wrote above, though:
> Is it a concious decision to use INT32_ instead of INT64_?
> If so, does it not make more sense to check the absolute difference between min and max (to only display a slider for “sensible limits”?
Yes, this was the main reason, but I’m not sure what is the best way. Of course we can think about more sensibly defining „good limits“. I think a slider ranging from INT64_MIN to INT64_MAX - 1 just does not make much sense.

After I looked at some ranges, It seems we define them quite diversely, ranging from small ranges, to something like [0,INT32_MAX].

On the other hand, the current code does not support values > sizeof(int) at all, as the controls store use int for the getters and setters.

What is your opinion about that topic?

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20161102/b1fd391e/attachment.html>

More information about the vlc-devel mailing list