[vlc-devel] [PATCH 2/4] input: add a new variable storing which ES type was last modified

Felix Abecassis felix.abecassis at gmail.com
Mon Jul 21 18:51:34 CEST 2014

2014-07-21 17:10 GMT+02:00 Rémi Denis-Courmont <remi at remlab.net>:
> Le 2014-07-21 17:56, Felix Abecassis a écrit :
>> If this variable/callback mechanism is flawed, we need to find a
>> better way for handling all events, not just this one. Maybe we could
>> add a vlc_event_manager_t object to the input thread and safely pass
>> events this way. This is what we do currently for input_item events.
>> What do you think?
> I am all for replacing the libvlccore event handling with something better.
> But I gave up on doing it myself because it was too deeply ingrained into
> some parts of the code. Also the libvlc event handler is more or less set in
> stone for ABI compatibility.

After a quick overview of the situation on my side, you are probably right.
If this task is too daunting and if we are sure that access to these
variables is correctly protected by the ES Out lock, would a solution
similar to the one proposed in this patch be acceptable? We could
unset the variables after reading them to be sure they can't be used
for something else.

Or there is still the option of adding new types of callbacks for when
elements are added/removed from a list. That won't require any extra
variables and we could easily pass the operation and the element being
added/removed to the callback function.

Félix Abecassis

More information about the vlc-devel mailing list