[vlc-devel] [PATCH] libvlc: add event libvlc_MediaPlayerESChanged

Felix Abecassis felix.abecassis at gmail.com
Wed Jul 9 14:42:06 CEST 2014


2014-07-08 20:15 GMT+02:00 Rémi Denis-Courmont <remi at remlab.net>:

> Le mardi 8 juillet 2014, 17:26:27 Felix Abecassis a écrit :
> > 2014-07-08 17:14 GMT+02:00 Jean-Baptiste Kempf <jb at videolan.org>:
> > > Good idea: we really need that.
> > >
> > > Does it fire when new ES appear or when an ES characteristic change ?
> >
> > When a ES is added, deleted or selected. So the libvlc user should save
> the
> > number of audio/video/spu tracks in order to know which case happened.
>
> Does it have to be that inconvenient? Can't we at least supply the track
> ID?
>

Do you have any insights on how to improve this?

In src/input/event.c, we set "intf-event" to INPUT_EVENT_ES. The libVLC
code registered a callback on this variable, but I see no way of knowing
which track changed and what was the change (add, select or delete).

I see a few options here:
1) We could use an additional variable to know which track was modified.
This is what we do with INPUT_EVENT_STATE for instance.
2) We could set up callbacks on variables "video-es", "audio-es" and
"spu-es" from libvlc, however callbacks are currently not triggered when
adding/removing choices from a list. We could add a new type of callbacks
(e.g. var_AddListCallback) in order to be notified when a list changes. Or
we could maybe trigger the existing callbacks in this case.
3) Add an internal core event that could store ES type, track id and the
operation. The libVLC code could listen to this event and then translate it
to a libVLC event. However I don't think this event should be in the core.

Maybe you have other ideas. I would be glad to hear your thoughts on this,
Rémi.


> --
> 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
>



-- 
Félix Abecassis
http://felix.abecassis.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140709/04243fc2/attachment.html>


More information about the vlc-devel mailing list