[vlc-devel] [PATCH v2 01/11] core: move all actions handling in actions.c

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Aug 11 15:58:27 CEST 2017


On Fri, Aug 11, 2017, at 02:23 PM, Rémi Denis-Courmont wrote:
> On vendredi 11 août 2017 12:01:24 EEST Hugo Beauzée-Luyssen wrote:
> > > You can´t have a default with variadic parameters. You need to know if
> > > there
> > > will be a first variadic parameter, and if so, of what type, from the
> > > fixed
> > > parameters. And none of the three fixed parameters allow that.
> > 
> > This is what patch 2 does. I can rebase 1 & 2 together if you feel it
> > should be done that way.
> 
> At this point, the origin context can only either be an interface or a
> video 
> window. I imagine it could be a LibVLC media player, or maybe an audio
> output 
> in the future.
> 
> So right now, there are two cases. In the future, we could have maybe
> three or 
> four cases, all of them just one object pointer. Frankly, I don't see the 
> benefit of using a variadic prototype to vary the type of one single
> pointer. 
> You could use a single void or vlc_object_t pointer, or  you could just
> have 
> different functions with full type safety. Heck, we could even pass this
> via a 
> new vout_window_t event on the one hand, and a new intf-specific function
> or 
> callback on the other hand.
> 

Either we want to be future proof and in this case, I don't see why
there couldn't be 2 different entities being provided as context, in
which case variadic arguments seems like the proper solution (which also
enabled one to not specify any arguments and use the current
input/vout/whatnot as context), or we only care about what is currently
supported, in which case the context is not required, as it's always the
current playlist/input/vout/aout.


-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list