[vlc-devel] RE : commit: skins2: avoid deadlock when audio-visual isused ( accounts for vlc often but not always hanging in thiscase) (Erwan Tulou )

brezhoneg1 brezhoneg1 at yahoo.fr
Tue Aug 25 13:47:49 CEST 2009


> 
> Le lundi 24 août 2009 19:07:57 git version control, vous avez écrit :
> > A long term solution could be that 1/ audio_visual doesn't keep on
> holding
> > the lock during vout initialisation and 2/ skins stops polling every
> 10ms
> > for a whole bunch of things (rather use callbacks as qt4 does)
> 
> Maybe, but can't you use an asynchronous delivery from the audio
volume
> callback to the skins2 thread?
> 

It is an asynchronous delivery. In skins, callbacks post commands in an
async queue (thread-safe). Then, the skins thread empties the queue and
executes the commands. This patch uses this pattern.

For this audio-visual issue (audio_mixer lock kept during vout
initialization), qt4 and skins have got the exact same problem :
  - as window providers, they service vout request in a blocking mode
  - In between, they may happen to be processing another unrelated
request requiring the same audio_mixer lock
   Which means deadlock :(

  This deadlock is not frequent. But, if the user requests an
audio-visual and in the same time uses the volume slider, chances are a
deadlock can occur.

   This only way to totally remove this deadlock is to unlock the
audio_mixer during the vout initialization.

Rgds
Erwan10








More information about the vlc-devel mailing list