[vlc-devel] patch to convert the duplicate module from single threaded to multithreaded

Rémi Denis-Courmont remi at remlab.net
Mon Sep 3 11:32:35 CEST 2012


Le samedi 1 septembre 2012 19:54:54, Sergio M. Ammirata, Ph.D. a écrit :
> The following patch will change the behavior of the duplicate module of the
> stream output chain so that each output is on a different thread. This
> solves the problem that happens when you have two outputs and one of them
> calls a blocking network call for example, i.e. the other one is blocked as
> well.
> 
> It is not 100% bug free as under certain it causes VLC not to close
> properly.
> 
> Sergio Ammirata

- The mutex is redundant, since block FIFOs are thread-safe.

- Waking up the fifo should be redundant and, IIRC, will fail to link.

- You cannot append data, namely the stream ID, to the block_t blindly. There 
is no warranty that there is enough, if any, tailroom.

Also, there are a few bits of shared data in the stream output instance 
(sout_instance_t). I am not sure we can thread IdSend that easily.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list