[vlc-devel] [PATCH 5/7] vout/control: keep the lock instead of setting a held flag

Steve Lhomme robux4 at ycbcr.xyz
Mon Aug 17 09:45:19 CEST 2020

On 2020-08-14 17:30, Rémi Denis-Courmont wrote:
> Le perjantaina 14. elokuuta 2020, 12.25.43 EEST Steve Lhomme a écrit :
>> On 2020-08-14 11:02, Thomas Guillem wrote:
>>> Why is it not needed anymore?
>> I don't know why it was needed before. Maybe I'm missing something.
>>> vout_control_Push() will now have to wait that controls are processed.
>> I don't see how it's different from now.
>> It needs the lock to push a command.
> As Thomas already pointed out, the difference is that a control request needs
> to wait for the control queue to be unheld by vout_control_Release() before it
> can push a control request.

But this is not correct. The control request has this:

     while (ctrl->is_held)
         vlc_cond_wait(&ctrl->wait_available, &ctrl->lock);

It will only pop a request once the vout_control_Release() is called.

> For filter changes, the correct solution is ostensibly to take the out of the
> vout control queue, and process them synchronously with the filter lock. They
> won't need the display lock.

Yes, that can be done.

> Which gets back to my earlier point: it's about time to get rid of the vout
> control queue for good. I fear that you're wasting your time trying to
> simplify a goner.

I'll give it a try.

More information about the vlc-devel mailing list