[vlc-devel] [PATCH 0/5] variables: add VLC_VAR_LIST

Thomas Guillem thomas at gllm.fr
Fri Nov 4 12:11:32 CET 2016



On Thu, Nov 3, 2016, at 10:51, Rémi Denis-Courmont wrote:
> 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.

OK. This seemed to be a good idea to me, but I was not really sure. Some
other people disagree with this set too. So I guess I'll drop it.

> 
> 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 
> system:
> - loss of compile-time sanity checks,
> - artificially introduced error cases,
> - lack of debugger support,
> - boiler plate code,
> - etc
> and none of the benefits.
> 
> The only benefit of the VLC variables subsystem is its integration with 
> configuration items.
> 
> 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 
> > patches,
> > 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.

Yep, that's what we'll do then.

Thanks for your comments.

> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list