[vlc-devel] [PATCH] display: use an optional callback to set the viewpoint

Alexandre Janniaux ajanni at videolabs.io
Tue Sep 8 17:46:30 CEST 2020


Hi,

On Tue, Sep 08, 2020 at 05:54:08PM +0300, Rémi Denis-Courmont wrote:
> Le tiistaina 8. syyskuuta 2020, 11.46.38 EEST Steve Lhomme a écrit :
> > On 2020-09-08 10:16, Alexandre Janniaux wrote:
> > > Hi,
> > >
> > > On Mon, Sep 07, 2020 at 08:37:49AM +0200, Steve Lhomme wrote:
> > >> In the future it may be called directly from the thread generating the
> > >> event to lower the latency.
> > >
> > > Sorry I missed this yesterday, but the commit message doesn't
> > > look correct. Being a control or being a callback will never
> > > lower the latency so the commit message is not adapted to the
> > > commit itself.
> >
> > The control should be called from a determined thread,
>
> I don't think that's the case. The control is called with the display locked,
> so the display needs not be reentrant. This is a common convention for all
> capabilities except for the logger.
>
> But there are no guarantees that controls are tied to a given thread, and I
> don't think that they even are in HEAD.

Yes they are not, I've mentioned it when raising the issues on
EGL termination on the ML, and it was my main argument for having
the place_changed to defer the application of the new OpenGL state
to the next prepare/display().

It's easy to see: resize is done synchronously, so resize controls
are called within the thread used for the underlying window system,
which could be a dedicated thread, main thread, etc. AR callbacks
are called by vout_thread.

The documentation doesn't require anything for it also.

    /**
     * Performs a control request (mandatory).
     *
     * \param query request type
     *
     * See \ref vout_display_query for the list of request types.
     */
    int        (*control)(vout_display_t *, int query, va_list);

Regards,
--
Alexandre Janniaux
Videolabs


More information about the vlc-devel mailing list