[vlc-devel] commit: input: Remove p_playlist gc signaling now that the playlist is aware of vlc_InputSelectedStreamChanged . (Pierre d'Herbemont )

Pierre d'Herbemont pdherbemont at free.fr
Sun Jun 15 14:55:04 CEST 2008


On Jun 15, 2008, at 2:50 PM, Rémi Denis-Courmont wrote:

> Le dimanche 15 juin 2008 15:45:26 Pierre d'Herbemont, vous avez  
> écrit :
>>> Second,
>>> so long as they only release the playlist inconditionnaly when the
>>> input
>>> stream is over, I fail to see a circular dependency.
>>
>> Circular dependency is about the fact that the playlist is the owner
>> (it holds a ref to it) of the input, hence the owner of the demux.
>> Yielding a parent is generally not a good idea, because it is easy to
>> forget to release it, and then we mathematically leak the two  
>> objects.
>> Moreover with current playlist code it is totally unsupported,  
>> because
>> the playlist doesn't properly release the input, or worse... So the
>> idea is to fix that, but also avoid using playlist code where we can.
>
> Not using something that is not needed, sure. But the directory  
> access will
> ever need to use the tree, no matter what, and since it releases the  
> playlist
> properly, I don't see the problem. There is no circular dependency.  
> You just
> cannot destroy the playlist until the directory plugin has not  
> completed
> reading its directory (which is a set of non-blocking operations).

Actually it doesn't work, and you'll end up in leaking some input  
item, if you kill libvlc during directory processing. I am not sure  
about why.

Also, we don't need playlist tree directly. We could reimplement that  
with only input item callback. Problem is, it's slow, because we need  
to look up playlist items.

Pierre.




More information about the vlc-devel mailing list