[vlc-devel] [PATCH 5/5] core: first cleaning of input_thread_t variables/event
thomas at gllm.fr
Wed Jul 11 19:06:33 CEST 2018
On Tue, Jul 10, 2018, at 18:31, Rémi Denis-Courmont wrote:
> Le tiistaina 10. heinäkuuta 2018, 16.43.09 EEST Thomas Guillem a écrit :
> > Currently, the input_thread_t is controllable by either input_Control,
> > specific functions, by variables or by the 3 previous solutions. Some
> > functionalities are only controllable by variables (chapter for example).
> > The goal of this commit is to remove variables usage when it's not
> > necessary. This commit doesn't remove variables that should be used to pass
> > users settings (cf. input_ConfigVarInit).
> > The "intf-event" callback is replaced by the new callback
> > input_thread_events_cb that pass a new event: struct vlc_input_event.
> I would go even further and replace it with a structure of callbacks, one per
> event type, if only to maximize type safety.
> > There
> > can be only one listener: the creator of the input_thread_t. In the future,
> > the new vlc input manager will receive these events and forward them to all
> > listeners.
> > In the meantime, I added input_LegacyVarInit,
> > input_LegacyVarStop, and input_LegacyEvents, 3 helpers functions that
> > reproduce the legacy variable behavior (transform new vlc_input_event to
> > old intf-event events). These 3 functions are meant to be removed for 4.0
> > release (when vlc input manager is added).
> > For now, the playlist and the media_player still use the legacy variables.
> > VLM, modules, and the preparser use the new event handling.
> > FIXME: there are some functionalities that are only controlable by
> > variables, like chapter selection, I need then to add a public API or a
> > public INPUT_CONTROL for thoses.
> I think APIs are better than controls, also for the sake of type safety.
> The internal input controls from input_control_e are (currently) needed for
> message passing to the input thread. But the external controls from
> input_query_e do not seem to have any real motivation.
I agree, input_query_e is useless but I'll keep it for now. I'll add more controls because some functionalities are only controllable by variable. Then, after the vlc_input_controller is merged and used, I'll be able to clean this up easily.
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel