[vlc-devel] [PATCH 1/2] Introduce vout_GetFilter
Rémi Denis-Courmont
remi at remlab.net
Sun Sep 22 19:38:24 CEST 2013
Le dimanche 22 septembre 2013 19:24:30 Jean-Baptiste Kempf a écrit :
> On 22 Sep, Rémi Denis-Courmont wrote :
> > In fact, the function is a step backward. It solves none of the problems
> > that find_name has but reintroduces the data race on psz_name.
>
> I disagree
The data race is not a matter of agreement. The patch (re)introduces a crash-
susceptible data race whether we like it or not.
The main issue with find_name() is non-determinism. You can get NULL even
though there is a matching object, and you can get a non-NULL object even
though it is removed not (or no longer) in filters chain and about to be
destroyed.
Breaking encapsulation is only a secondary problem, possibly only theoretical
at this point with the video output.
> it solves the issue with multiple vouts.
That is _not_ an issue of vlc_object_find_name(). You can deal with multiple
vouts by iterating all video outputs, or just passing the one you want,
depending on your use case. That actually is one thing that
vlc_object_find_name() does support, combined with INPUT_GET_VOUTS.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list