[vlc-devel] [PATCH 0/5] variables: add VLC_VAR_LIST
remi at remlab.net
Thu Nov 3 10:51:25 CET 2016
Le 2016-11-03 11:16, Thomas Guillem a écrit :
> This patch-set adds the possibility to store a list of
> int/bool/float/string/coords inside a VLC variable. The first 3
> patches rename
> old List functions that are only used for Choice variables
> ("video-es" for
> example) in order to avoid confusion with the new VLC_VAR_LIST.
That looks like a terrible idea to me.
If you need atomic read-modify-write, then this just won´t work,
because var_GetAndSet() will never scale up to it.
If you don´t need atomic read-modify-write, then why bother with VLC
variables. That subsystem has all the disadvantages of an abstract type
- loss of compile-time sanity checks,
- artificially introduced error cases,
- lack of debugger support,
- boiler plate code,
and none of the benefits.
The only benefit of the VLC variables subsystem is its integration with
So re-adding list support seems really counter-productive to me.
> This new list variable could be used to get/set atomically (and maybe
> increment/decrement in a future patch) a set of values. The main
> purpose is to
> store the 3 yaw/pitch/roll variables, that will be needed for 360
> inside one variable in the vout.
No, that won´t work as noted above.
You are better off defining a proper typed structure and defining
dedicated vout functions.
More information about the vlc-devel