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

Rémi Denis-Courmont remi at remlab.net
Mon Aug 17 12:05:58 CEST 2020


Hi,

Point is that control_Push() now waits for any ongoing control, even without subsequent control_Wait(). It's not a problem if we remove controls altogether eventually anyway, but there is a difference.

Le 17 août 2020 09:45:19 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>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.
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200817/0cfffabf/attachment.html>


More information about the vlc-devel mailing list