[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:45:26 CEST 2008

On Jun 14, 2008, at 5:00 PM, Rémi Denis-Courmont wrote:

> Le samedi 14 juin 2008 17:47:44 Pierre d'Herbemont, vous avez écrit :
>> Now there is no more the circular dependency between playlist<- 
>> >input<-
>>> vout in libvlccore.
>> However some access or demux modules are still illegaly using the
>> playlist directly. This is wrong as this creates a circular  
>> dependency
>> between playlist and input indirectly.
> First, I cannot see how the playlist demuxes could avoid doing that.

They only have not to use the playlist code directly. The VLC playlist  
hasn't been contructed to separate its different roles. A current  
effort was to abstract subitems addition using an event.

A future plan would be to create a type, let's say  
vlc_input_item_list_t, that would hold the list of each subitems in  
the input item.

The playlist code could add some specific event handler to create its  
flat list eventually, and would only be responsible for exporting  
functions/types to view, sort, filter a vlc_input_item_list_t.

A third separate part of the playlist should be responsible for  
playing, and dealing with input thread.

We can't do that now because of the code freeze... But I may give it a  

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


More information about the vlc-devel mailing list