[vlc-devel] [PATCH 02/17] video_output: translate the mouse coordinates to display coordinates early

Rémi Denis-Courmont remi at remlab.net
Mon Nov 2 13:11:39 CET 2020


Le maanantaina 2. marraskuuta 2020, 13.46.58 EET zhilizhao(赵志立) a écrit :
> > On Nov 2, 2020, at 6:15 PM, Alexandre Janniaux <ajanni at videolabs.io>
> > wrote:
> > 
> > Hi,
> > 
> > On Mon, Nov 02, 2020 at 10:35:09AM +0100, Steve Lhomme wrote:
> >> It seems the issue is that code in macosx.m
> >> 
> >>    @synchronized(self) {
> >>    
> >>        _hasPendingReshape = NO;
> >>    
> >>    }
> >> 
> >> It might use an atomic bool for this variable. Using less locks is always
> >> a
> >> good idea when possible. I don't know if/how Objective-C can handle
> >> atomics.
> >> 
> >> On the other hand the original patch is not mandatory and doesn't improve
> >> anything much. So if necessary I'm OK with reverting it.
> > 
> > I read the issue as «you cannot get the display lock for mouse update,
> > since display can currently report the mouse state, thus already under
> > display lock».
> > 
> > Is that different from reality?
> > 
> > Using the work from Marvin, we'll be able to remove the mouse API from
> > display on MacOSX, so finally solve this issue.
> 
> So it’s OK to just revert? The master branch is totally unusable now.

I don't think so. It seems that there's a lock inversion in the MacOS video 
display plugin that just happens to become (more) visible with the patch.

And if you revert the patch, you'll have to somehow solve the flow control of 
the video output control queue...

-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list