[vlc-devel] [PATCH] VLM add inputs events
fenrir at via.ecp.fr
Fri Jul 3 23:37:50 CEST 2009
On Thu, Jul 02, 2009, Sébastien Escudier wrote:
> > It would be simpler to have a unique event like
> > VLM_EVENT_MEDIA_INSTANCE_STATE
> > (or a better name) and simply reuse input_state_e (at least at the vlm core
> > level).
> Should I add a parameter (input_state_e) to the Trigger function and to the
> vlm_event_t structure? but it would not be used for other vlm events. Or maybe
> create new ones ?
I don't think it is need to create a new vlm_event_t, just extending it as
you did seems ok.
> > About the event, it might also be better to send the
> > instance name as well (vlm_media_instance_t::psz_name).
> Then I would have to search in all p_media->instance and find the good one. It
> would make the callback a little bit slower no ?
I don't think it matter that much, VLC will probably broke down before
it has an impact.
> diff --git a/src/input/vlm_event.c b/src/input/vlm_event.c
> index 6898dcb..92eccc7 100644
> --- a/src/input/vlm_event.c
> +++ b/src/input/vlm_event.c
> @@ -35,43 +35,49 @@
> #include <assert.h>
> /* */
> -static void Trigger( vlm_t *, int i_type, int64_t id, const char *psz_name );
> +static void Trigger( vlm_t *, int i_type, int64_t id, const char *psz_name, const char *psz_instance_name, input_state_e input_state );
I think it would be better to create 2 functions here.
More information about the vlc-devel