[vlc-devel] RE : [LONG] Some thoughts and questions about vout

Rémi Denis-Courmont rdenis at simphalempin.com
Thu Nov 13 16:33:15 CET 2008

On Thu, 13 Nov 2008 15:28:58 +0100, "brezhoneg1" <brezhoneg1 at yahoo.fr>
> Ok, I do agree there is a problem with vlc_object_find for recycling
> object. A lock mechanism is required.
> Are you interested in integrating a recycling mechanism in vlc ? I can
> write something and submit it for review. Would that be something worth
> doing for future enhancement? 
> I am thinking of:
> 4 exported functions :
> int vlc_recycle_init (p _libvlc)
> int vlc_recycle_release ( p_libvlc )
> vlc_object_t* vlc_object_request ( p_obj, object_type )
> int vlc_object_recycle( p_obj )
> The internal implementation would be:
> - a pointer to a recycle_t structure in libvlc
> - a list of p_obj to be kept 
> - proper lock mechanism
> - proper reference handling 

Not that simple.

First, you don't want to recycle an output object from a different "input
owner": If it comes from the playlist, it should only re-used by playlist
items. If it comes from VLM, it should only be used by the same VLM stream,

Look at what's done for sout-keep - the sout is tied to the owner of the
input, not to the whole LibVLC instance.

Second, recycling is not as simple as the object type. You cannot recycle
an audio or video output, unless it has the same "raw codec" parameters -
at least with the current internal video output and audio output plug-in

Rémi Denis-Courmont

More information about the vlc-devel mailing list