[vlc-devel] [PATCH v2 04/13] video_output: apply the mouse state just before rendering

Steve Lhomme robux4 at ycbcr.xyz
Tue Aug 18 09:49:32 CEST 2020


On 2020-08-18 9:16, Rémi Denis-Courmont wrote:
> Hi,
> 
> There are several problems with that fast-path approach.
> 
> 1) If the mouse changes between the time of (fast) check and the time of 
> render, it will be postponed by one frame interval. Not great for 
> reactivity. Generally speaking, handling render timing differently with 
> and without mouse events feels rather dangerous.

The code moving doesn't really change that. We only wait for events if 
we don't have a the next picture in the FIFO which, with proper 
buffering, is rather rare.

> 2) Some, if not all, mouse events cannot be merged. It's obvious for 
> press and release. But it also applies for movement, if a filter checks 
> for gestures.

Ah yes, indeed. In the current code we loop for events (even if we have 
a picture ready). Here we only process the last event. So we need a 
queue for the mouse one way or another.

> Le 18 août 2020 07:12:35 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a 
> écrit :
> 
>     On 2020-08-17 20:31, Rémi Denis-Courmont wrote:
> 
>         Hi,
> 
>         I don't understand why atomic_bool here.
> 
> 
>     So we don't need to take a lock to check if we need to wait in
>     ThreadDisplayPicture(). (and release it while before we wait or if we don't)
> 
>     I don't have a strong feeling for either ways. The display_lock is
>     already used for a lot of cases, so one more is not a big deal.
>     ------------------------------------------------------------------------
>     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é.


More information about the vlc-devel mailing list