[vlc-devel] [PATCH v2 01/11] core: move all actions handling in actions.c
remi at remlab.net
Fri Aug 11 14:23:51 CEST 2017
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.
And regardless, I still don't see how the action handler knows what type of
context to expect. It can't be from the context (chicken-and-egg problem). It
can't be from the OSD flag or from the action ID either so what's left as
More information about the vlc-devel